PandoraPanic is based on Penjin which, in this case uses SDL. Unfortunately SDL is really bad when it comes to alphablending… Very S L O W! At first I have just put up with the cpu time wasted on alpha blends since the bg requires them I thought there wasn't much I could do about it. But I realised I could pre-render the background with the colour and store the surface. Basically this pre-render is updated when the background colour is changed and the pre rendered background is used to clear the screen at the beginning of each frame. Results are good. I hope they will benefit the actual Pandora build too.
No sooner than I had the background buffering working… I had found I had broken it again… I was getting a plain black background instead of the random coloured, gradient background. Whoops! Looking at the code there didn't appear to be anything wrong… I was hitting my head against the keyboard for a few hours trying to figure it out.
I finally gave up and went to sleep. As soon as I woke up the thought entered my head. “It's the transparent colour setting or hardware blits!” Basically I was running my other projects through the Penjin codebase to fix incompatibilities. Unfortunately fixing them meant that I had introduced incompatibilities in PandoraPanic! It did in fact turn out that HW blits were breaking the background buffering (They are enabled for Background objects by default.) I added code to disable HW blits for the background image:
And that's it! Don't you just hate it when it's something simple that you miss!?
SimpleJoy is a little more complete. It's an all in one class to support the control pad of GP2X, Pandora and Wiimote. It now supports a dual stick USB controller to test analogue control. I need to add some sort of button mapping in order for USB control to be useful outside of a testing capacity. I've also been thinking of incorporating Mouse/Touchscreen control from inside the class. This would mean everything is in one place and less… um… scattered.
I like the idea of a self evolving game. This is what inspired me to write CromoZome. Unfortunately CromoZome didn't quite achieve the level of evolving that I want to see. It was a great proof of concept, however. My current idea is an extension of CromoZome.
Basically you have an array of Genes a Gene is a class which holds info about what the Gene does and a Gene type. All needed information will be represented in this way. This will allow us to display the Creature and allow it to interact with other creatures.
My main problem with this sort of game, even when discussing it with Cameleon, has always how to display a self evolving creature… But finally, I realised that my creatures don't have to be humanoid or such. Basically I can represent creatures as polygons and colours and maybe patterns on the polys. This means the creatures can be procedurally generated. Furthermore, the cretures can mate and swap genes to make a differing complexity poly, or create a symbiotic organism with other polys that may eventually become a 3D creature!
I am very excited by this idea but I refuse to start it until PandoraPanic! is finished because I know it will take my focus completely. I do intend to release it for Pandora, I also hope I can get it to other platforms too!