Jump to Main Content

About the CF tile system: (BETA)

Graphics are multi-tiled and animated.

A single tile is 32x32 pixels.

The tiles can be stored in any format - 16 colors, 256 colors or true color. Because of open pnglib every client/program used can transform them into the right format.

** for rendered true color tiles with more then 256 colors please use RGB black (0,0,0) as default color key, for pngs <256 colors please use a 256 palette picture **

Remember: Because the png 16/256 palettes stores the pixel as true color, we always have the color information as true color. So, we use ALL color information.

** Because the server SENDS the png files to the client, the set can be changed at any time **

Every time a player logs in, the server sends the tiles (tile name and checksum) to the client for all visible tiles.

Get the rest of the information from server-check.html file

The server use a dirty map for it, so he knows which tile the user knows and he send it only one time.

This will avoid lag. When the client doesn't have the tile in the cache folder (from older logins or pre loaded from a library file) or he has an old tile, the client requests the png from server and it's resent.

Map Editor and Random maps

Maps are worked out with a map editor. CF use a very very complex real time engine for animate/control the maps. In fact, you can build crazy complex machines, whith levers, teleporters, moving boulders, creators, sensors .... and so on.

There are maps out, which have so complex "engines" inside player can trigger to do some, development team need weeks to find out how because the guy who created them is gone...

WHAT WE REALLY NEED:

Is graphics for multi tiles structures. So, big pyramids or some else. Or terrain with big mountains etc.

** in fact you can render a whole map and put it in ' at once' as one map **

Because you can put maps easy to a server with new tiles who get sent to client, you are free to draw ALL you want.

btw: every graphic or tile is an object in cf. Every object can be given object attributes.

So, a simple floor tile is the same object as the player - except the flags are different and the server/client handles appropriately.

Certain events can give a tile/object new flags and then he will treated as something new

Crossfire also has a random map generator like nethack and other games.

Animation and Multi Tiles

Every object (remember, that a simple floor tile is an object) you attach a graphic - in this case a png.

Lets use floor.png as a graphic.

At first, you predefine a standard object which get attached with a picture. For the ground it is the simplest object.

Now you can extend this object. To animate, you put in a animate command. For this (and for other multi-tiles) you use this naming scheme:

floor.111.png

This is the first tile of an animation. Every picture use this format, even when there is no animation. This make it easy to extend a picture with more animation. Simply add the animation command ine the object and put a

floor.112.png

in the picture library. You also enter in a speed value and then the client (or the server) is able to play the animation.

For isntance:
floor.111.png then floor.112.png then floor.113.png and so on. This can be extended to floor.119.png

This is only an animation STEP. You can add more STEPS to more complex animations. This removes the 10 frame animation limits. For example, when you look in different direction with your player picture, every step has a single animation row...

Creating multi-tiled objects

This goes from x=1 to 10 and y=1 to 10. So a 3x4 or a 2x6 or a 1x9 monster is possible!

As an example, lets think about a 2x2 monster. It has 64x64 pixels and is made up of 4 tiles.

The tiles are placed in the following position:

AB
CD

The monster is "made" with these 4 .png's:

monster.111.png = A Position
monster.121.png = B Position
monster.211.png = C Position
monster.221.png = D Position

As you can see, the first 2 numbers in the file name indicate position in the multi-tiled object.
It is possible to have a 320x320 monster possible... Crossfire already has a monster that's 6x6!

(in later versions, we can change this to 2 chars. like monster_A.111111.png. This will make 99x99 tile object with 99 standard animations... but really... you don't want do draw often a 600x400 pixel monster with 20 animations :) If you do, we make the changes asap :)) )

Now, if you want to have this monster move in a different direction (a different STEP):

monster2.111.png
monster2.121.png
monster2.211.png
monster2.221.png

Now the trick: For every tile, you can still use normal frame animation.!

In this example, we will have the monster move the head from left to right...
This will be played from default tile animation system.

monster2.121.png
monster2.122.png
monster2.123.png

As you can see, with this system, you can do very very complex situations and animations.

What that means for an artist?

Simply draw sets of animations with the full picture like you make it for comic movie.

** You don't need to cut them in 32x32 tiles!!! **

Now a guy who has access to a server or the CVS create the object with animation data for it.

Also, the "cut off" to 32x32 will be done from him.

** You can give us every animation you can draw in normal "movie style" **

Palettelized Sprites

For the 256 colors we will go to palettelized sprites - means we change the palette by client "on the fly". This will end up in the Diablo 2 monsters, where the special monsters have fancy colors, but use the same graphic data. Or in Age of Empire, the walls have a painting in player colors. There is a mask above them with a changed palette for every player. CF will do the same. The palettes will pre defined, so many pngs/monsters can use them.

Example for a orc having the orc.png as tile:
The server then will tell the client for a palettelized monster simply: "show tile 'orc.png' (and use the original palette of this png). For the chief orc, use same tile, but use palette 5.

This will then show the orcs "normal" because every palettelized png come with a default palette - even the one who in the png file. The chief or but will shown in different colors.

The "palette 5" palette is nothing more then the png "palette_5.png". This png has no graphical data (it has, but it is only a 1,1 picture - the client/server ignore graphical data). The client safe it and then he rip of the palette when needed and attach it to other pngs.

The big big plus of this is, that the information of the different color styles are in the monster data NOT in the graphic data. So you can crate a new city, getting the standard guard but attach in map editor a different palette to them, so they show up all with blue shields for example - different from other cities. Look for Diablo 2 and other games using it for getting more ideas.

I talking about this, because i saw in many tile sets the same monsters in 4-6 different color styles. Using a set of pre defined palettes with different "ground" and "changing " colors will rip you off of all this same graphic. In fact, if you use so a set of pre defined palettes, you get automatically the different colors if you draw a new monster/graphic.