Today I decided to start to write a video game for OpenMoko.
I am a little bit disappointed by all the current available games for openmoko (I like action games). And the port of already existing games that I tried all have poor usability because they are not usable with a touchscreen (A touch screen is much more limited than a mouse, cause you can't move the pointer when you don't click)
So anyway, I wanted to write a very simple game where asteroids are falling from space and you have to destroy them by launching missile from the ground. The control is very simple : touch the screen to fire a missile to the pointed position.
I want the code of the game to be very small and simple, yet fast. I started to write it in vala, but after profiling got a little bit frustrated to see that a lot of time was spent getting and setting gobject properties.
I was about to consider cython + python or C++, and then I found that gdc, the gnu D programming language compiler, was available in the debian distribution for openmoko.
I immediately tried to compile my game guisterax, and it worked fine. Of course no way to play it without the keyboard, but that is great anyway.
D would be a perfect language for embedded applications.
Now the problem is that as far as I know it is not possible to compile D sources using openembedded yet, so I may have to use an other language for my game anyway.
Showing posts with label D. Show all posts
Showing posts with label D. Show all posts
Sunday, 12 October 2008
Wednesday, 30 April 2008
Enough of C++ !
I used to like C++ a lot but the more I use this language the less I like it.
I think I really definitively made up my opinion about this language when I started to look at the boost libraries.
First I though all those crazy meta programing stuffs were genius (and indeed the boost libraries are an impressive piece of work), but then I realize that if C++ didn't have so much drawback, the boost code would be quite simple.
All the boost libraries do is find tricky ways to do things that C++ hasn't been made for in the first place.
For me it is a clear sign that C++ is going nowhere. And the new C++0x doesn't look so good to me. They make the language very complicated, I wonder if people are actually going to learn all the new things they add to the language. Yet one of the most important feature (garbage collector) is still not planed.
I am getting very interested by the D language, I even made a small video game in D.
At first sight D looks similar to C++, cause it has the same syntax (I would have preferred a python like syntax though), but it corrects all the things that made me not want to write C++ again :
So far the language is still new, and unfortunately not so many libraries have been created for it, but for me D may well be the future of compiled language.
I think I really definitively made up my opinion about this language when I started to look at the boost libraries.
First I though all those crazy meta programing stuffs were genius (and indeed the boost libraries are an impressive piece of work), but then I realize that if C++ didn't have so much drawback, the boost code would be quite simple.
All the boost libraries do is find tricky ways to do things that C++ hasn't been made for in the first place.
For me it is a clear sign that C++ is going nowhere. And the new C++0x doesn't look so good to me. They make the language very complicated, I wonder if people are actually going to learn all the new things they add to the language. Yet one of the most important feature (garbage collector) is still not planed.
I am getting very interested by the D language, I even made a small video game in D.
At first sight D looks similar to C++, cause it has the same syntax (I would have preferred a python like syntax though), but it corrects all the things that made me not want to write C++ again :
- a garbage collector (you can disable it if you want more control on memory)
- a foreach loop
- dynamic arrays part of the core language
- automatic type deduction (like "auto x = 10")
- simpler and more powerful template system.
So far the language is still new, and unfortunately not so many libraries have been created for it, but for me D may well be the future of compiled language.
Subscribe to:
Posts (Atom)