DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[Tutorial] Map Control - Maps define the game settings - BT
Page 1 of 1
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2256
Location: Ontario
canada.gif

PostPosted: Tue Jan 04, 2005 9:55 am
   Subject: [Tutorial] Map Control - Maps define the game settings - BT
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Back when MCS and Areyep were working on EoD (the beginning), every time that Areyep wanted to change the ceiling and floor textures, MCS would have to hard code it into an exe and send it to him. My idea was to use the maps to control those things. MCS thought it was great and began to code it into his source. I also coded it into my source. We both had different ways of coding it, but in the end they both pretty much work the same way. What we ended up with was a simple and easy way of changing the atmosphere or look of the game by changing things on the map. So map control was born. Pretty simple eh??

What is Map Control?

Map control is simply using the maps to define game settings for each level. You use WALL Tile Values, placed on specific points on the map to define the settings for the game in each level. You can control many aspects of the game via the map... it all depends on what you want your maps to control. Once you have settled on what you want it to control then you code the source to read these defines each time a map is read into the game... using the simple "tilemap[x][y]" variables that the game reads into memory for each level you are playing.

Does it require a special map editor?

No. It's not the Map Editor Program, but rather the Map Editor (the person) who decides what Wall Tile values to place in those specific spots to activate/de-activate certain features. As an example (using the mapedit MAPDATA.WL6 file)... we see:

  
0000
  
0000
  
Undefined
  
0001
  
7010
  
Gray stone 1 (GS)
  
0002
  
700
  
Gray stone 2
  
0003
  
7c30
  
GS-Nazi flag

and so on... well... if you place Gray Stone 1 on the map... it places Value 0001 on the map (or 1). We can take advantage of these values to control things in the game.

How can I use the map to do these things?

Simple... First you must decide what you are going to give control to the map maker... ie: Song played on each level... The floor colour... The ceiling colour... Textures for each (floor/ceiling)... etc.. and then decide where the values for these changes will be stored in the map. For our tutorial we will use the TOP row of the map for these defines.

[1][0] will be the ceiling colour
[2][0] will be the floor colour



So lets look at some code. Lets say that for each level we want to be able to control the floor colour, the ceiling colour and the textures for each (you've got Darkone's Ceiling/Floor tutorial installed).

Darkone's Classic Source removed the VGAClearScreen routine code and replaced it with the following:

::: CODE :::

#define VGAMAPMASK(x) asm{cli;mov dx,SC_INDEX;mov al,SC_MAPMASK;mov ah,x;out dx,ax;sti;}

/*
** Draw Solid Ceiling
*/
void DrawCeiling(byte color)
{
   int halfheight, y;
   unsigned w;

   VGAMAPMASK(15);

   halfheight=viewheight>>1;
   w=viewwidth/8;
   for(y=0; y<halfheight; y++)
   {
      asm mov es,[screenseg]
      _DI=bufferofs+ylookup[y];
      asm mov al,[color]
      asm mov ah,al
      asm mov cx,[w]
      asm rep stosw
   }
}
/*
** Draw Solid Floor
*/
void DrawFloor(byte color)
{
   int halfheight, y;
   unsigned w;

   VGAMAPMASK(15);

   halfheight=viewheight>>1;
   w=viewwidth/8;
   for(y=0; y<halfheight; y++)
   {
      asm mov es,[screenseg]
      _DI=bufferofs+ylookup[halfheight+y];
      asm mov al,[color]
      asm mov ah,al
      asm mov cx,[w]
      asm rep stosw
   }
}


By using these two routines you can now draw the ceiling or floor colours seperately by calling the routines and sending the colour you want it to use when drawing.... The colours are 0 to 255... or ... 0x00 to 0xff (see the wolf palette for the colours).

What is then needed for Map Control is a way to get these definitions to the routines... so we edit the "ThreeDRefresh" routine as follows:

::: CODE :::

/*
========================
=
= ThreeDRefresh
=
========================
*/

