MBolus@Posted: Sat Sep 18, 2004 8:41 am :
MBolus Tutorial: Monsters on the Walls, Part 1


Image

http://img89.exs.cx/img89/1313/impceilnwallnfloor01a.jpg (click link for larger image)

Image

http://img9.exs.cx/img9/8651/viviroom12a.jpg (click link for larger image)

Welcome to my tutorial, which discusses some methods to persuade monsters to walk on your walls. I became interested in this a month ago, when I saw Doom 3; this was my first exposure to Doom Edit or Radiant, and I began testing ways to get monsters to do these things. At this time I will avoid methods that alter the game’s files. By popular demand, I will also delay presentation of heavy scripting until a subsequent part.

First, please take a quick run through the rudimentary map I made to illustrate some of these methods. (As usual, you can just extract into the maps directory which is within your base directory.)

Click any of the following link(s) for the version you want:

http://www.mnemic.tk/education/writtentutorials/files/MBMonsWallPart1a.rar

If you notice anything of interest as you play through the map once or twice, this should be right for you! If not, check Part 2 next.

As I indicated on Doom3World.org a few weeks ago, one good method to alter a monster’s sense of gravity is to enter a value for its key gravityDir. In this tutorial you will see multiple different values for gravityDir along with their effects. A value of 0 essentially allows free floating like in a weightlessness chamber, or similar to swimming in some other fluids. Very high or low values can be used as you will see, as well as values around -1 or 1 as I had also indicated. Fractions in the vicinity of -.5 or .5 permit quite extreme jumping from walls. Shown in the screenshot below, I have assigned a gravityDir of -180 to monster_demon_maggot_3, which is highlighted in red on the orthogonal view. Although I have not yet seen this usage described, I have found that it can be helpful to use appropriate values for the angle as well, which in this case I have set to -2.

http://img19.exs.cx/img19/6051/magviviroom22a.jpg

In the entity info in the lower left of the screenshot, you will incidentally see a reference to smoke_wound_flesh. As I also mentioned on Doom3World, it is good to experiment with this for some visual effects; I used this effect somewhat boldly in the Impish Playroom on my map, but moderation can be good depending upon your purposes. This part of my map was / is larger, but I trimmed it down to focus it on the goals of Part 1. (While on the subject of the map, please realize that I won’t be requiring much constructive criticism quite yet, as I know a lot of areas I need to improve greatly; this is just a quick map to get these ideas out to you quickly. Similarly, I will be happy to edit this tutorial as needed, especially if a lot of people don’t understand certain areas and desire deeper elucidation. I do welcome Personal Messages if you would really like to offer recommendations on my embryonic mapping skills after having only a few hours with the editor so far, but no worries I have much to explore and I will get there. I don’t want to distract from the purpose of this tutorial / thread.)

http://img9.exs.cx/img9/3724/telviviroom22a.jpg

My stripped down teleporter for this map uses a linked speaker which has s_shakes set to 1, and uses a couple of trigger relays which can be enhanced for various purposes; see the screenshot above. The speaker is depicted in red on the orthogonal view, and is set up so the strong rumbling at the teleporter source is sensed like an aftershock at the destination. The latter has a mirrored wall and floor, which gives some nice symmetry; although I have developed it more than this, I don’t want to alter this tutorial map at present because of limited time. Upon landing, the destination lights fade in.

http://img19.exs.cx/img19/1331/mirroredhall01s.jpg

http://img9.exs.cx/img9/337/mirroredhall02s.jpg

http://img19.exs.cx/img19/8471/impishfloor01a.jpg

The Impish Playroom, which was pictured at the start of this tutorial, has more action. The side view above demonstrates the func_mover in red, which is sent to the blue func_static when the player eliminates the blue jumping imps which swing off from the lights. This is accomplished by a trigger_count: see the blue arrows connecting the blue trigger to the imps on the lights in the orthogonal view below.

http://img19.exs.cx/img19/3240/impishceil01a.jpg

