View Full Version : Chopper2 progress
reubert
2004.10.24, 02:30 AM
While you guys have mostly all been working on uDev projects, I've been working on my excuse not to enter.
Thought I'd post a little screen shot to let ya know that I'm still working on it. The engine is about half way there I think, and will mostly only be worked on as content is added from here on in.
Yup, its full 3D, those a 3D clouds and you can fly through 'em.
David
http://www.majicjungle.co.nz/Chopper2screen.jpg
http://www.majicjungle.co.nz/Chopper2screen2.jpg
igame3d
2004.10.24, 05:11 AM
Sweet!
Danlab
2004.10.24, 07:18 AM
Contact me about Chooper2 i should help you with some 3d objects i made
ERaZer
2004.10.24, 08:33 AM
Hey, that's looking real nice!
blobbo
2004.10.24, 09:29 AM
Gah! I can't see the screenshot! I'm desperate to see the screenshot! I want to beta test! Please! Please!
I loved Chopper. I think it's still on my computer somewhere.
skyhawk
2004.10.24, 09:45 AM
I hope it controls as well as it looks
lightbringer
2004.10.24, 11:21 AM
Nifty, although seeing some buildings and tanks would be nice.
Andrew
2004.10.26, 12:04 AM
Sweet! I can't wait!. Oh, by the way, you might want to instigate some color-correction on your textures... they look a bit... faded :/ If you made things a bit greener, and more 'intense,' I think the game would look much more lush and satisfying. But that's just my crazy opinion :P
reubert
2004.10.26, 06:54 PM
I'm still not happy with the textures, I've gotta play more with Terragen to get it outputting something a bit nicer. There's a house in the chopper world, and some rings that you fly through for flight training, but thats it so far. Houses are horrible to model, I might have to take you up on your offer danlab ;)
arekkusu
2004.10.26, 07:52 PM
Care to talk about your cloud rendering method?
reubert
2004.10.26, 08:34 PM
I've worked off the SkyWorks source:
http://www.markmark.net/SkyWorks/
and the paper written by the same guy:
http://www.markmark.net/clouds/RTCRPubs.html
I've found these to be really useful, but have re-written the code to work to my needs. (And to be obj C, not C++)
In a nutshell:
A cloud is a gridded set of particles.
When lighting is calculated, the cloud is rendered from the light source from front to back, each time adding darkness to an offscreen buffer, and reading back to color the next particle.
When the particles are rendered to the screen, they are colored according to the angle between the viewer and the sun.
I'm currently working on getting imposters working.
Without imposters, I was getting frame rates of around 15fps, slowing to 7-8 when inside a cloud. Lighting takes about 7 seconds for a full update, so at the moment dynamically changing lights is not possible. This is on a Radeon 7500 1ghz G4.
I'm confident that good frame rates will be possible with a small amount of optimization, but am not too sure I'll get lighting working dynamically.
arekkusu
2004.10.26, 08:56 PM
Yeah, that's the paper I was thinking of.
So, "reading back" is a single pixel at the center of each particle, from a pbuffer? I see how that gets you the accumulated occlusion value, but all those readbacks are performance death...
reubert
2004.10.26, 09:09 PM
it uses glReadPixels from the screen... so not an off screen buffer at all... I render everything I dont want to see, then I clear the buffer and render what I do want to see. I could use a pBuffer but it is my humble opinion that pBuffers are evil. It averages the color of the particle from the pixels of the area it takes up.
Danlab
2004.10.27, 09:55 AM
how do you use glReadPixels ?
i made some test with glReadPixels and its slow glReadPixels remove 20 fps of my current project
arekkusu
2004.10.27, 04:02 PM
It's always slow because AGP is only optimized for one direction, but there are things you can do to speed it up:
* Use a native pixel format to avoid CPU bit swizzling.
glReadPixels(0, 0, width, height, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, pixels);
or
glReadPixels(0, 0, width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pixels);
That gets me around 230 megs/second reading back a 640x480 32bpp buffer. Or ~0.005 sec per call, which is really slow, but still fast enough for a game. By comparison if the CPU is involved, I get around 8 megs a second.
* read as small an area as possible, but group multiple reads into as few reads as possible. i.e. if you need 10 pixels from the screen, read back one rect containing all 10 pixels, don't read each pixel individually.
* make sure the rowbytes is a multiple of 32, in case DMA alignment is an issue.
Also, as of 10.3.3 there is another path that you could try, as described by John Stauffer on the mailing list (http://lists.apple.com/archives/mac-opengl/2004/May/msg00030.html). I haven't benchmarked that yet since it's 10.3-only.
Finally, be aware that the readback performance is GPU and driver dependent. It's been mentioned recently that the 6800 has terrible readback performance; the drivers are too early.
reubert
2004.10.27, 04:10 PM
Thanks for that info, arekkusu. I am not using GL_UNSIGNED_INT_8_8_8_8_REV and can probably read back a smaller area.
Can anyone think of a faster way of doing this? Perhaps it would be faster just to "draw" back towards the light from each particle on the CPU, and decrement the light value based on the color of the first particle it colides with.
Sounds kind of slow... but I have absolutely no idea how it would compare to glReadPixels.
arekkusu
2004.10.27, 04:12 PM
glReadPixels is astoundingly slow compared to any path that you can keep solely on the GPU or CPU. Any alternative way of accumulating the particle occlusion is worth investigating.
For example if you had fragment programs this could be an easy dependent texture lookup... ;)
Danlab
2004.10.27, 04:29 PM
im using this for making a glare effect
glReadPixels(winx, winy,1,1,GL_DEPTH_COMPONENT, GL_FLOAT, &bufferZ);
but its really slow :(
arekkusu
2004.10.27, 04:37 PM
If you're reading back one pixel at a time, and you do that in a loop, it's going to be slow no matter what.
But, depth readback is probably not optimized, ask on the mac-opengl list to find out for sure.
Danlab
2004.10.27, 04:45 PM
i only need to know if the sun is hidden by an object this is why im reading one pixel
dont need more
OneSadCookie
2004.10.27, 08:52 PM
dan: you could use ARB_occlusion_query on the cards that support it...
kodex
2004.10.27, 10:54 PM
a little off topic, but your link for chopper 1 source code is dead. Is there anothe rplace i can look at it?
Duane
2004.10.28, 03:06 PM
hmm. Beta test forms?
*drools*
Wow that looks pretty good, you are going to make a killing if that game is shareware!
arekkusu
2004.10.31, 01:00 PM
Any alternative way of accumulating the particle occlusion is worth investigating.
Won't run on a 7500, but there's a fragment program implementation of clouds with light occlusion here (http://www.vrac.iastate.edu/~areinot/clouds/clouds.html). Might be worth looking at just for ideas.
skyhawk
2004.10.31, 02:03 PM
geep, that demo didn't run speedy at all even on my 9600...
reubert
2004.10.31, 02:29 PM
a little off topic, but your link for chopper 1 source code is dead. Is there anothe rplace i can look at it?
I had to take the source down because of limited space. If anyone would'nt mind hosting it for me please let me know.
Chopper2 will be shareware, beta testing is still at least 6 months away, (probably longer) but I'll be sure to let you all know.
David
reubert
2004.11.12, 09:23 PM
Seth is kindly hosting a recent build of Chopper2. There's no gameplay yet, and quite a few problems, but if you would like to give it a go and give me a little feedback I'd appreciate it.
I'm particularly interested in frame rates / system spec, what you think of the controls, whether you find the popping of the terrain, or sudden shifts in cloud color are annoying, and what you think of the music system.
Controls are: mouse, arrow keys
http://www.freaksw.com/Chopper2.tar.bz2
Cheers, David
lightbringer
2004.11.12, 10:49 PM
http://www.freaksw.com/Chopper2.tar.bz2 silly.
skyhawk
2004.11.12, 11:02 PM
I can get stuck in the ground too easily
had to go to window mode to select play
in some cases, I found the terrain popping to be very distracting... I thought something was actually happening
I noticed in window mode some annoying noise:
http://sky289hawk1.dyndns.org:8080/chop2.png
it is kind of hard to capture, but those white dots in the images, they would constantly flash around on the screen.
camera needs to better follow the chopper... like not into the ground, and also it should never chop off the chopper tail
awesome day time effect, but it looks MUCH better in the morning than at sunset.... the clouds get WAY too pink
when flying through the clouds, I think it is a bit way too obvious.. the clouds go pop, pop, pop as you fly through each... perhaps decrease the alpha the closer you get to the camera when you are within x meters... like from when it is at the tip of you ship, start, but when it is at the back of the chopper, and have it completely transparent by the time it gets to the camera
the viewing distance is amazing! but you really notice some of the textures popping
minimum fps 50 average 70 maximum 120 @ 1280x1024
this was on my DP 2GHz G5 with radeon 9600
Looks like a good start, here are some suggestions/bugs
1. I had no cursor in the main menu
2. The main menu was garbage the second time I ran Chopper2
3. The loading time took forever
4. The music needs more CPU time while loading, it was choppy a few timse
5. It was SLOW, 7 FPS, I have no clue what resolution it was at I didn't check
6. I got stuck in the ground
7. I have no idea how to control it and am a typical lazy user so I didn't find out how and quit (I will give it another try later)
Don't take any of that badly, its just anything that came to my mind that needed improvement.
Also, did it take a random song from my iTunes library because it sounded like a local band from my area and I didn't find any songs in your apps package.
I can't wait to play this at a higher FPS, I will mess with it some more tonight.
skyhawk
2004.11.13, 02:10 PM
7. I have no idea how to control it and am a typical lazy user so I didn't find out how and quit (I will give it another try later)
it said at the main menu screen or loading screen (I forget), arrow keys and mouse.... what was there not to understand?
Maybe on yours, but not on mine, I just ran it again and did not see any instructions at all.
reubert
2004.11.13, 03:29 PM
Thanks guys
I should probably clarify... This is a graphical demo at best, so dont expect too much from it ;) You are unlikely to get reasonable frame rates on anything less than a G4 512mb RAM, 16mb VRAM, but I'm interested in frame rates on anything less.
Jake, what are your system specs?
I said in my post that the controls are mouse and arrow keys.
The main menu garbage thing is because its a 1024x1024 texture, which some cards cant handle. I'll make it 512x512.
My apologies for hiding the cursor on the main menu screen, I only just implemented the hidden cursor thing, and forgot that people might want to select play ;)
Its also not very nice of me to have the chopper start mid air, and start plummeting as soon as you move the mouse, and clearly the poor chopper / terrain collision testing is making things difficult, but when you get used to it and are flying around are the controls useable?
Cheers,
David
I have a 1GHZ iBook with a Radeon Mobile 9200, and 10.3.6. I had Folding@Home on in the background so that could have hurt performance, some games it does and some it doesn't.
1024x1024 is overkill, 512 is fine for the title screen. In my motorcycle game I just made a bunch of textures smaller because it was taking forever to load and 6 512x512 skybox textures is hard on older systems, reducing them to 256x256 cut that size down to 25%0
aarku
2004.11.14, 04:28 AM
Very stunning! Looks better than any flight sim I've played before. (The most recent was X-Plane, I think)
The game is smooth. . . unless I turn :-)
I'm sure you know about that though. Have you tried more dramatic terrain? What I did was take the heightmap into photoshop and just applied an unsharp mask filter on it. I think it makes it more interesting. I think some sharp plateau type hills would be groovy.
Is there any way you could optimize it more? For instance, when I am viewing the front face of a mountain, and only the front face of a mountain, things still seem to get jerky when I rotate. Maybe there is some drawing you could be not doing?
I'm assuming you're going to do a better chopper texture. The one in the game now looks like it has been scaled up from something :-)
I get some weird white static on the terrain sometimes. I don't know what it is from.
The cloud flythrough could be a lot more convincing if you faded out the alpha when the chopper got close. Also, once in a while a cloud will pop in and out of existence. It isn't too bad, but it'd be nice to fix if possible.
You are probably aware of the terrain seams at high altitudes. It is very realistic, though. . . great job with the textures.
I like the dramatic pink sunset.
What I would like to see, is the helicopter become somewhat silhouetted when the camera is facing the sun. I don't think you'd want to totally blacken it, but a partial effect would be effective I think.
The clouds at "night" seem pretty white. But overall, the colors are excellent. You got the haze just right.
I thought the controls were just fine.
Keep it up! Wow.
-Jon
funkboy
2004.11.14, 12:09 PM
It seems my iBook 500 / 8MB VRAM Rage 128 Pro cannot run it... does this make sense?
It's just giving me a black screen - and playing music from my iTunes library I think! Unless you have really awesome taste and are using a Fila Brazillia song on the menu :)
Will it ever run on this ol' iBook?
Edit: I am using MAc OS X 10.3.6, also, with 384MB RAM in this iBook.
skyhawk
2004.11.14, 02:01 PM
karl, I think the graphic effects are a bit much for your lowly rage 128
blobbo
2004.11.14, 03:00 PM
*weeps* Gosh, I really need a new mac... Anyone got an old one lying around they want to donate? ;)
reubert
2004.11.14, 03:10 PM
Will it ever run on this ol' iBook?
Most probably yes. I'll be scaling down the graphics for lower end systems. How far or well it will scale is yet to be seen.
It does play music from your iTunes library. It'll have playlist support, so you can make a playlist in iTunes and listen to it in Chopper.
The static that you guys are talking about is gaps in the terrain with the clear color showing through. Why these gaps are there, when the Vertices have exactly the same values is beyond me... It may be related to depth testing problems as well (take a look at a plane of water over a very shallow sloped shoreline). Hopefully I'll figure it out, or I'll adjust the clear color to closer match the terrain color.
Thanks for your comments Aarku. Keep em coming :)
Danlab
2004.11.15, 06:41 PM
http://www.danlabgames.com/mini/chop1.jpg
http://www.danlabgames.com/mini/chop2.jpg
your chooper look really nice !!! :ninja:
kodex
2004.11.19, 11:47 AM
About 100-105 FPS
1.8 DP G5 768 RAM
Looks pretty good so far, had the same issues with starting a game in full screen and such, The camara needs to track more effecticly also. But great work so far
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.