
/**********************************************************************************************************************/
/*****                                                                                                            *****/
/*****  >> Thanks to id-Software for all the great games like: Wolfenstein 3D, RTCW, Doom 1-3, Quake 1-4, ... <<  *****/
/*****                                                                                                            *****/
/**********************************************************************************************************************/

I wanted to make a simple and fast 3d engine, suited for the psp:

D U N G E O N S  3 D

Engine / programming by charnold (charnold@gmx.de / www.caweb.de)

/**********************************************************************************************************************/

Some infos for modders:

Dungeons uses files in md3 format for weapons and enemy models.

New levels can be defined in ascii files (map.txt) and added to the levels.txt.

Dungeons creates a log file (protokoll.txt). Check this to find out, how much memory is left after your level is loaded.

/**********************************************************************************************************************/
/* Example to set a weapon in the weapons.txt file ********************************************************************/
/**********************************************************************************************************************/

plasma type_1 damage_4

- Max. 3 weapons are loaded

/**********************************************************************************************************************/
/* Example to set a model in the models.txt file **********************************************************************/
/**********************************************************************************************************************/

[model]
ranger life_4 scale_0.22 y_offset_5.2 rocketstart_forward_1.0 rocketstart_right_1.95 rocketstart_up_-1.85

[weapon]
plasma

[skin]
blue
default
red
wrack

- Max. 3 enemy models, each with max. 6 skins
- All 2d enemies have 8 lifepoints

/**********************************************************************************************************************/
/* levels.txt *********************************************************************************************************/
/**********************************************************************************************************************/

You can display some info about your mod in the main menu with this option:

[modinfo]
+++ you're playing engine test levels +++

Then comes a list of all levels (must be the names of the level folders, these names are also displayed in the game):

Testlevel1
Testlevel2

- Max. 128 levels

/**********************************************************************************************************************/
/* Some info about the map.txt format *********************************************************************************/
/**********************************************************************************************************************/

- If [usevis=on] is defined, a map.vis file must be created (holds information of visible tiles for faster rendering).
- For testing a level without using a vis file, set [usevis=off].
- A new map.vis must be created, if blocks are added to or deleted from the map.
- The vismaker.exe (for windows) must by copied into the dungeons folder.
- Creating the map.vis can take some time for bigger levels.

/**********************************************************************************************************************/

To play a wav file in the level, just define:

[music]
nightmare.wav

The wave-file will be played in a loop.

/**********************************************************************************************************************/

The [map_textures] section lists all textures that are used in the map.

- The psp vram is fast but has only space for about 7 128x128 pixel textures (per map), so don't load too much into 
vram (with vram_1). Use it only for textures that are most used in the map and set vram_0 for all other textures.
- With mipmaps_1 / mipmaps_0 you can turn on/off the automatic mipmap creation for each texture.
- If you supply your textures in 256x256 pixel size, the engine will load and render all pixels. To save space and for 
faster rendering convert them (IrfanView) to a lower size like 128x128.
- 256x256 pixel is the current max. supported texture size.
- The pf_x option sets the texture's color quality (pf_4444, pf_5551 or pf_5650 for 16bit, pf_8888 for 32bit per pixel).
- I used a 16 bit format for almost every texture, it is a lot faster than 32 bit.

/**********************************************************************************************************************/

The [map_tex_characters] section connects one or more textures to a character.
(the characters are used later in the map_tex section)

Move and glow versions in [map_tex_characters] definition:

move:
0 = no move
1 = x+ slow
2 = x+ fast
3 = x- slow
4 = x- fast
5 = y- slow
6 = y- fast
7 = y+ slow
8 = y+ fast

glow:
0 = add full
1 = add sinus slow
2 = add sinus fast
3 = add sinus very fast
4 = add linear slow
5 = add linear fast
6 = alpha blend (blue = transparent)

- map_tex_char_* (textureslot_1_1) and map_tex_char_0 (textureslot_1_1 for floor and textureslot_2_1 for ceiling) 
must be defined in every map.

/**********************************************************************************************************************/

To use special door textures in a level, define: (example).

[door_textures]
standarddoor_use_texture_nr_014 switchdoor_use_texture_nr_013

/**********************************************************************************************************************/

Map-characters for [map_obj]:

y = level entry
x = level exit

D = standard door (opens autom.)
H = hidden standard door (opens autom.) (for the texture the engine searches a solid tile in n,s,w,e direction)

a,c,e,g,i,k,m,o = switch (visible)
b,d,f,h,j,l,n,p = door
A,C,E,G,I,K,M,O = door (hidden)

q,r,s,t,u,v,w,z = switch (invisible)
Q,R,S,T,U,V,W,Z = door (hidden)

(switch a opens all 'b' and 'A' doors, switch c opens all 'd' and 'C' doors, switch q opens all 'Q' doors ...)

Only one switch of the same character is allowed per map. One switch can open up to 16 doors
(you can place several same door characters in a map).

1 	= 3D enemy walking up (until hitting wall or path marker or seeing player)
2,4,6,8 = 3D enemy standing and looking down,left,right,up (until seeing player)

%	= 2D enemy walking up (until hitting wall or path marker or seeing player)
",$,&,(	= 2D enemy standing and looking down,left,right,up (until seeing player)

|,!,<,>,\,/,´,` = path marker for walking enemies up,down,left,right,upleft,upright,downleft,downright

Some more info about the [map_obj] part:

The only valid characters in this part are * (for solid blocks), blank for free tiles and the special object characters
for entry, exit, switches, doors, enemies, path markers ... described above.

The maps must be closed (surrounded by * characters).

/**********************************************************************************************************************/

Map-characters for [map_tex]:

A-Z and * : used for textures of solid blocks (defined in the [textures] section)

0-9, a-z  : used for textures of free tiles (defined in the [textures] section)

Some more info about the [map_tex] part:

This part of the map.txt is optional. You can make a map without it and add it later. (At the end, you should at least
add a special texture for the exit)
If there is no [map_tex] part, the mapchar_* texture is used for all solid blocks 
and the mapchar_0 textures (for ceiling and floor) are used for all free tiles.

The only valid characters in this part are the characters you defined in the [textures] part and blank.
(it doesn't matter, if you place 0 (zeros) or blanks).

/**********************************************************************************************************************/
