A simple shoot em up game with weird looking bio morph creatures.
Arrows to move space to shoot.
fun game. I really liked it. I am working on something similar(not for 4k though) and yours surpasses mine by far.
Interesting graphics, but it seems a little slow paced. I only get one alien every 10 seconds or so.
once oyu get to like lvl 5 it becomes a lot faster.
Again, horrible key detection. It’s unplayable on my computer - 1.7GHz, Debian lenny, Java 6u10-beta.
hmm. what you mean “horrible key detection” it worked fine.
Can you describe the key behaviour. Does the player move too fast or too slow.
Most of the time, it doesn’t. It just sits there like a lemon.
I never saw that. what OS are you running? is your computer really old?
I found the problem. I had a while loop to maintain the frame rate but your system was a little slow so there was never any free time left over so the while loop was never entered. The result was yield was never called so the event thread was starved hence the key press was missed. I changed to a do while so yield will be called on every render loop. Try now and it should work on your system.
Thanks for the feed back.
Linux (Debian lenny), Java 6-u10-beta, 1.7GHz. The latest changes improve it - if I hold a key down then it will eventually move, which wasn’t the case before - but it still often takes a half second to react and can miss it if I hold the key for less than that.
The last fix does a yield every frame draw so if you are only getting key events every 1/2 sec either your frame rate is only 2 frames a second or for some reason your system is reporting key events at a very slow rate. I will try and put a frame rate counter in so you can see what frame rate you are getting.
Ok I just uploaded a version with a frame rate counter in the upper right corner. I limit the frame rate to 60 so let me know what frame rate you are getting on your system.
dual or single core?
50fps.
h4ckboy: single-core. Here are the full stats:
pjt33@agape:~/$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 22
model name : Intel(R) Celeron(R) CPU 530 @ 1.73GHz
stepping : 1
cpu MHz : 1729.140
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx lm constant_tsc up arch_perfmon pebs bts pni monitor ds_cpl tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 3462.20
clflush size : 64
power management:
ok so that explains it. your computer is kinda slow. but it should be fast enough to play a simple 2d game. so Rick I think that your program is looping too fast or often. if you make the sprites move more each loop you can make it loop less often. then it does not take as much processing.
Kinda slow? Most java4k games should be playable on my 7MHz Amiga.
did you read the second half of my post. I said that if that were to be the problem then he is taking up way to much prccessing. and I meant was that it wasnt and XPS(or some other super fast computer) so that may be the problem.
Quite the opposite.
In order to keep bytecode as small as possible, memory usage and CPU usage are often rediculously high.
I tested on my work computer which is very slow and has a poor graphics card. It ran at 20 frames/sec but still played very smoothly. So I now think it is something to do with either the threading or how keyboard events are delivered on your system. You are getting 50 frames/sec which is a pretty good rate. The only thing left that I could try would be to replace the yield call with a sleep call. Maybe that would force the event thread to kick in and register the key board presses.