Njam documentation

 Njam is a full-featured cross-platform pacman-like game written in C++ using SDL library HOME  >>


Adding custom level skins

Njam supports adding more graphical themes to levels. There themes are called skins and they define what game elements will look like. Skin consists of one row of images, each image is 25 x 25 pixels, all saved into single .bmp file. Here are some examples of skins that come with the game:

     Classic (default) skin

     One of the add-on skins

     Another skin

The order of the elements is the following:
  1. Wall
  2. Empty field
  3. Inactive ghost-house
  4. Door
  5. Superpower
  6. Cookie
  7. Freezer
  8. Trap
  9. Teleport
  10. Invisibility
  11. 50 points (only available in single-player game)
  12. Active ghost-house
To install the skin, just add your .bmp file into skins folder of your instalation. The files there are named Back000.bmp, Back001.bmp, Back002.bmp, etc... just take the first free number and use it. The game automatically loads all skins that it founds there. If you wish to play only using your skin, you can select it in Options menu in game.

Note: it is important not to skip the numbers when creating new files.
Note2: Linux users, watch out: B is capital letter B in Back???.bmp

If you make some nice skins be sure to send it to me at: mbabuskov@yahoo.com and if it's really good, I'll include it in the game.


I wrote first version of Njam back in 1999. It was a MS-DOS game that run on my old 486 which I don't even have anymore. It run in 640x480 screen with big 16-color sprites and used internal speaker to beep-out some sound. I used asembler to draw some things directly into video memory, so it doesn't even work on today's machines. The game had 20 cooperative levels, and I was always struggling to pass the 19-th, and actually never passed the whole game. Even then, I was also a two player game. That's how the idea was born. You can see some screenshots of the old game here.

In 2001. I tried to do the same thing with DirectX, and made some of it. I added many powerups (the old version only had superpower working). The networking was also an idea, but I never managed to do it with DirectPlay, so I finally gave up. I wanted it to be great multiplayer game, so only duel type of game was available, but playing one on one became boring after few months.

In 2002., I switched to Linux, and my mind opened towards OpenSource way of thinking. I finally realized what is it all about. Not long ago, I played two great Linux games: Maelstrom and LBreakout2. Both are using SDL library, so I digged and... found the treasure. SDL is just great. So I said to myself: Let's do it. I dig out some of the old Njam sources and started coding. And I also tried recompiling my games on Windows with Cygwin. I got cross-platform version in no-time (just the time needed to copy the sources and compile)... so great that I still don't believe it. SDL also offers networking, and I have finally introduced it in version 0.95. The game is playable on LAN, two, three or four players can compete in free-for-all kind of game. The next step in development was making level editor which is incorporated in the game so that level can be tested at once. This is introduced in version 1.00, so now I completed everything I planned for this game so far. (Some improvements on graphics are needed though). If you have some great suggestions for future development please drop me an e-mail.

Trivial facts and tips

What does the word Njam mean?

Njam is a word from my mother language (Serbian), and it means Yummy. The whole point of the game is eating so bon appetite.

GPS factor

GPS factor shows how good are you at killing ghosts. GPS is a short for Ghosts Per Superpower and shows how many ghosts a player killed per superpower he had. It should be measured by the whole game. The best I managed so far was in some duel match I won 4:3. I had 41 ghosts with 5 superpowers, which equals to GPS of 8.02. During the first level of that match, I ate 14 ghosts with one superpower (my personal best). If someone outmatches this in a regular game, please send a screenshot and it will be included here.

There are three very good ways to kill ghosts:
  1. Get a superpower and invisibility at the same time. The ghosts will not run away from you, and it so much easier then. The invisibility is much better than freezer (option 2) because it lasts three times longer than superpower so you have time to pick it up, then pick the superpower, and then eat the ghosts.
  2. Get a superpower and freezer at the same time. Ghosts stand still so it's easy to kill them.
  3. After you do 1 or 2 get another superpower if available on screen and stand on ghost spawning point and wait. When they come out, you just eat them.

Tips for newbies
 Using level editor

Copyright ©
Milan Babuskov 2003.
Contact me at: mbabuskov@yahoo.com