20 September 2006

A little side project: O2DMini

I have been working with the Nokia 770 Linux tablet at my pay job, and it got me thinking about game development on the handhelds. Direct port of Opioid2D is out of the question, as mobile devices rarely have support for OpenGL, so I started (half jokingly at first) designing a light weight version of O2D that would drop features such as rotating and scaling and use software rendering.

The plan is to write a pure C API and implementation (no C++ and STL bloating things up) that can be wrapped to Python using ctypes. However, since the Python interpreter is a bit too resource hungry for embedded devices, the main way to utilize O2DMini would be via a custom Python-like language that is translated to C.

I.e. take this hypothetical piece of code:

action = Delay(10) + MoveDelta((100,50)) + Delete

It would be translated to something equivivalent of:

Action* action = malloc(sizeof(Action));
Delay_Init(action, 10);
Action* action2 = malloc(sizeof(Action));
MoveDelta_Init(action2, 100, 50);
action->next = action2;
Action* action3 = malloc(sizeof(Action));
action2->next = action3;
DoAction(sprite, action);

The whole thing is still mostly at the brainstorming phase (with a few hundred lines of proof-of-concept C-code), but let me know if you think such a tool would be useful. In addition to embedded use, it could target low-end PCs that lack hardware accelerated OpenGL.

The standard Opioid2D has the first priority at the moment, but once it matures, I can see myself dedicating a good amount of time to the mini-variant.


Post a Comment

Links to this post:

Create a Link

<< Home