Wednesday, October 5, 2011

First screenshot of the graphic engine

This is a screenshot of the client after two days. As you can see I've chosen to create an isometric 2d engine for it. I decided to go for isometric, because I believe that you can create much nicer looking games with less work-hours doing pixel art.

Features so far:
  • Smooth scrolling
  • Variable tile size
  • Moving objects (no collision or path-finding yet)
  • Input through hover-sensitive on-screen controller
  • Detecting mouse clicks on the correct tile

Creating this took about two afternoons plus an additional day for performance tuning. The experience I collected while participating in the development of the graphic engine of the open source game The Mana World helped me a lot.

The framerate could be a lot better, though. The 18 FPS you see above are inside my virtual Windows 8 machine on my desktop PC. It runs slightly faster (>20FPS) on my netbook which runs Windows 8 natively. 20 fps is just enough for a 2d game, but considering that I want to add additional features to the engine which will suck some additional CPU cycles, this could be a problem. I hope Microsoft will improve the performance of its HTML5 canvas implementation before the Windows 8 release. Otherwise I will have to find some optimization tricks or use some shortcuts.

The last resort would be to port the whole engine to C++ and Direct2d. The metro interface can do that, but the programming style examples I've seen for this looked very old-fashioned. Win32 API old-fashioned to be exact. Unless doing this project turns out to be completely impossible in Javascript due to performance reasons I would prefer to avoid this, because it would mean that I will waste a lot of time with boring low-level stuff like hunting dangling pointers and memory leaks.

No comments:

Post a Comment