here is something a bit more interesting. see the graph:
most of the time passed is in the kernel…
you are right. the game does almost nothing.
Here’s what I get:
FPS Fullscreen - 50
FPS Windowed - 46
NVIDIA RIVA TNT2 Model 64 32MB
Win2K - PIII 1.1
Full screen is very smooth, windowed suffers from some flashing of sprites. Nice and smooth though, and no BSOD:)
Bill
Hm, on my box it consumes ~70% CPU. But if FPS were capped, it wouldn’t make much sense to measure it?
Would be interesting to see the main loop…
[quote]Just a note. Where do all creators of scroll games took the idea that the shadow of an object could be smaller than the object itself? Never understood that…
[/quote]
I originally had the shadow the same size but it looked too much like the plane was about 5 feet from the ground. Since the ground enemies are going to be considerably smaller sprites than the plane (and you’re flying over buildings) it needs to look like the plane is high in the air. Thus the plane is closer to you than the planes shadow so the shadow should be smaller.
[quote]Ok, someone needs to be negative again…
Am I the only one here thinking that 50fps from 2GHz is not much for a game that nearly does nothing??
My Q3A on my 700MHz box runs with ~100fps!
[/quote]
I don’t remember exactly, and I don’t have the code in front of me, but I think I’m sleeping 10ms between frames, in windowed mode, and 7ms, in full screen mode, to give the CPU a break. This isn’t particularly acurate, as we all know, thus the widely varying frame rates. However since I’m not updating the objects based on frame count but on time passed the game should run basically the same on all machines ( I hope ).
EDIT:
Just another thought or two. The FPS counter is definately causing garbage as well as all of the keyboard events.
There is a fair amount of alpha blending going on which can’t be accelorated. The entire area of the shadows and the edges of the plane are not opauqe.
The point of counting the FPS is so I can tell when I add something that suddenly kills the performance. Something that can’t always be visually noticed.
Herkules: I finally saw the left/right movement jitters you spoke about. Annoying as hell visually, wonder why it doesn’t happen very often for me?
Thanks to everyone that took the time to give me stats and error reports.
I got about 35 frames per second full screen. Win2k, 512MB of ram, P3 600. No problems at all in full screen.
nathan
Linux, 1.3GHz Athlon, GeForce 2, JDK1.4.1_01: 33fps.
When I hold z and c down and I fill the screen with as many bullets/bombs as I can I get 22fps.
zparticle,
Sorry for the late reply
re: my video card not supporting 32bit color…
You know, Im not sure. It’s a built in card. I would suspect that it should support 32bit at 640, but I cant guarentee it. This is my work machine, so its not a gaming machine by any means.
Well I’ve added the first gun turret type enemy. You can now get shot and you can shoot the turrets. You can use both the missles and the guns. The gun are far less effective than the missles so you get more points for using them.
The missles only hit a target when they have been locked on before firing. You do this by placing the recitle over the target and when it turns red and starts spinning you fire a missle.
I added music but I have removed it for the time being as it caused the processor usage to double.
http://www.scottshaver2000.com/temp/f15strike_test1.zip 565K
Note that I have done everything I can think of to get rid of the flashing under windowed mode. It simply won’t go away without make the frame rate like 2FPS. I tried BufferStrategy, may own back buffering, volatile images non volatile images, bleh, bleh, bleh.
Full Screen - 59
Windowed- 33
GeForce 2 GTS 32M
Athlon 900MHz
384MB RAM
WindowsXP
I’d really appreaciate if you could take awway missile shooting from the ‘Z’ key, which is hard to reach on German keyboads. What about ‘X’?
runs perfect on my p4 1.7 512 mb and gf3 ti 200
Thanks for the stats guys.
Herkules: I can make it X for missles, X and C are right next to each other on US keyboards. Do you have a digital photo of your key board? I would like to see the layout.
SpuTTER: No problem, thanks for the reply.
Please, don’t use q, w, z, a and m keys that are the most often swapped ones.
Or, make the layout configurable.
I am running an AMD Duron 900mhz, 1 gig RAM, Red Hat 7.2, Voodoo3. I averaged ~16 fps. The animation had noticable flicker in a few spots, namely the fps gauge in the upper left and the set of fighters in the very upper right. I got similar behavior with the side scroller demo that (I think) you posted sometiime in the past, but I believe the fps on that was in the 20’s.
The graphics look nice, though.
Herkules: Found a picture of a German keyboard, no wonder you don’t like the Z key for the missle. The combination of Z and C would give you cramps in about 3 minutes.
Okay well I’ve added Jeeps (with really bad shocks), Rivers, Bridges (you can blow up), Boats (you can blow up) and background music (temporary). Spiced up the building a little with some different colored lights as well.
Oh, I changed the missle key to ‘X’ from ‘Z’ to accomidate the non-english keyboards.
With all of the new code and especially with the music (it doubles the processor usage) you’ll probably need at least a 1Ghz machine, but please for those with slower boxes try it and let me know what happens.
I want to add enemy helecopters next and then ammo shacks or something that can hide power ups. I thought about tall things you can run into like water towers but I’m not sure how to draw them. Also I’m thinking about adding smoke trails to the missles so they obscure your view of the ground and flames or something to the plane when you get damaged.
Note there is no way on Earth this is going to run on Linux so if you have that OS don’t waste your time.
Anyone have some ideas for more stuff to add? Do people like having music or would it be better with just sound FX?
http://www.scottshaver2000.com/temp/f15strike_test1.zip 785k
[quote] Note there is no way on Earth this is going to run on Linux so if you have that OS don’t waste your time.
[/quote]
Why? - Performance related?
[quote]http://www.scottshaver2000.com/temp/f15strike_test4.zip 785k
[/quote]
broken archive
Your game meanwhile is a good example how java gaming could be worthwhile doing.
Imagine your game would be an applet or webstart’able, it could attract many people every day being just curious about ‘whats new today?’.
If you brake it up into many jars, some for code, some for data, this would be possible with only minor downloads and the current version would always automatically be established on the players machine. Then you’d exploit a real advantage over non-java games!
The question would be how to make money with it though. I thought about selling ammo or missions?
Confirming that, broken :-[
Ahh Java, you promised us so much…