Developer diary

Kleum, proto-20110930

New prototype version !

Click here to launch prototype

You need at least java 1.6 installed on your computer, that’s all, Kleum is a java applet, it does not need special security settings, just launch and test !

Changes :

  • Snake sprites updated : with tail, head and body
  • Collision detection updated : collision with walls and other sprites
  • Snake size : use + or – key to change snake size
  • New level

How to use the prototype ?

  • When snake is stopped, press any arrow key to ‘launch’ it in the specified direction
  • When snake is moving, press Left or Right arrow key to move it Left/Right (from snake point of view)
  • Press space key to toggle camera smooth movements on and off
  • Press + or – key to change snake size

Now I will need to work on making more content : levels / sprites / textures

Read more

Kleum, proto-20110929

Second version of the prototype

Click here to launch prototype

You need at least java 1.6 installed on your computer, that’s all, Kleum is a java applet, it does not need special security settings, just launch and test !

Changes :

  • A snake will be displayed at startup
  • When snake is stopped, press any arrow key to ‘launch’ it in the specified direction
  • When snake is moving, press Left or Right arrow key to move it Left/Right (from snake point of view)
  • Collision detection, snake will stop moving when hitting a wall, not when hitting itself
  • Switch from smooth camera movement on/off by pressing the space key (will lower fps a lot when on at the moment)
  • Keyboard buffering system
  • Sprites management
  • Use of Java buffer strategy
  • Removed FPS cap


Read more

Java 2d tips and tricks (part 1)

After 2 weeks working with Java2d, here are some little tricks to help optimize your code

Don’t create too many intermediate Graphics

Creating a Graphics is quite long, and usually it’s not the good way to do stuff.

You should try to think all your rendering process with the less Graphics object creation (getGraphics, createGraphics,…), if you can just use the one given by the paint method (or the one from your double buffering system), and pass it as argument in all your rendering functions to directly draw on it.

Try to stick to environment image format

If the display image format is not the same as your application, rendering can be very slow, usually to create an image you should just use the createCompatibleImage function

public static BufferedImage createCompatibleImage(int width, int height, boolean transparent)
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = gd.getDefaultConfiguration();
BufferedImage ret = gc.createCompatibleImage(width, height, transparent ? Transparency.TRANSLUCENT : Transparency.OPAQUE);
return ret;

Don’t use transparency when it’s not needed

Operations with image using transparency take more time than without, try not to use transparency when it’s not needed. I’m sure you can find some places where it’s not useful : your screen is not transparent, so a few things could certainly be rendered with no transparency…

Use the correct environment variables

On my Linux system I had a very low frame-rate (~ 20fps), and was quite disappointed, but it was just due to a VM parameter, when I set it, the frame rate increased to ~200fps :


I don’t really understand why this parameter changed so much the frame rate, help and other parameters can be found on the oracle website :


That’s all for this tips and tricks post, if I find other useful stuffs, I will make other posts.

Read more

Kleum, proto-20110927

Here’s the first prototype version of Kleum, it does not do much for now, it’s just a technical release. I’ll try to make regular prototype release from now on.

Click here to launch prototype

You need at least java 1.6 installed on your computer, that’s all, Kleum is a java applet, it does not need special security settings, just launch and test !

At the moment there is no much to see, basically, what you can do is :

  • At launch, move the camera using arrow keys
  • Press A to spawn a sprite (yellow cube), the camera will self-center on it
  • Press ZQSD to move the sprite (sorry, no other keyboard layout in this prototype, it will come later)

But technically, a lot is being done that can not be seen in this simple demo :

  • First version of my Isometric engine : layer support at different height, basic shadow system, edge coloring, …
  • Load levels from xml files generated by Map Designer
  • Dynamically load texture (not sprite for now)
  • Camera system (absolute or follow a sprite)
  • Viewport management
  • Buffering system

I’ve capped the FPS at 240, as I want to see if everything is correctly optimized. Of course there is not that much to display at the moment (no animation, basic sprite movement) but frame rate is good.

The prototype has been tested on :

  • Netbook @ 1.5 ghz, Windows XP, Firefox
  • Netbook @ 1.5 ghz, Ubuntu 11.04 Firefox (sun jvm)
  • PC @ 2*3.33 ghz, Ubuntu 11.04 Chromium (sun jvm)

Next version soon…

Read more

Kleum Z80

Released in March 2002, this game was built for texas instrument ti83 calculators (would cause crash on ti83+)

The game is still available on for those who still have a ti83 calculator and know how to install ion and an assembly game.

Download @


Full game, extra levels and source code are available (Assembly Z80 source code)

Read more

Using SDL with c#

