Day 1
Friday, March 16th, 2007So, I have just come across a Cas’s “The Alien Flux Development Diary”. And as he and his team are the creators of LWJGL engine, and as I am using it to write my next 2D game I thought maybe I should start my diary of my own.
I am planning to write a simple, so-called ‘casual’ game – a remake of ‘Dr.WEB’ game. I really loved that game; I played it on ‘dandy’ game console (a Chinese clone of NES console). Moreover, I want to use Java.
I like Java. I have thought a lot about the technologies to use, I know many languages, platforms and tools. It is really a tough task to make a choice, a right choice. However, after a long and painful thinking I had a small set:
1. BlitzMax
2. C/C++ with multiplatform library (GTK, SDL or Torque)
3. Java (OpenGL binding)
Blitzmax is great for a newbie game developer, who has started writing some scripts. It has a fairly small price (~80 dollars), a large community and an as a result many libraries. This is wonderful. What I do not like is its editor (which really sucks, at the times of Eclipse I cannot look at BlitzMax without tears). Its debugger is lame as well. I think for any 21st century professional developer this ‘IDE’ is just an ‘IDE’ in quotes. It is basically a bad-programmed notepad. No refactoring abilities, even no normal text search.
C/C++
I just did not want to go C/C++ way. I like programming a lot. I never really liked C/C++. That probably would be the last tool I would have chosen.
Java
I do J2EE stuff at my day job, writing some complicated application for some US pharmaceutical company. J2EE is not my pair of shoes but I have to do it to get paid. But I love Java a lot. Java gives you so many out-of-box libraries that would make any programmer happy. Rich GUI, great Java2D drawing library, net classes, easy file handling – all you need to write a game and much more. Moreover, for free. And great free tools such as Eclipse, NetBeans, Ant, the greatest community of developers, the greatest number of libraries and frameworks. Speed? Forget about it. I am programming on a Celeron-940 machine with GeForce 5600 installed. Such configuration is very common or even a bit old.
LWJGL is a mature framework. There are a few released games based on LWJGL. And it is rather intuitive and transparent – that is what I like in libraries. And it is free - I like it too. I have had too many projects so I know that I should stay away from paying too much for tools and domains or any other stuff - I gave up these projects pretty often as well
So, by now I have written a small scene manager to render sprites with animators, a font manager to render strings in TTF fonts (by using Java2D to create glyphs and to generate OpenGL display lists later).
This is the recent screenshot: 50 fade-ins rotating sprites (sprite node with two animators: rotating animator and fade-in animator). And some strings from the windows “Arial” font and one from the loaded “eclipse.ttf” font. Yoshi is a Sprite class, with different positions, transparency and size. Check out the code that displays the dinos:
Load the sprite:
JAVA:
-
BSprite sprYoshi = new BSprite("resources/test/yoshi.png");
Draw Yoshi sprites:
JAVA:
-
sprYoshi.setAlpha(1.0f);
-
sprYoshi.setSize(256,256);
-
sprYoshi.setPosition(screen.getWidth() - 256, screen.getHeight() - 256);
-
sprYoshi.render();
-
-
sprYoshi.setSize(512, 512);
-
sprYoshi.setPosition(screen.getWidth() - 512, screen.getHeight() - 156);
-
sprYoshi.render();
-
-
sprYoshi.setSize(128, 128);
-
sprYoshi.setPosition(screen.getWidth() - 712, screen.getHeight() - 106);
-
sprYoshi.render();
-
-
sprYoshi.setSize(96, 96);
-
sprYoshi.setPosition(screen.getWidth() - 762, screen.getHeight() - 106);
-
sprYoshi.render();
-
-
sprYoshi.setSize(96, 96);
-
sprYoshi.setAlpha(0.5f);
-
sprYoshi.setPosition(screen.getWidth() - 812, screen.getHeight() - 106);
-
sprYoshi.render();
I could have added many sprites and add them to the SceneManager class to render automatically.
I want to get as close as possible to the simplicity of such languages as BlitzMax. So far so good.
Now I am planning to write a particle manager. I love particles, particles are my passion. Hope to create an extendible and powerful particle engine. I want a lot of great effects for this and my future games.


Entries (RSS)
Comments (RSS)