26.
Feb
3d1.jpg

Programming the Creative Zen X-Fi 2

A few days ago I bought a new portable media player, the Creative Zen X-Fi 2. I looked for a cheaper alternative than the iPod Touch and came across this one. It features 32 gb of memory, microSD-slot, touchscreen and (woo!) accelerometer. But the best thing is: It can be programmed by using Lua! After I read this, I immediately bought it, because I wanted to apply my Lua knowledge on a far more simple gadget. The WoW API provides an exhaustive GUI framework, but I prefer to write my own frameworks and the Creative Zen only has a few rectangle-, text- and pixel-functions. Really simple stuff.

So I started to create the GUI by providing a core system with classes, called Dharma – I really like Object-oriented Programming. It became more complex and now serves as the base for all my X-Fi 2 applications, handles input events and drawing of widgets.

My recent test, however, goes in another direction: 3D. I already started back in WoW with a simple wireframe 3D engine a few months ago to display coordinates in the world frame, so I just had to copy the code over and adjust it (it’s both Lua after all!). So far, the engine works smooth on the little thing, but I don’t expect solid textures and 3D games, because the CPU is not the fastest.

Anyone got an idea for a good game on a touch-based small device? I don’t know any and it drives me mad that I can’t really use my framework as a basis for something actually useful.

07:08 PM | 0 Comments | Tags: ,

Comments