In order to make my level editor I decided to give a try to DSL. After performing some researches, it seems there’s only one valid option to do SDL with c# : SdlDotNet

Sadly support is not good, and questions remain unanswered on forums, but still, it works enough for me to use it and make a little beginner guide.


Simple DirectMedia Layer (SDL) is a cross-platform, free and open source multimedia library written in C that presents a simple interface to various platforms’ graphics, sound, and input devices.


For the level editor I am using this library to load, display, and manipulate thousands of sprites (tiles). Currently I am only using the 2D display part of this library.

SdlDotNet is the wrapper for .net platform, it supports Microsoft .net framework and mono (linux, mac, windows), and give an object oriented approach to SDL (SDL being written in C, it’s not an object oriented library).

In order to use in your project, simply :

  • download the runtime
  • create a reference to the two provided dlls in your project
  • copy dependencies to the release directory of your project

Executable should work now under Microsoft .net framework and mono

Simple example

For the level editor I needed to use a control to display objects in the program itself, SdlDotNet provides a SurfaceControl for this, simply add the control to your toolbox, and insert it your main app.

When this is done, you have access to the most important function here, SurfaceControl.Blit that will allow you to insert a Surface object to display. The Surface object is just like an image that you can manipulate :

  • Rotate
  • Duplicate
  • Extract elements
  • Insert other surfaces/sprites

Surface can be created empty, with an external bitmap, or by transforming another Surface. For our example I will create a first empty surface, then load an image, insert it twice in the first surface and display everything in my SurfaceControl :

Surface surface = new Surface(100, 100);
Surface item = new Surface((Bitmap)Bitmap.FromFile(“example.png”));
surface.Blit(item, new Point(0, 0));
surface.Blit(item, new Point(20, 20));

This is all the basic that you need to begin, then I suggest you to go through the guides and api references on official website.


I came into some error when playing with, mainly because PNG support is poor because of the Alpha Mask, you will sometimes end up with black images instead of what you were looking for. In order to help you I would suggest that you insert SdlDotNet project sources into your own project, and debug it yourself : usually you just need to change Alpha Mask to its default value (0) for things to work.

As I don’t know the side effects of this modification, I won’t commit any changes to official project.

Read more

Kleum For Windows

This was my second Kleum game (released in 2002), built for Windows environment :

  • Multiplayer support (on the same screen, cooperative)
  • 51 levels
  • Powerups
  • Score and bonuses
  • Level editor (switch language if needed)
  • Level passwords for saving progress

I could successfully play it under Windows XP and Ubuntu (using wine, vb6 dlls, and setting a 800×600 virtual desktop in winecfg).

Sadly source code (visual basic 6) was mostly lost in an hard disk crash (what remains is partially corrupted), I am not even sure I am releasing last version.

Download here !

Read more

Kleum For Dos

Kleum for dos was the first ever release of kleum (a snake game with nice hand made levels), latest version was released in August 2001 (first in ~ 1998), this game features :

  • Multiplayer support (on the same screen) : cooperative or deathmatch
  • 39 levels, 5 arenas (for multiplayer)
  • Powerups
  • Score and bonuses
  • Level editor


The requirements are quite small 🙂

  • ms-dos (or fully compatible) system, works fine on dosbox
  • Intel 80386 or above computer (works fine on Pentium and current computers)
  • 648kb RAM


It seems the video mode I was using is not compatible with VirtualBox (I have not tried VMware), but it works perfectly fine with dosbox. I would suggest lowering speed in order for the game to be easier (there’s a small speed difference on actual computers).

On first two launches it will create some configuration files, just launch it three times to play.

Full source code is included (QBasic 7.1)

Download here !

Read more

Map Designer (preview)

The Map Designer will be a free tool to create/edit and publish maps for my games.

It will be based on Xml definition file for all properties, making it opened and usable for your own games.

Here is a screenshot of current version, featuring :

  • Isometric view
  • Render driver : Sdl or .net
  • Open/Save levels in Xml Zipped format
  • Selection/pen/fill tools

Textures are just random stuff homemade or adapted from First Seed Material

Read more

What’s going on here ?

To those who got lost and end up here, here’s an explanation of what you will find !

Here I will talk about some of my ongoing projects, mostly games :

  • Kleum : a small snake game, mostly for proof of concept and testing my rendering engine
  • Snorms : a fully featured shooter & resource-management game to be released this year
  • <No name yet> : a tower defense/attack game
  • <No name yet> : a mmo rpg

All those are indie games, the first three made by a one man team, and the last one by a small team.

And to the developers, I will publish some articles linked to my work.

Read more

Page 38 of 38« First...102030...3435363738