Holding the arrowkey down?

I deserve burning for my newbness, but I figure for the time I spend searching through the different tutorials, each with its pros and cons, I’d rather be flamed for the stupid questions I ask on forums. So I think I’ll start a thread of stupid questions for those of you kind enough to answer.

My first question is about holding the key down to move my char (in an rpg). You know how in windows when you hold the key down it kinda has a slow start then it goes really fast? how can i overcome that?

You should shouldn’t rely on the windows operating system key repeat to move your character…

Detect the key press with a KeyListener. Set a flag to indicate that the key is down. Then in your game loop update your character as long as the flag is set. When the player releases the key (again with KeyListener), unset the flag.

Kev

wait a minute… where have i seen this before?

Could it be here?

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=2D;action=display;num=1109414268

Kev

You’re the man Kev. and that link you just gave me answers my second question about pushing 2 buttons at once!

alright, next question:

I figured out 2key, obstructions, good sprite anim and battle system. Now I want to make a gui engine to build my game. I was thinking of using PrintWriter and making a text file with every bit of info (info being modified in the gui), but that was stupid because within the out.println(“blablabla”); is bound to be plenty of "s and \s and stuff that will ruin everything.

Any ideas or quick references to sites/tutorials/threads on the making a game engine?