Polyhedra Development Thread


Worked on a shader program manager that I hope can switch between programs as needed, but it doesnt render anything at the moment.

Also been thinking about the way I currently do rendering I realized I have a hug amount of redundant opengl code. Right now I render each model by instance, so for each instance I will bind buffer, set attrib pointers, render arrays. I need to change this that i render by model updating the modelview per instance.
By making this change for each model I bind and setup data arrays only once per loop.

I also need to add some enhancements to grouping specifically to textures. Right now I may have for a cube 8 different drawarrays because the obj defined 8 groups for each side. I think I should be able to do the entire cube in one drawarray (if the texture is the same)

Also I did some testing and the bad fps on the pc side was because of the frame limit code I had, with it disabled the game runs at 60 fps. Basically if any vsync is used then it could mess with my frame limit.
 
Another decent weekend of dev'ing.

The shader rendering is finally debugged and back to the state it was before i added material color support (although the shaders themselves dont handle this lighting method yet). Also on top of it the shader path works on the pandora :). I added EGL ES 2.0 bits and I needed some precision statement for my shaders (dont understand this quite yet). I may need to add a way to handle defines in the shaders, as the precision statement doesnt compile on desktop opengl.

I also added the single binding of the vbo and vertex pointers, not sure if it helps or not. Cant be bad to call opengl less times. This change also drove some other changes in the level/wave configuration, but they are good changes as they give more flexibility.

I tried again to run on the wiz using the ikari sdl with opengl support. For whatever reason I get opengl not supported. Seems like it isnt using the right SDL lib, even though I used LD_PRELOAD to override. Might just have to go RAW egl/controls without SDL. Might need this anyway for the caanoo.

Pandora is getting 30 fps with both ES paths. So the real fps is between 30-60 since vsync is being used. But I havnt really dived into detailed optimizing. For example i know im recalcilating some matrix operations every loop, which is wasteful.

I have some bugs left to kill, somehow im getting a vector out of range after some of the single vbo bind changes. Not sure yet how that is happening. This happens on all platforms.
The pandora still has some odd issues to work out.
One problem I have left is how to handle line size on the shader side.
Also i broke my points in the font as the indices are getting combined but the point indices are not being updated.
 
good to hear progress. :)
i know that the caanoo support OPEN GL ES 1.1.. so your game is in what library?
 
Ive written it to support both ES 1.1/2.0. GLES API is a subset of the normal API. When i build a desktop version it can run either path at runtime. For the handheld devices I can compile with either ES 1.1 or ES 2.0 support.
 
fantastic! this can run on caanoo... but i don't think fast as the pandora :)
 
Added the code need for raw egl and wiz/caanoo controls. Since i pretty much did this for ken's labyrinth it wasnt too bad.
So after a bit of debug I have the title screen showing. Pressing any button after that causes a hangup, so still more debug to come. It was good though as I found some improvements for my texture loading code, as wiz and caanoo support much smaller max texture sizes. So some of the textures i have dont load as they are too big.
Even though its the title screen it shows so far as it proves my render system works on these devices. The next bug might be control related since i hit a button and it locks.
 
Thanks Gruso, and its good to see you back :)

Edit: Lesson of the day dont use 8 bit number to counf a 16 bit number in a for loop, cause youll be at it all day. So the wiz is running all the way into the actual game now. Caanoo will be running shortly once i see how i goofed my analog stick code.

Update: Wiz and Caanoo are running. There are still rough spots to cleanup and things to fix but looking ok. Speed is still a concern, I cant open the ogg file on the wiz cause of lack of memory. Most textures are missing. Controls need some more debug.
Theres still a random lockup I think i know where it occurs but sure why and its seems to be common across all platforms.

I did some reorg to get some improvements in speed, but i need to think and come up with more.
 
I did some time to spend on polyhedra and its running quite stable.
I resized textures to 256x256 and now the renders on the caanoo are nice and colorful with textures. Still need to fix some issues with the controls.
I created some camera modes that can be specified per wave, the idea i have is a 1st/3rd person mode for waves that require the player to shoot objects that are stacked in 3 dimensions. A 3rd person static camera mode could be used for levels in 2 dimension.
I fixed the font drawing system so that everything looks correct with screen size scaling. (although seems like glLineWidth wasnt working on pandora last i tested)
Also during that i tried to position objects a little better.
I added title, intro, outro text modes that display before and after a wave. Which would allow for some sort of story telling or description of the level.

