Friday, September 7, 2012

That "behind the scenes" stuff...

Been focusing on getting the codebase up to date and functioning as I would like.
Slowly getting there.

For one -
I've redesigned almost the entire code bank from scratch.

So what I've got now is a state machines for each player state along with separate states for the various maintenance views and idle loops. Works like a charm and VERY flexible. I've got most (if not all) of the player states pinned down including bonus, highscore, ball saved, match sequence etc. And of course - multiplayer.

It is at the moment entirely possible to "play" a complete single- or multiplayer game from inserted credit to game over (or highscore), but the actual gameplay logic is not yet started. I've still got some electrics and hardware things to do...

Here's a teaser pic of the current state -
Animated streamed video, multiple layers of text/images, transparency, transitions, effects...

In my humble opinion, I believe this easily matches the quality of commercial pinball DMD rendering!

One guideline I'm following is that there should never be a time where the graphics is just switched on and off - each transition should be handled fluently and text should not just pop into place, but rather fade (but fast) into place. That particular effect creates a modern feel to it and I hope that the overall impression will surpass most peoples expectations!

If there's RAM and flash available when logic is complete, I'm think about inserted some realtime generated water effects onto the display as well - staying true to the Bioshock realm.

I've also spent time creating the tools to burn and generate my SD disc image.
My tool simply recursively loops through all files in a folder and packs the DMD files together into one big file with a reserved 51200 byte space in front for machine settings and highscores. An "anims.h" header file is created and updated so all I need to do is to run a recompile of the Chipkit program and reseat the SD card and the animations are updated.

If only the actual data has changed and not the start/stop sectors no reprogram is needed. This allows for quick and easy previewing in the pinball machine since the SD card library has been recreated to support hot-swapping of cards as well.

I've also written a script that can read directly from the packed image (or a regular DMD file) and show the frame at that position. Really handy when debugging and developing.

Pretty neat!

To compare an older image with the current, you can see that it's much closer to the expected output compared to the old image - which I also commented on in the older entry.

2) Old version: All colors were to washed out, not enough contrast. 
3) New version: Nice contrast between high and lows.
Taken at an angle, but with a nice red color and... 
4) ...when compared to the source image, pretty close. This means I get more or less
an accurate preview on the file before 'burning' the SD-image.

No comments:

Post a Comment