The trigger calls the following script, which is included within this map’s .SCRIPT file. As seen, the func_mover takes 0.2 seconds to move to the linked func_static once it is triggered. I didn’t bother with a special name here, although I probably would on a different map.

Code:
void move_platform_floor_1 ()                             //
{
     $func_mover_1.time(.2);
     $func_mover_1.moveTo ( $func_static_11 );
     sys.waitFor ($func_mover_1);                    //
}

Another method of getting monsters to appear on the ceilings and walls is to use anims. In the screenshot above, a red imp is depicted on the orthogonal view. It is waiting to be triggered to spawn in, so its spawner key is set to 1. On_activate is set to roofcrawl, which is what it does when it spawns. Just below the blue STTP3 machine, you see a red arrow pointing downward. It is important for you to be aware that this is the arrow for that imp; for example, you can drag that arrow to position the imp, and you will also know that it will land in the pit at the center of the room. Just to his/her/its right you will see the imp that previously crawls down the wall and slams into the STTP3 machine on its way to get the player. Much of the rest is self explanatory, with the exception of my simple scripting to make monsters appear to follow you all the way around the walls. If you see an orange firy imp near the ceiling as you play with this map, go clockwise around the wall and he will probably follow you for a while, but eventually he will jump down to the floor to improve his odds.

A few weeks ago I spoke of dynamic modification of gravityDir, and I will explain some of this below. There are a few ways I have done the scripting, but this tutorial’s method will be easy for many readers to follow, although it is a bit tedious. For the present map I used triggers which call functions. One of the functions addresses an entity within a certain area of arbitrary size, and randomly assigns it a different gravityDir. In one of the examples below, it actually removes any reference to gravityDir, and respawns the imp.

Let’s discuss the other example in a bit more detail before wrapping this part up and getting back to the game! One approach I take is to use a trigger that responds to a specific entity and passes that entity information to an appropriate function. This is one of the ways which can be used to help an imp which needs to change its gravity direction so it can continue on its path. If monster_demon_imp_crawler_14e is getting as far as it can reach, the trigger may call make_imp_14w( ), which calls make_imp_w( ) with the specific entity $monster_demon_imp_crawler_14e. The latter function is set up to get the imp’s location, modify its position to keep it free from the wall, change the last letter of its name to w, change appearance and other features as desired, and of course handle its gravityDir, setting it to -1 in this specific example. Easy as pi. As I can explain subsequent tutorials, however, our scripting can get heavy indeed.

Code:
void make_imp_w (entity ent_mon_this)                     //
{
float  mon_name_len ;
string mon_name_new ;
vector mon_pos ;

     mon_pos=ent_mon_this.getWorldOrigin();
     mon_pos+=('-16 0 0');                                //adjust to keep free
     ent_mon_this.remove();                               //can do now or later in fn
//   sys.setSpawnArg("origin",mon_pos+('-48 0 8'));            //save this line for potential changes
     mon_name_new=ent_mon_this.getName();
     mon_name_len=sys.strLength(mon_name_new);
     mon_name_new=sys.strLeft(mon_name_new,mon_name_len-1)+"w";    //
     sys.setSpawnArg("name",mon_name_new);                //
     sys.setSpawnArg("origin",mon_pos);
     sys.setSpawnArg("fov","340");                             //
     sys.setSpawnArg("smoke_wound_flesh","newsteamyred");      //
     sys.setSpawnArg("smokeParticleSystem","flamejet-head");   //
     sys.setSpawnArg("gravityDir", "-1");
     sys.spawn("monster_demon_imp_crawler");                   //
}

