The Dink Network

Reply to My own game pt. 2

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
May 1st 2006, 11:40 AM
fairy.gif
In a previous blog message I posted how I started developing a game. Here's the next part, where I'll post some screenshots.

What I've done so far (over the last months, between a lot of work for university), is building the tile-based engine to render the world, a system for actors and sectors, and the editor. While sprites like monsters and projectiles are already supported, there's no AI or gameplay yet to use them, and no buttons in the editor yet to place them.

Everything from the game is loaded from a script.txt file, read by a token parser. Here's what the script currently looks like:

/////////////////
tiletex
{ tile(file "tiles.png", alpha pinkkey) tile(file "trees.png", alpha pinkkey) tile(file "house.png", alpha pinkkey) tile(file "shadowtiles_black.png", alpha pinkkey) tile(file "shadowtiles_white.png", alpha pinkkey) tile(file "shadowtiles_ghost.png", alpha pinkkey) tile(file "clouds.png", alpha particle)
}
spritetex
{ sprite(file "player.png", size 32 64, alpha pinkkey) sprite(file "monster.png", size 32 64, alpha pinkkey) sprite(file "projectile.png", size 16 16, alpha pinkkey)
}
playertex
{ 0
}
////////////////

However, much more sections and features for the script are planned, including sections for events (simple C-like code), NPC dialogues, stats, items, damage types, ...

Here are some screenshots, kindly hosted by ImageShack, as long as the images are available on there:

http://img529.imageshack.us/img529/6338/screen16av.png
http://img529.imageshack.us/img529/3092/screen25pu.png
http://img529.imageshack.us/img529/1548/screen30ps.png
http://img529.imageshack.us/img529/3092/screen43in.png

My coding environment:

http://img416.imageshack.us/img416/7707/thecode6dg.png

The graphics were drawn in KolourPaint. I'm however planning to improve them to look a bit more realistic as I try to gain more drawing skills, though I plan to keep the basic shapes. The front view perspective of everything isn't as nice as the iso-view in Dink, but I'm planning to keep it like that for simplicity.

The game engine is written in SDL with OpenGL, and requires no other libraries than those two.

The world is made out of 8 layers of tiles of 32x32 pixels. The first 4 layers are drawn below sprites, the other 4 layers are drawn above sprites. The tile layers are organised in sectors of 64x64 tiles each, which is only noticable in the editor, in the game you can't see the borders between sectors, and the map scrolls as you walk. The map files are saved with runlength encoding to achieve some compression. The textures are read from png files, with a png decoder written by myself to avoid havign more library dependencies.

For collision an extra layer is used that sets a collision type for each tile, with collision types such as walkthrougable, non walkthroughable, only walkthroughable for flying units, sliding ice, fall-down tile, thin border, ...

The tiles use 32 bit color and have an alpha channel for transparency, that will be used for shadows, ghost-monsters, translucent spell-effects and translucent clouds. Because painting programs are good at making it very hard to edit the alpha channel of a png file, you can also just draw an image without alpha channel and make the game calculate the alpha channel for you based on different alpha types such as using the pink color as key, or making the alpha channel equal to the brightness of the image.

The GUI for the editor and game is one that's written by myself and works in OpenGL. The GUI supports buttons, checkboxes, scrollbars, draggable windows, ...

The editor and game are merged in the same executable. The map format is simple enough to allow one to make a separate editor to edit such maps.

I have no name for the game yet. For the gameplay, I'm going to choose for a style similar to Dink Smallwood, that is, somewhat homouristic, not too complex stats, but RPG-like. I haven't really thought about the story yet, because I think a story will come on it's own once I start mapping.