Baron of Hell
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > New trick: a moving bus
Pages (2): [1] 2 »  
Author
All times are GMT. The time now is 23:29. Post New Thread    Post A Reply
Csabo
Moderator


Posts: 541
Registered: 02-02


I've made another "new trick" - or at least I've yet to see this in a doom wad. It's a moving bus this time. It works on the same principle as the cogwheel. We have a whole bunch of sectors and we raise/lower them continuosly.

It didn't turn out as good as I hoped but it's still a cool visual in my opinion. To make this effect believable, one would need some cool textures. I'm no graphic artist so I just ripped and butchered something from Shadow Warrior (which also has a moving van in it).

If we only use it as an ambient thing (that is, the player is blocked from going near), it could be a really cool addition to a city type level. The player looks out the window, and voila, there are vehicles running around.

To use this effect in a way that the player can go near it, there are a few problems. The start and the end of the vehicle's line has to be hidden from the player (it looks crappy no matter what we do). I took care of that in this example wad by putting a tunnel on one end (of course the player should be blocked from going into the tunnel). However, the bus doesn't hit the player, it just raises him/her. This idea needs to be improved to implement that. I was thinking all the "long" lines of the bus could trigger an ACS script with the line number in the parameter. If we make the current position of the bus a global variable (it's called "s" now in script 2), we could check against that to determine if the bus is hitting the player. Or something like that.

Have fun with it, I hope someone gets inspired by this (or gets a new idea). Build time was about 3 hours, all in XWE and Photoshop.

http://doomworld.com/xwe/movingbus.shtml

Old Post 09-19-02 17:58 #
Csabo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fen boi
Junior Member


Posts: 166
Registered: 08-00


cool, could make some nice crates on conveyor stuff like that

__________________
M.I.A

Old Post 09-19-02 18:18 #
fen boi is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6381
Registered: 12-00


That looks fantastic! OK the bus is a little flat and cuboid, but that's not the point.

It really works: the demo really shows off the idea and what can be done with it. It really gives the impression that something is going on that is simply impossible in the doom engine. Conveyor crates would be really simple using this technique. Nice one.

__________________
Meek

Last edited by Enjay on 09-19-02 at 20:12

Old Post 09-19-02 20:04 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01


Didn't Deep/Random Lag have moving crates on a conveyor in one of his wads? Hmm, maybe it was another object, but it was unusual.

Old Post 09-19-02 20:08 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Mordeth
Administrator


Posts: 1989
Registered: 05-00


How do you keep the textures on both sides of this bus in the right spot?

Old Post 09-19-02 21:05 #
Mordeth is online now Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Csabo
Moderator


Posts: 541
Registered: 02-02


If you download and open the WAD it will be obvious. There's a patch (128*64) which is the side of the bus. I created 16 textures out of this (CAR01, CAR02, etc.) which are all 16*64, and have this patch offseted by 16 units (look at this in TEXTURE1). The "short" sides of the "track" are tagged, each with a unique number (1-128). Then the script sets up the sides like this:

SetLineTexture ( s + 12, SIDE_FRONT, TEXTURE_BOTTOM, "CAR01" );
SetLineTexture ( s + 11, SIDE_FRONT, TEXTURE_BOTTOM, "CAR02" );
SetLineTexture ( s + 10, SIDE_FRONT, TEXTURE_BOTTOM, "CAR03" );

etc., where "s" is the current position of the bus. The bus has 128 steps right now, so the "other" side's line are marked between 129-256. So for the other side:

SetLineTexture ( s + 128 + 12, SIDE_FRONT, TEXTURE_BOTTOM, "CAR12" );
SetLineTexture ( s + 128 + 11, SIDE_FRONT, TEXTURE_BOTTOM, "CAR11" );
SetLineTexture ( s + 128 + 10, SIDE_FRONT, TEXTURE_BOTTOM, "CAR10" );

Notice that the textures are backwards.

Old Post 09-19-02 21:10 #
Csabo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01


I'll bet that it would be possible to script a collision effect if the player allowed the bus to "hit" him. First, the damage...
As each sector at the front of the bus is raised, set its damage very high so that the player is killed immediately if he contacts the front sector. You may leave the damage on for several sector steps I suppose, then turn it off before the bus progresses past that sector.

Now, maybe an impact effect too....
As the front sector rises, you might also script a setlinespecial for each front line in turn, making the special a thrust_thing to toss the player (player's body) forward. ThrustThingZ could add some vertical motion..haha that would look cool.

The problem with this might be in getting the player to cleanly cross the front line and trigger the thrust scripts...the player could just stand and let the bus hit him, and it would not work. So...
How about those zdoom things which do something when a player enters a sector, or when a player contacts the floor of a sector? Probably by script such things can be activated and deactivated. So, the front sector rises, player in sector thing is activated, player is in the sector, script is executed which uses damage_thing and also thrust_thing. You would not need to set sector damage, just script the player death with damage_thing. Heh.

Old Post 09-19-02 23:32 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
myk
volveré y seré millones


Posts: 15226
Registered: 04-02



Enjay said:
[...] It really gives the impression that something is going on that is simply impossible in the doom engine. [...]


Naturally... it IS impossible (but I know what you mean.)

__________________
Warez All the Data?

Old Post 09-20-02 03:51 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
999cop
Constrained Owing to Lot


Posts: 3180
Registered: 12-00


What port does this trick apply to?

__________________
.dronF

Old Post 09-20-02 04:22 #
999cop is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
VileSlay
Senior Member


Posts: 1591
Registered: 05-02


hey, thats damn cool. now adding the damage, throwing effect like biff said would make it even cooler. the bus does kinda looks more like a hummer though, which could apply if you're making a miltary base or something.

__________________
"I only wish that you, the peons, the lowly zit ridden scum of outcast prepubescence so recklessly misspending the treasure of youth could truly understand my utter disdain for you as I look out from my lofty perch of immeasurable fame and opulence." beefcake the mighty of GWAR

Old Post 09-20-02 06:16 #
VileSlay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Rellik
Knock Knock
Who's there?


Posts: 1251
Registered: 01-01


Cool shit Csabo! That's a lot of sectors, too bad you couldn't just do this with a poly-object. As it is it looks damn realistic, very smooth!

__________________
Discharge deathmatch level reviews
FreeDM Deathmatch Iwad Project
D.M.N. DeathMatch News. Your source for Multiplayer DOOM news.

Old Post 09-20-02 07:07 #
Rellik is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
mmnpsrsoskl
Spasmolytic


Posts: 1787
Registered: 06-01


I was thnking of doing this in my project, but i've never thought about how doing so.

__________________
You know, I never really updated this thing right here, so I thought i'd better put something in here, such as this annoying and stupid sentence. Yeehaw.

Old Post 09-20-02 10:06 #
mmnpsrsoskl is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01



999cop said:
What port does this trick apply to?
Why, zdoom of course, sir!

Old Post 09-20-02 14:58 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Shaviro
Team Future Chief


Posts: 8849
Registered: 06-00


Looks nice. I've already used it in 3057, tho :P (Moving crate)

__________________
Ybbx sbe hcqngrf fbba.

Old Post 09-20-02 16:43 #
Shaviro is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Lobo
Forum Regular


Posts: 972
Registered: 12-01


I want EDGE to do this!! :-(

__________________
Official EDGE Forum.

Robotech: FirstGen TC / Edge Shell Launcher(ESL) Home page.

Old Post 09-20-02 17:41 #
Lobo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
999cop
Constrained Owing to Lot


Posts: 3180
Registered: 12-00



Biffy said:
Why, zdoom of course, sir!
bah never mind, thought it could be done for oldschool

__________________
.dronF

Old Post 09-20-02 20:01 #
999cop is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01


Hahaha, just turn off your mlook, jump, crosshair and crank the resolution all the way down. Instant oldschool with a bus!

Old Post 09-20-02 20:11 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
999cop
Constrained Owing to Lot


Posts: 3180
Registered: 12-00


No, I meant for doom2.exe

__________________
.dronF

Old Post 09-20-02 20:15 #
999cop is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
rf`
Dr. Nosign


Posts: 8216
Registered: 11-01



Rellik said:
Cool shit Csabo! That's a lot of sectors, too bad you couldn't just do this with a poly-object. As it is it looks damn realistic, very smooth!


Can you do this with polyobj's?

__________________
Released wads and other doom crap

Old Post 09-20-02 20:45 #
rf` is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Shaviro
Team Future Chief


Posts: 8849
Registered: 06-00



ravage said:


Can you do this with polyobj's?



Nope. A polyobject is solid.

__________________
Ybbx sbe hcqngrf fbba.

Old Post 09-20-02 21:59 #
Shaviro is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01



Shaviro said:


Nope. A polyobject is solid.

Wait a min. The bus is solid anyway, so I don't understand your point. I used to think that polyobjects had to extend from floor to ceiling, but I'm pretty sure that someone discovered a way to make them of lower height, like a crate or whatever. Am I mistaken?

Old Post 09-20-02 22:16 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01


OK, I tweaked Csabo's bus to make it kill a player it hits. The effect is not exactly what I had in mind, but close. It's pretty good the way it will knock you forward, kill you unless you have armor, and then bump your body down the road. :) I'll try to email it to Csabo or whoever wants it.

Old Post 09-20-02 23:09 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Shaviro
Team Future Chief


Posts: 8849
Registered: 06-00



Biffy said:
Wait a min. The bus is solid anyway, so I don't understand your point. I used to think that polyobjects had to extend from floor to ceiling, but I'm pretty sure that someone discovered a way to make them of lower height, like a crate or whatever. Am I mistaken?


No. I mean a polyobject is solid. There's no floor or ceiling.

__________________
Ybbx sbe hcqngrf fbba.

Old Post 09-21-02 00:04 #
Shaviro is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Csabo
Moderator


Posts: 541
Registered: 02-02


Thanks Biffy, I got your email. Excellent job! The bus really hits you. I found that sometimes if you stand in front of the "corner" (instead of facing the bus straight on) it will only throw you, but won't hurt you still, it's really cool this way.

In the wad you sent me something was wrong. The BEHAVIOR entry was only 740 bytes. After re-compiling the script it once again jumped up to ~2100 bytes or so. I'm not sure what went wrong there.

Anyway, here's Biffy's addition:

// after Change Floor
Sector_SetDamage (s, 0, 0);
Sector_SetCurrent (s, 0, 0, 0);

// after Change Floor
Sector_SetDamage (f, 64, 0);
Sector_SetCurrent (f, 64, 0, 0);

With these four lines added after each Change Floor call, the bus really hits the player.

Old Post 09-21-02 01:06 #
Csabo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01


That's odd. It's a good thing you looked into the problem...I don't know what happened, it worked fine before I zipped it.
You might want to alter the current speed or damage amount to get a different effect, you can splatter the player harder with greater damage, throw him farther with more current (I know csabo knows this already).

Old Post 09-21-02 06:42 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
VileSlay
Senior Member


Posts: 1591
Registered: 05-02


thats cool that you worked out how to make the bus damage the player. I just downloaded xwe and looked at the original scripting (still is very confusing), and was wondering where to put the additions to check out the effect. if it works how I think it does, it would go good in my work in progress.

__________________
"I only wish that you, the peons, the lowly zit ridden scum of outcast prepubescence so recklessly misspending the treasure of youth could truly understand my utter disdain for you as I look out from my lofty perch of immeasurable fame and opulence." beefcake the mighty of GWAR

Old Post 09-21-02 07:08 #
VileSlay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Biffy
Forum Regular


Posts: 894
Registered: 02-01


Here's Csabo's script, with the roadkill effect I added. I'll put arrows where I added stuff:


#include "zcommon.acs"

script 1 open
{
print ( s: "hello there!\nmoving bus demo\nyou are roadkill" ); <---------- added roadkill joke
//
// raise the initial sectors
int i;
for ( i = 1; i <= 12; i++ )
{
Floor_RaiseByValue ( i, 512, 64 );
}
Delay ( 1 );
//
// start running the loop
ACS_Execute ( 2, 0, 0, 0, 0 );
}

script 2 (void)
{
Int s,f;
//
// step one ahead in every cycle
s += 1;
if ( s > 128 ) { s -= 128; }
//
// move the end of the bus down, change floor back
Floor_LowerByValue ( s, 512, 64 );
ChangeFloor ( s, "FLAT19" );
Sector_SetDamage (s, 0, 0); <------- damage off
Sector_SetCurrent (s, 0, 0, 0); <------ "move player" off
//
// set both sides
SetLineTexture ( s + 12, SIDE_FRONT, TEXTURE_BOTTOM, "CAR01" );
SetLineTexture ( s + 11, SIDE_FRONT, TEXTURE_BOTTOM, "CAR02" );
SetLineTexture ( s + 10, SIDE_FRONT, TEXTURE_BOTTOM, "CAR03" );
SetLineTexture ( s + 09, SIDE_FRONT, TEXTURE_BOTTOM, "CAR04" );
SetLineTexture ( s + 08, SIDE_FRONT, TEXTURE_BOTTOM, "CAR05" );
SetLineTexture ( s + 07, SIDE_FRONT, TEXTURE_BOTTOM, "CAR06" );
SetLineTexture ( s + 06, SIDE_FRONT, TEXTURE_BOTTOM, "CAR07" );
SetLineTexture ( s + 05, SIDE_FRONT, TEXTURE_BOTTOM, "CAR08" );
SetLineTexture ( s + 04, SIDE_FRONT, TEXTURE_BOTTOM, "CAR09" );
SetLineTexture ( s + 03, SIDE_FRONT, TEXTURE_BOTTOM, "CAR10" );
SetLineTexture ( s + 02, SIDE_FRONT, TEXTURE_BOTTOM, "CAR11" );
SetLineTexture ( s + 01, SIDE_FRONT, TEXTURE_BOTTOM, "CAR12" );

SetLineTexture ( s + 128 + 12, SIDE_FRONT, TEXTURE_BOTTOM, "CAR12" );
SetLineTexture ( s + 128 + 11, SIDE_FRONT, TEXTURE_BOTTOM, "CAR11" );
SetLineTexture ( s + 128 + 10, SIDE_FRONT, TEXTURE_BOTTOM, "CAR10" );
SetLineTexture ( s + 128 + 09, SIDE_FRONT, TEXTURE_BOTTOM, "CAR09" );
SetLineTexture ( s + 128 + 08, SIDE_FRONT, TEXTURE_BOTTOM, "CAR08" );
SetLineTexture ( s + 128 + 07, SIDE_FRONT, TEXTURE_BOTTOM, "CAR07" );
SetLineTexture ( s + 128 + 06, SIDE_FRONT, TEXTURE_BOTTOM, "CAR06" );
SetLineTexture ( s + 128 + 05, SIDE_FRONT, TEXTURE_BOTTOM, "CAR05" );
SetLineTexture ( s + 128 + 04, SIDE_FRONT, TEXTURE_BOTTOM, "CAR04" );
SetLineTexture ( s + 128 + 03, SIDE_FRONT, TEXTURE_BOTTOM, "CAR03" );
SetLineTexture ( s + 128 + 02, SIDE_FRONT, TEXTURE_BOTTOM, "CAR02" );
SetLineTexture ( s + 128 + 01, SIDE_FRONT, TEXTURE_BOTTOM, "CAR01" );
//
// length = 12
f = s + 12;
//
// uncomment the line below to pause between runs
// if ( f == 128 ) { Delay ( Random ( 128, 255 ) ); }
//
// make front of bus come up
if ( f > 128 ) { f -= 128; }
Floor_RaiseByValue ( f, 512, 64 );
ChangeFloor ( f, "CARTOP" );
Sector_SetDamage (f, 64, 0); <------- damage on
Sector_SetCurrent (f, 64, 0, 0); <------ "move player" on
//
// wait a bit, then do it again
Delay ( 1 );
Restart;
}



So, you see that it's actually the top of the bus which damages the player and shoves the player, and the damage and current effects are just enough to make it fairly realistic, yet probably let the player escape with his life if he has armor. If you want a completely unavoidable death, set the damage as high as 255. More current will throw you harder, but this value felt about right.

Edit: There is one more thing which must be done to movingbus.wad to make the Sector_SetCurrent command work - the bus sectors all the way down the street have to be flagged as "Wind/Current enabled" in WadAuthor. With DeePsea, you have to click the sector type button, go to zdoom sector flags and check the BOOM Wind box. If you don't do this, the bus will kill you but just pass under you instead of tossing your body forward.

Last edited by Biffy on 09-21-02 at 21:31

Old Post 09-21-02 18:23 #
Biffy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
kristus
Megablast!


Posts: 10607
Registered: 07-00


I've seen kurt. make rotating fans and stuff, with 2s polys. How about appkying the same principle to the bus? it'll of course not have a roof, but it'll be polyobjected. ;)

__________________
Turtle Crazy

Old Post 09-22-02 13:41 #
kristus is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
timmie
2 legit 2 quit!


Posts: 714
Registered: 03-02



Ebola said:
I've seen kurt. make rotating fans and stuff, with 2s polys. How about appkying the same principle to the bus? it'll of course not have a roof, but it'll be polyobjected. ;)


Yup, in kzdoom6. They look pretty cool.

http://members.shaw.ca/timstump/images/zdoomgl_30.jpg
http://www.fidnet.com/~kesler/zips/kzdoom6.zip

Man, I can't wait for kzdoom8.

Old Post 09-25-02 00:16 #
timmie is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
kristus
Megablast!


Posts: 10607
Registered: 07-00


Then youre up for a long wait.

__________________
Turtle Crazy

Old Post 10-02-02 17:34 #
kristus is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 23:29. Post New Thread    Post A Reply
Pages (2): [1] 2 »  
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > New trick: a moving bus

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.