Saturday, 5 December 2009

Little moods of coding.

Haha, I am in good rare mood for coding!

Funny, especially during the time I was supposed to work for my university assignments and not for personal fun projects. I don't know why I have so much mood for hobbyist coding right now (maybe I should do a demo?) but I hope it keeps that way. And I hope to finish my courseworks too in parallel (although some of them require coding too).

Ok, as you can see in another blog, I just got a dingoo and tried compiling something for it. Although my attention swifted to Wiz. It's funny, I had bought Wiz for months but I didn't tried to develop something on it because there wasn't a proper windows devkit. Later I installed Ubuntu just for that, although I didn't used it. Recently I read somewhere that actually, the older GP2X applications can run directly on Wiz sometimes, if the SDL libs are compiled dynamically. It's so compatible that games like Flesh Charmer just run in Wiz by trying to execute the old GP2X file. And 2x/3x times faster of course. Although the vast majority of GP2X apps are simply compiled statically (there was a problem with dynamically compiled apps, some didn't worked, maybe if you firmware was upgraded, so it was better to have SDL libs inside the executable even though the size was getting bigger for just a simple thing).

Anyways, I found out that the only thing you have to do is to use DevkitGP2X for the old GP2X to compile something with options for dynamically compilation and this will run perfectly on WIZ too (you also have something that is compatible with both the GP2X and the Wiz, wow!). And so I thought, when in the past I avoided getting into burden, that nowadays if I can compile GP2X stuff, it wouldn't be so hard to do it for Wiz too. I then found a devkit in a chinese site that installs a devkit on windows with an example and it does it automatically and also uses DevCPP and dual compilation, one windows that you can see the results on a window and one gp2x, so you could even take some old SDL code from PC, compile and run it properly on windows project and be sure that you could just compile it with gp2x switch and have it ready. It's so portable and easy that it makes me cry! I took a voxel plasma SDL effect I had done on PC and with almost no modification I had a gp2x version in fifteen minutes. Wow!

Then, I got some strange mood to start coding a new rasterizer. I had a discussion with a friend and I decided to start the new one from scratch even if with rasterizers it's scary because they are complex boring beasts. Normally I would avoid coding a new one especially if I lack motivation, but yesterday I had so much mood that I actually started. The focus here is to code carefully and try to make it as simple as possible. Because usually, my last ones were bloated. The very last unreleased version suffered from some bugs and still was big enough even if I wrote stuff in easier way and it was two times faster than the old on PC (haven't tried on GP2X or Wiz though). It also uses a way they say it's bad for the cache but I will just try and benchmark both versions on my Wiz or even GBA. My focus is to carefully make one as simple as possible at first (with only flat shading for the beginning), benchmark what is the best and gradually upgrade it. I want it to be a suitable simplistic and fast as possible rasterizer for old hardware, especially the very slow GBA. I want to make a very simple tiny 3d engine and not the last beast I was trying to make last time (very organised or bloated). Who knows, maybe I'll do a GBA demo with this one..

Ok, going back to? Damn,. I have to do courseworks for university..

No comments:

Post a Comment