Electron Golf 4k

Everyone seemed to have a page about their game, so here’s one for mine. There’s one tiny issue that I’d appreciate advice on: my game is a CPU hog. It doesn’t need to be, but it seems to max out or almost max out one of my cores.

http://java4k.com/index.php?action=games&method=view&gid=378

I kicked the ball off screen (empty screen where no circles), then I can’t kicked it out.

Not sure what you mean, but the ball should reset whenever it gets too far away from the course. You can also reset it by pressing space

that’s the problem, space won’t reset ;D

That’s a really odd bug. What OS, browser are you running? Also, was this a one time thing or does it do this every time? Also, reset is not supposed to do anything when the ball has already stopped if that’s what you are trying to do.

[quote]Also, reset is not supposed to do anything when the ball has already stopped if that’s what you are trying to do.
[/quote]
so that the problem. I thought it’s used to restart level so when the ball done its move, I tried to press space and nothing happened. So I need to reload browser to start new game?

Yes and no. There’s no way to restart a level. Once you finish all holes, you can restart again. Otherwise, that would be cheating ;D

None of the keys work for me. Neither W,A,S,D or space :S Google Chrome on Windows 7 :slight_smile:

Really fun game though I did terrible T___T

That’s very odd. Do me a favor and try it out at https://webspace.utexas.edu/dah2744/www/ and see if it works for you there. I’ll try looking into it, but it’ll be difficult unless I can replicate it :-\

Nope second link is the same.

I’ve never seen java do that before. Maybe it has something to do with your keyboard or drivers? I’ll try and look into it, but no guarantees

I found a resource online where they had the same problem as you caused by SCIM. If you have this program running, disable it and try again. Also, the problem might arise if you have any other software that handles keyboard events. Let me know if this is not the case, and also let me ask if this happens with any other applets that require keyboard input?

I’m not using any other input-tampering software. However, this sounds like a normal Swing/AWT problem of putting listeners on the wrong component where it works for some but not for others. How do you setup your listeners?

In the recommended processEvent function of course :slight_smile:

I took your advice and re-did my I/O, so everything is handled through KeyListener, etc. It took up more space, but not too much, so hopefully it works for everyone now ;D

Yeah spacebar and WASD still don’t work :confused:

Spacebar and WASD aren’t working for me either.

~Shazer2 :slight_smile:

NOOOOOOOOOOO!

I’m starting to think that it might be the compression?

LonghornDude08, your great and original game runs fine on both my Internet Explorer 9 and Google Chrome under Windows 7, including the WASD and spacebar keys. And I have no idea why it doesn’t work on ra4king and Shazer 2’s computers. You may give us the source of your program frame, including the part on key handling.

I just regret I can’t use the arrow keys on my azerty keyboard.

up/down/left/right weren’t supposed to do anything; they do now. I tweaked it a little bit again and changed from a boolean array to a few boolean values. Hopefully this will work, and if not, I’ll post the source and let ya’ll test the uncompressed version.