[CF-Devel] S2C map head information and map data caching

Michael Toennies michael.toennies at nord-com.net
Tue Jul 17 08:58:21 CDT 2001


Hi

This is something is noted some times before, but with the new SDL client, i
can know implement it.

I just finished the sound stuff, so the SDL client yet has the full dx
client sound... nice.

Well, at the moment the client knows nothing about the current map the
player is in.
Not the size, not the name, etc.

What i want include in the client is a automap feature!

This is another sacrifice of the map layer thing.
For automap i don't need to know the moving objects like monsters, i just
want see the "structure"
of my surrounding.

2nd is that we want include ambient sounds - for this i must know which one
or the type of dungeon
we have.

Also, i want show the name where we are (if player should not know it, make
it unknown).

For this, i prefer to send a maphead cmd to the client.

In this maphead is the
 - name
 - xlen
 - ylen
 - ambient sound 1
 - ambient sound 2
 - sound source 1
 - sound source 2

name should be clear, also xlen/ylen - this is need to setup a useful
caching structure for the map.

The caching itself is easy... just copy the map stuff in the cache structure
of the client. Then i
make a automap with it.

The problem is, that the client also must know then the position in the map
where the player is.

This give us a REAL new point: If the server also knows that the client
stores the floor layer data,
the server can use dirty flags too! So, he don't must send a unchanged floor
tile twice for a map!
This will shrink the map cmd for nothing...!

Ambient sound should be clear - background sound the client plays at
random - like dropping water
for a dungeon, bird noices in a wood, etc.

Sound source is somewhat different. Its like we set a water noice in the
river or something like this.
There is not "real" way to handle this generic. You don't want set a sound
source fore every river tile
- it will end in wild sound roaming.

There is no need to submit this with the map cmd - better let calculate the
sound range from the client.


    
    


More information about the crossfire mailing list