void make_imp_d (entity ent_mon_this)                     //
{
float  mon_name_len ;
string mon_name_new ;
vector mon_pos ;

     mon_pos=ent_mon_this.getWorldOrigin();
     mon_pos+=('24 0 -24 ');                               //adjust to keep free
//   sys.setSpawnArg("origin",mon_pos+('-16 0 16'));           //save this line for potential changes
     mon_name_new=ent_mon_this.getName();
     mon_name_len=sys.strLength(mon_name_new);
     mon_name_new=sys.strLeft(mon_name_new,mon_name_len-1)+"d";      //philosophically still the crawler anyway
     sys.setSpawnArg("name",mon_name_new);                //
     sys.setSpawnArg("origin",mon_pos);
     sys.setSpawnArg("fov","320");                             //
     sys.setSpawnArg("smoke_wound_flesh","newsteamyred"); //
     sys.setSpawnArg("smokeParticleSystem","flamejet-head");   //
//   $monster_demon_imp_crawler_14e.setKey("smoke_wound_flesh" , "firejet_small");//considered
//   sys.setSpawnArg("gravityDir", "1");                  //regular gravity, so omit at this time
     sys.spawn("monster_demon_imp");                      //
     ent_mon_this.remove();                               //can do now or earlier in fn
}

void make_imp_14w()                                       //e to w
{
     make_imp_w($monster_demon_imp_crawler_14e);
}

void make_imp_14d()                                       //w to d
{
     if (sys.random(13)<4)
     {
     make_imp_d($monster_demon_imp_crawler_14w);
     }
//continue;
}

http://img19.exs.cx/img19/2079/impjumpmelee01s.jpg

... more next time!



MBolus@Posted: Sat Sep 18, 2004 9:45 am :
(As noted above, this tut series is a work in progress, so I can modify it a bit to meet needs. For example, I can make a version which is faster, with simpler textures, and less demons in a room, if this one is not streamlined enough for many people. This is just a segment of a larger level to be explained with future parts, but this segment can be simplified easily if needed. This shows some of the possibilities to start.)



MNeMiC@Posted: Sat Sep 18, 2004 8:07 pm :
it's a bit overwhelming for us beginners with slow machines XD



MBolus@Posted: Sat Sep 18, 2004 10:00 pm :
MNeMiC wrote:
it's a bit overwhelming for us beginners with slow machines XD

:( Okay, I will slim it down and streamline it over the next week as possible. Thanks for feedback. :lol:



just1n@Posted: Sun Sep 19, 2004 12:52 am :
Decent tutorial. A bit excessive for newcomers, but overall quite good.

Good job.



rivit@Posted: Sun Sep 19, 2004 12:58 am :
flip maggot runs every were but were i want it to run
:oops::cry:



Mondriaan@Posted: Mon Sep 20, 2004 10:56 am :
It would be really cool to be able to make a MP map like this one:
Image

Would it be possible to give every player his own gravityDir that depends on the brush your feet are nearest to?
For SP it might be possible to rotate the entire map based on triggers. The easiest example of this would be to implement a hamster wheel for the marine.



rivit@Posted: Mon Sep 20, 2004 12:01 pm :
Do you need code to make the thing run were the hell I want it ? the thing runs every direction but the direction pointed by its path corner! Im getting board with trying to bot
A level…

:?



rivit@Posted: Mon Sep 20, 2004 12:01 pm :
http://groups.msn.com/acidDrean/shoebox ... hotoID=537 :roll:



the_duckman@Posted: Mon Sep 20, 2004 2:32 pm :
Mondriaan, RE It would be really cool to be able to make a MP map like this one:

Yes it was cool :). It came as a MP map in one of the officail service pacs for SIN.

It would not be difficult to port the map to d3.....



Mondriaan@Posted: Mon Sep 20, 2004 5:16 pm :
[quote="the_duckman"]Mondriaan, RE It would be really cool to be able to make a MP map like this one:

Yes it was cool :). It came as a MP map in one of the officail service pacs for SIN.

It would not be difficult to port the map to d3.....[/quote]

Did it feature different gravity directions for the players?
It would be cool if you'd spawn with a different gravity direction for every spawn. In the shown picture, with gravity in 2*x, 2*y and 2*z, this would give 6 different maps in 1!

I think I'll be testing this :^)



Mondriaan@Posted: Tue Sep 21, 2004 7:15 am :
Ok, I've created a map like the M.C. Escher picture I posted. You can get it here:
http://www.pcgamemods.com/7569/