void   ThreeDRefresh (void)
{
   int tracedir;

// this wouldn't need to be done except for my debugger/video wierdness
   outportb (SC_INDEX,SC_MAPMASK);

//
// clear out the traced array
//
asm   mov   ax,ds
asm   mov   es,ax
asm   mov   di,OFFSET spotvis
asm   xor   ax,ax
asm   mov   cx,2048                     // 64*64 / 2
asm   rep stosw

   bufferofs += screenofs;

//
// follow the walls from there to the right, drawwing as we go
//
//   VGAClearScreen (); // Original Code replaced by DrawCeiling and DrawFloor

// MAP CONTROL - Use the TOP ROW of the map to set the colours of the Ceiling/Floor
   DrawCeiling(tilemap[1][0]); // Get value from Map location [1][0]
   DrawFloor(tilemap[2][0]); // Get value from Map location [2][0]

   WallRefresh ();

//
// draw all the scaled images
//
   DrawScaleds();         // draw scaled stuff
   DrawPlayerWeapon ();   // draw player's hands

//
// show screen and time last cycle
//
   if (fizzlein)
   {
      FizzleFade(bufferofs,displayofs+screenofs,viewwidth,viewheight,20,false);
      fizzlein = false;

      lasttimecount = TimeCount = 0;      // don't make a big tic count

   }

   bufferofs -= screenofs;
   displayofs = bufferofs;

   asm   cli
   asm   mov   cx,[displayofs]
   asm   mov   dx,3d4h      // CRTC address register
   asm   mov   al,0ch      // start address high register
   asm   out   dx,al
   asm   inc   dx
   asm   mov   al,ch
   asm   out   dx,al      // set the high byte
   asm   sti

   bufferofs += SCREENSIZE;
   if (bufferofs > PAGE3START)
      bufferofs = PAGE1START;

   frameon++;
   PM_NextFrame();
}


It's that simple... Now using whatever map editing program you like, you can place different wall tiles on the top row of the map to change the ceiling and floor colours. You want a black floor... place the "Undefined" wall tile on spot 2 on the top row of the map. Want it to be White? Place wall tile 15 on the same spot...

With this base, you can see that you can have the program look at the map to control many things. My favorite is the Map Control of the song being played on any level.... For that, I changed my code to look like this (wl_play.c file):

::: CODE :::

void StartMusic(void)
{
   musicnames   chunk;
   int holder;
   SD_MusicOff();
   holder = tilemap[0][0];
   if (holder < 0 || holder >LASTMUSIC) holder=0;
   chunk = songs[holder];
//   chunk = songs[gamestate.mapon+gamestate.episode*10]; // original code

   MM_BombOnError (false);
   CA_CacheAudioChunk(STARTMUSIC + chunk);
   MM_BombOnError (true);
   if (mmerror)
      mmerror = false;
   else
   {
      MM_SetLock(&((memptr)audiosegs[STARTMUSIC + chunk]),true);
      SD_StartMusic((MusicGroup far *)audiosegs[STARTMUSIC + chunk]);
   }
}


It uses the corner tile or tile [0][0] on the map to control the song to be played. So if I want song 10 to be played on this level I place Wall Tile 10 on spot 0,0 on the map...




It can't get any more simple than that. That is the basics to what Map Control is, and how it works. It's up to you to decide what you will control in your game and what spots on the map will control those options. It's also up to you to modify your source (as required) to get each of these things to function... I've given you the base, the rest of the changes you will need to make to your code will depend on what features you've added to the game.

To give you and idea of what you can control ... Here's a partial define list for Wolf Advanced (as of this date):

::: CODE :::

 Tile      Description
 
 0, 0    Music for Level  Songs 1 to 60
      // Not Warped
 1, 0    Ceiling Colour 
 2, 0    Floor Colour
 3, 0      Ceiling Texture
 4, 0      Floor Texture
 5, 0    Rain/Snow   0 = Off     1 = Rain  2 = Snow
 6, 0    Fog Effect  0 = No Fog   1 = Basic Density  2 = Heavy Density  3 = Extreme Density
      // Warped
 7, 0    North Warped Ceiling Colour
 8, 0    North Warped Floor Colour
 9, 0      North Warped Ceiling Texture
10, 0      North Warped Floor Texture
11, 0    North Warped Rain/Snow   0 = Off     1 = Rain  2 = Snow
12, 0    North Warped Fog Effect  0 = No Fog   1 = Basic Density  2 = Heavy Density  3 = Extreme Density
13, 0    South Warped Ceiling Colour
14, 0    South Warped Floor Colour
15, 0      South Warped Ceiling Texture
16, 0      South Warped Floor Texture
17, 0    South Warped Rain/Snow   0 = Off     1 = Rain  2 = Snow
18, 0    South Warped Fog Effect  0 = No Fog   1 = Basic Density  2 = Heavy Density  3 = Extreme Density
19, 0    East Warped Ceiling Colour
20, 0    East Warped Floor Colour
21, 0      East Warped Ceiling Texture
22, 0      East Warped Floor Texture
23, 0    East Warped Rain/Snow   0 = Off     1 = Rain  2 = Snow
24, 0    East Warped Fog Effect  0 = No Fog   1 = Basic Density  2 = Heavy Density  3 = Extreme Density
25, 0    West Warped Ceiling Colour
26, 0    West Warped Floor Colour
27, 0      West Warped Ceiling Texture
28, 0      West Warped Floor Texture
29, 0    West Warped Rain/Snow   0 = Off     1 = Rain  2 = Snow
30, 0    West Warped Fog Effect  0 = No Fog   1 = Basic Density  2 = Heavy Density  3 = Extreme Density
31, 0    Light Amplifier - Turn off Shading Time in Seconds
32, 0     Invisibility Time in Seconds
33, 0    God Mode Time in Seconds
34, 0    Secret Level to Go to if on Secret Elevator Floor when Switch Toggled