These are some things l would like to have working before the first alpha demo version:
need to fixup the highscores file and display it. Need mode to get initials and update the score list.
have multiple waves with enough to demonstrate the different camera modes (the levels need to run well on all systems)
in-game hud needs more info (only have score). Need to show lives and maybe some other info to show results of powerups.
powerups need more models
player needs a model
 
Thanks to a suggestion by Cloudef I added fixed step timing. This system lets the application render as fast as it can. The system measures the time taken to render. The time is then divided by a defined time rate for the game logic (but limited to a max number of loops so that the program doesnt run away i.e the logic never catches up to the render)

So currently I have the logic rate set to 20 ms, so roughly 50 lps. I may try to increase this to something like 50 ms and tweak object velocities. This would give more time to rendering frames.

I ran the current system on the caanoo and it works well, there can be frame jitter but for the most part in my 60 object test the game still feels fullspeed. I was getting about 17 fps during this, now its 19 fps. So Im hoping i can sqeeze some more frames by increasing the logic rate.

Also I fixed the controls for caanoo/wiz.
 
So I didnt spend much time programming this weekend. Had some pc issues i had to tinker with, but that seems to be more stable now.

But i did spend some time last night adding physfs support. This means i can zip up all the data and do file operations on it from the zip. This also means I can add a feature for supported multiple zips or data packs. So users can make their own packs that would contain models, textures, levels, shaders.
 
kayuz said:
news about this pickle ;) ?

not really, last couple weeks have been hectic at work, so it cuts down on the motivation. Plus my desktop I use as my devel server is still acting up and its getting worse. I think im going to have to RMA the motherboard this week.

I did enhance the EGL code for better debug and added FSAA configs.

Im currently trying to retrofit the configuration to support a options dialog screen so things can be changed in-game.
Id like to add a highscores screen that runs after the title screen. Also add a timeout for the menu mode that activates the title mode.
I need to create some level files (showing different play modes) for the first demo.

Wiz still does not run with sound enabled, ive heard sdl-mixer in the fw causes issues. So i need to try a custom compiled sdl_mixer at some point.
 
Last edited by a moderator:
nooh, you cut down the motivation?
why, i watch every day on this, i'm interested in this game, why?
;)
 
kayuz said:
nooh, you cut down the motivation?
why, i watch every day on this, i'm interested in this game, why?
;)

I gave the reasons why ;-), i was working late the last couple weeks and now the pc I store my toolchains and source on is not stable and getting worse. Until I can get my computer back to a stable condition how much i can work on this project will be at a minimum and it will be basically none if I RMA the motherboard or any other hw.


Edit:

I finally had some time to test my hard drives and the problematic one came up with bad sectors in one test. Im running the pc without the 'bad' drive and as of this morning no ata errors. Nice thing this is a western digital drive and they have a nice rma procedure where i can get a new drive before sending the bad one back. Im going to run some more tests, but i think this the route im going to take.
 
Last edited by a moderator:
New harddrive up and running, looks like i timed it well with the Thailand flooding effecting hd factories.

So i had some time to do some updates and I finished up some config refactoring to better support the in game option selection mode.
I also added support for windows (its nice to see the code working on many devices). Running a windows build was useful as a found some improvements on releasing the vbos.
 
Made a a change to the music handler from chunks to music streaming, which solved the memory issue on the wiz, so the wiz has full sound now :)
....but as the laws of coding equilibrium would enforce now I get a lockup on the pandora build at the same spot everytime....hope it was something to do with the sound changes.

Background: I was using mix_chunks for any sound i.e effects, music. This is bad as it loads the entire file into memory, so if you do that with a ogg music file thats pretty large it eats up a good chunk of memory. More than the wiz has.
Once i made the change on the PC build the memory use dropped dramatically i.e ~30 mb. The SDL_mixer music api streams from the file, so the memory usage is much less.

Update: Found one of the stability problems at least at 640x480, so its running pretty well. Sill have a lockup at 800x480 which is so bizarre. Ive been suspecting it might have to do with something with the aspect ratio handling.
 
Back
Top