There are two maps: escher.map and escher2.map. The second one is a scaled down (75%) version of the first. The sizes in the second map are better in proportion, but more difficult to draw because of the grid sizes. The first one contains some zombies in approximately the same position as the people in the drawing. Unfortunately, the zombies with non-default gravity are rather disoriented.

I you feel like enhancing this map, please do. I'm not working on it anymore, because it doesn't seem possible to give different players different gravity directions which was the point. With good animated monsters this map could be cool though.



the_duckman@Posted: Tue Sep 21, 2004 2:04 pm :
The sin one had different gravity directions......

It was fun, then novel.. then just plain iritating....



Amphetamine@Posted: Tue Sep 21, 2004 10:51 pm :
The sin map was called "Paradox", created by Tom Mustaine, and it wasn't just the spawns that set your gravity alignment, it was changed when teleporting too. As was the gravity alignment of any projectiles traveling through the teleport. Given godlike spacial awareness, this was an excellent map to do some trickshots. Ultimately though very much a proof of concept map, much like "Behind The Bookcase" (the 'land of the giants' map).

BTW, out of interest, is it possible to dynamicly change the gravitydir of the player? Would be cool to make some hellish map where a coridor is twisted up and you follow the curvature of it, then come out in a pat of the map that you've already visited, but bound to a different axis.



bloodraven@Posted: Wed Sep 22, 2004 3:27 am :
I wanted to make a mpa just like that for my mod...sadly I am nto that great at mapping yet...writing is my best talent..



Mondriaan@Posted: Wed Sep 22, 2004 8:11 am :
Amphetamine wrote:
The sin map was called "Paradox", created by Tom Mustaine, and it wasn't just the spawns that set your gravity alignment, it was changed when teleporting too. As was the gravity alignment of any projectiles traveling through the teleport. Given godlike spacial awareness, this was an excellent map to do some trickshots. Ultimately though very much a proof of concept map, much like "Behind The Bookcase" (the 'land of the giants' map).

BTW, out of interest, is it possible to dynamicly change the gravitydir of the player? Would be cool to make some hellish map where a coridor is twisted up and you follow the curvature of it, then come out in a pat of the map that you've already visited, but bound to a different axis.


That sounds awesome. I wish more games would support different gravity directions so well. A game where you could just stick to any surface, like spiderman, would be cool too.
I've been playing with the gravityDir settings for the single player start point and it has no influence. So I think that such cool maps as 'paradox' are not possible in Doom III.
Also the AI is not capable of handling enemies with different directions. Too bad, because having your enemies come after you and able to take shortcuts via any wall is really scary.



ToasterForHire@Posted: Wed Sep 29, 2004 8:05 pm :
Not the esher map, but a hypercube map I wrote for orig UT. Basically players can fight on the walls, and ceiling in the right orientation. Theres a a few bugs due to the way UT handles seperate zones, but it works well.

Using the zone bends the way I did its possible to create the escher image and be able to walk on the stairs right, but my brain kinda did a total meltdown when i tried to do the math to for the angles needed to place the zone portals at.


http://www.nwlink.com/~scourney/DM-Hypercube.zip



MBolus@Posted: Wed Oct 06, 2004 2:23 am :
Here's a preview of Part 2, which will be coming this month, including improved scripting methods and map. It will include monsters walking on all walls, from one wall to another, and more:

Image
The wall is there for the protection of the rare but unforgiving Imptrugers. And no, they don't want to hear about how much technology has improved.



MBolus@Posted: Sun Oct 17, 2004 5:37 am :
Just a reminder that I'm about to wrap up Part 2, as promised above. Again, this will include the ability to walk on essentially any wall, ceiling, and/or floor, even walk along a corner like straddling a north wall and a ceiling! The capabilities and scripting will be expanded, and the demo map will be included. Part 3 is planned as well, but Part 2 is a great one! I'm typing as quickly as possible, between my other projects. These Magtrugers seem to like the ceiling, but they can zip quickly down a wall, so watch out!

Image

Image



SeanWar@Posted: Fri Dec 31, 2004 10:10 pm :
I can't download the rundimentary map, it says it is not available