62, 0      Par Time Minutes    0 = default 2 mins   otherwise 1 to 20 mins
63, 0      Par Time Seconds   0 = :00  1 = :15  2 = :30  3 = :45


I hope that makes it easy for people to understand.

Greg
BrotherTank
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Tue Jan 04, 2005 10:38 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This is a very interesting Feature man Smile , even though I most likey won't incorperate it into Todpfad, it would be very useful for a EoD Editor's Version. One thing is that if people know about this feature in the game, they can take advantage of it, they could play around wiht tiles, but that's highly unlikely because they wouldn't know wtf was what and what goes where.

This feature would be really useful for a 2+ person project or be good for an editor's version as I said.

Great Job! Mr Green
~Kyle

_________________
Steam: http://steamcommunity.com/id/stormx312
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Tue Jan 04, 2005 6:11 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I'm all giddy. THANK YOU SO MUCH BT!!!

Long live BrotherTank!!!

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
WSJ
DieHard Officer
DieHard Officer


Joined: 17 Apr 2004
Last Visit: 08 May 2017

Topics: 24
Posts: 521

blank.gif

PostPosted: Tue Jan 04, 2005 8:46 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I recently created my own method of map control, but it's a bit different because it uses map controller objects placed on specific floor codes instead of using tiles on specific places in the map. When the level starts or when the player teleports, the engine checks to see if there is a map controller on the same floor code as the player... if there is, then the textures/sky/shading/etc is changed depending on the map controller. And a different controller is used for each feature (one to control textures, one to control rain/snow, etc), so you can have many different combinations. True, it does tend to take up map space, but you can place them anywhere on the map. However, I like your method because of its simplicity and it doesn't require a lot of new object defines like my method... Nice work. Smile
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Sun Jan 23, 2005 10:35 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

How can I map define Outside atmosphere and Shading?

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Wed Jan 26, 2005 6:10 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sorry for Double Posting

I was just thinking, say you were using Floor Textures. Would it be possible to use something similar to map defines, and make say, Floorcode AA draw Texture 1, and BB draw texture 5? In other words, floorcodes define what texture to draw on each tile?

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
Guest




Last Visit:





PostPosted: Thu Jan 27, 2005 7:37 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

1.To do this you would have to rewrite the entire textured ceiling/floor code.

Only ripper did this.
Hope he told us how to do it.

2.I gave you that code in the Sky rain topic.
MJR
Bring 'em On
Bring 'em On


Joined: 04 Jun 2004
Last Visit: 13 Aug 2011

Topics: 3
Posts: 93
Location: Finland
finland.gif

PostPosted: Thu Jan 27, 2005 8:10 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

flamer46 wrote:
2.I gave you that code in the Sky rain topic.

Deathshead wrote:
Sorry for Double Posting
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Sun Jan 30, 2005 10:19 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

flamer46 wrote:

2.I gave you that code in the Sky rain topic.


I don't think so. What I mean is multiple Textures in the same level, like in doom.

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
Guest




Last Visit:





PostPosted: Mon Jan 31, 2005 8:35 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

