James Hancock
asked on
Plz Help me translate this JFrame to Python
Hi, I Am a Python NEWBIE
Does anyone have time to plz show me what this kind of Java JFrame + capability looks like in Python?
This will all be for intended use in a game. Is PyGame more suited to this? Why or why not?
What can PyGame do in this situation?
Thanks
Does anyone have time to plz show me what this kind of Java JFrame + capability looks like in Python?
This will all be for intended use in a game. Is PyGame more suited to this? Why or why not?
What can PyGame do in this situation?
Thanks
class gameWindow extends JFrame implements MouseListener, KeyListener {
public gameWindow(ClientNetworkEngine CNE, int x, int y) {
localCNE = CNE;
setSize...
setTitle("Game Window");
ExternalGameLoopThread eglt = new ExternalGameLoopThread(this);
setLocation(x,y);
setVisible(true);
addMouseListener(this);
addKeyListener(this);
eglt.start();
}
public mousePressed(MouseEvent m) {
System.out.println("mouse pressed at : "+m.getX()+" , "+m.getY());
}
public keyPressed(KeyEvent k ) {
System.out.println("key pressed : "+k.getChar());
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Do you think it will be decent speed / frame-rate for a fully functioning network RTS?
ie a Blizzard quality RTS. Full screen is a big plus. Will graphics at full screen be clunky?
This means I wont have to be mired in Direct X? Which compared to pygame looks tough.
Thanks