There have been a few discussions in the code crackers section about having different textures in the same level. You can`t do this with Darkone`s code. Ripper did it but that was using more maps to define the ceiling and floor texture.
Ripper hasn`t released the code.

Idea maybe Ripper could tell us how to do this.

I found a site in which this programmer wrote a ceiling and floor texture tutorial for an engine like the one of Wolf3d. Try looking at it.
He wants you to ask him to use the code though.
http://www.student.kuleuven.ac.be/~m0216922/CG/raycasting2.html
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Wed Mar 16, 2005 8:00 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

flamer46 wrote:
I found a site in which this programmer wrote a ceiling and floor texture tutorial for an engine like the one of Wolf3d. Try looking at it.
He wants you to ask him to use the code though.
http://www.student.kuleuven.ac.be/~m0216922/CG/raycasting2.html

I never noticed this link before. Those raycasting topics were pretty fun to read (especially this one). Smile
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Wed Mar 16, 2005 9:03 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This is the page I studied to figure out the multi-texture floor code. Thanks for sharing it, flamer46.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Guest




Last Visit:





PostPosted: Thu Mar 17, 2005 7:05 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

There is no need to thank me adam. You should thank whoever wrote those tutorials. I found those pages on a google search when i was looking for some idea to make some tutorials. Razz
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 15:29 ago.

Topics: 160
Posts: 8007
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Thu May 26, 2005 7:34 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

What parts of the code that BT posted would have to be changed if I wanted the settings to be object-dependent rather than wall-dependent? Some of my levels use nearly all of the 64x64 map. What?
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Thu May 26, 2005 7:48 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I reckon using third plane would be better personally Cool
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 15:29 ago.

Topics: 160
Posts: 8007
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Fri May 27, 2005 10:03 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Do you mean extracting data from the map name, or from an external file?
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Sat May 28, 2005 1:19 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Well, my understanding is that the game uses only two planes when making maps, one for objects, and one for Walls/Floors. Yet one remains unused. So, it would be better using that one to define features.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 15:29 ago.

Topics: 160
Posts: 8007
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sat May 28, 2005 5:53 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You have a good point here, but -

1. This would prevent me from posting the level name in the Loadup screen if it was too many characters long (I don't know for sure whether I'll do this or not, though ...)
2. The far corners of the map can't be used at all during the actual gameplay. So why not put them to use as long as the code requires them to be there?
3. I'm wanting the game to run using the code's "defaults" in case I or another user forget to put the map specifications in. This will make the TC take less time to fully construct, and will make it easier and less frustrating for hackers to construct their own "custom" game. In other words, I want my game to be "hacker friendly".
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Sat Nov 12, 2005 1:14 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sorry for reviving this but I was wondering, would BrotherTank or anyone else know how to get this to work with ceiling/floor textures? I would try myself but all I know is the basics of C programming. If someone could post how then they're could be a possibility of a Todpfad Editor's Version.

_________________
Steam: http://steamcommunity.com/id/stormx312
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Sat Nov 12, 2005 8:48 pm
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

KyleRTCW wrote:
Sorry for reviving this but I was wondering, would BrotherTank or anyone else know how to get this to work with ceiling/floor textures? I would try myself but all I know is the basics of C programming. If someone could post how then they're could be a possibility of a Todpfad Editor's Version.


*Slaps KyleRTCW*

Man, thats the first feature he adds in this tutorial. Read iT!!!

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Sun Nov 13, 2005 4:09 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

That doesn't look like it goes for textures. Only colors. Notice it says Darkone's Ceiling/Floor tutorial, not Darkone's Ceiling/Floor texture tutorial

_________________
Steam: http://steamcommunity.com/id/stormx312
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Sun Nov 13, 2005 4:21 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Anyway, the better way to set map settings externally is building a new utility, then load the settings file. This is how I'm programming Helvete: I haven't rules to follow when building special tiles, and I also have multiple floor textures this way (areas are built while loading the map).
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2256
Location: Ontario
canada.gif

PostPosted: Sun Nov 13, 2005 7:14 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

KyleRTCW wrote:
That doesn't look like it goes for textures. Only colors. Notice it says Darkone's Ceiling/Floor tutorial, not Darkone's Ceiling/Floor texture tutorial


I know it doesn't show the exact thing you are looking for Kyle... But it doesn't take much to go from one specific point controlling 1 thing to the next. For what it is worth, here is the exact code from "advanced", but again, the routines are not exact as you may have so you will have to do some coding on your own to define exactly what you want.....

::: CODE :::

#ifdef MAPCONTROL      // Maps Control Game Settings
   goffset = 0;
   #ifdef WARPING
      if (gamestate.warped) goffset  = 8;
   #endif   
   
   ccolor      = tilemap [1 + goffset][0];  // ceiling colour
   fcolor      = tilemap [2 + goffset][0];  // floor colour
   skytype     = tilemap [3 + goffset][0];    // Sky Type 1 = Night  2 = Parralaxed 3 = Cloudy
   ctext         = tilemap [4 + goffset][0];  // 0 = off - textures 1 to 30
   ftext         = tilemap [5 + goffset][0];  // 0 = off - textures 1 to 30
   rainsnow    = tilemap [6 + goffset][0];  // 0 = off  1= rain 2 = snow   
   fog         = tilemap [7 + goffset][0];  // 0 = No Fog  1 = Fog effect basic 2 = fog strong 3=strongest
   para         = tilemap [8 + goffset][0];  // Parallax type

// Handle Fog Check here

#ifdef RIPPERSKY
   if (skytype == 1) DrawSky (); else
#endif   
   DrawCeiling (ccolor);
   DrawFloor (fcolor);

   WallRefresh ();
   
   switch (skytype)
   {
      case 2: // Parallaxed Sky
   #ifdef RIPPERP
         if (gamestate.textures) DrawParallax (para); //DrawParallax(mapsegs[0][63*64]);
   #else
      #ifdef TEXTURECF
         DrawFlats (2,1,0,0,0);
      #endif         
   #endif         
         break;
   #ifdef RIPPERCLOUD
      case 3: // Cloudy Sky   
      #ifdef SEAMLESS   
         tracedir= gamestate.mapon;
      #else
         tracedir=gamestate.episode*10+mapon;
      #endif      
         if(tracedir>=SKYSEEDS) tracedir=SKYSEEDS-1;
         if(skyseed[tracedir])
         {
            cloudx+=FixedByFrac(tics*skyspeed[tracedir],sintable[skyangle[tracedir]]);
            cloudy-=FixedByFrac(tics*skyspeed[tracedir],costable[skyangle[tracedir]]);   
      #ifdef TEXTURECF
            DrawFlats (3,1,0,0,0);
      #else            
            DrawClouds ();            
      #endif
         }
         break;         
   #endif
   }
   #ifdef TEXTURECF
      #ifndef ADAMTEXT      
         if (ctext >= 1 && ctext <= 30) DrawFlats (1,ctext,0,0,0);   
         if (ftext >= 1 && ftext <= 30) DrawFlats (0,ftext,0,0,0);   
      #else
            DrawFlats (1,0,0,0,0);   
            DrawFlats (0,0,0,0,0);
      #endif         
   #endif
   
#else // No Map Control
// Old way of controlling map colours
#endif


BrotherTank

_________________

The probability of someone watching you is directly related to the Stupidity of your actions
&
The two most abundant things in the Universe are Hydrogen & Stupidity - H.Ellison

Which of those is more relevant to you??
Jaapio
Can I Play Daddy
Can I Play Daddy


Joined: 26 Nov 2005
Last Visit: 11 Feb 2009

Topics: 4
Posts: 32

blank.gif

PostPosted: Sun Nov 27, 2005 2:46 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

So we could use layer 3 to add extra stuff. But we dont have mapeditors that allow that...
If I could get the source code of mappedit (8.5 prefered Wink) I could give it a try.
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Sun Nov 27, 2005 4:40 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Jaapio: WDC and ChaosEdit allow plane 3 editing.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Jaapio
Can I Play Daddy
Can I Play Daddy


Joined: 26 Nov 2005
Last Visit: 11 Feb 2009

Topics: 4
Posts: 32

blank.gif

PostPosted: Sun Nov 27, 2005 5:34 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yes now I see Pln 3. But it is bugged, the buttons to edit are disabled Sad in WDC
TheTalentedMrLeo
Forum Administrator
<B>Forum Administrator</B>


Joined: 14 Mar 2003
Last Visit: 09 Dec 2017

Topics: 35
Posts: 676
Location: Sometimes in Canada
usa.gif

PostPosted: Sun Nov 27, 2005 6:47 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

And what version of WDC do you happen to be running?
Jaapio
Can I Play Daddy
Can I Play Daddy


Joined: 26 Nov 2005
Last Visit: 11 Feb 2009

Topics: 4
Posts: 32

blank.gif

PostPosted: Sun Nov 27, 2005 7:06 am
   Subject: Re: [Tutorial] Map Control - Maps define the game settings -
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Version: 1.14.330
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Code] Add Text to Screen at Skill Level select - Chris
Author: Chris
3 2439 Tue Sep 28, 2010 6:59 pm
Tricob View latest post
No new posts [Code] Display Different Ammo Types on Statusbar-BrotherTank
Author: BrotherTank
1 2381 Fri Feb 11, 2005 9:18 pm
Zombie_Plan View latest post
No new posts [Code] Changing an Enemies Attack Strength - BrotherTank
Author: BrotherTank
0 1969 Tue Jan 27, 2004 10:29 am
BrotherTank View latest post
No new posts [Code] Changing Weapons -CheckWeaponChange- BrotherTank
Author: BrotherTank
2 2700 Sun Oct 26, 2003 1:21 am
Guest View latest post
No new posts [Help] Different Enemy Dying Frames/Views
Author: Guest
7 607 Tue Jul 29, 2003 3:00 pm
Codetech84 View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group