Rideable Moving 3D Platforms

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
Post Reply
scroton
 
Posts: 63
Joined: Mon Aug 26, 2013 3:33 am

Rideable Moving 3D Platforms

#1

Post by scroton » Wed Oct 22, 2014 7:08 pm

I was working on moving platforms a while ago and then dropped it after getting a hacky version working. I worked on it again tonight and the result is the first demo release version. Might need some tweaks, but here it is:

GZDoom Version:
https://drive.google.com/file/d/0BxbbtK ... sp=sharing

Note that this requires GZDoom with models enabled to see Map01, Map02 and Map04 correctly. Old version without new opengl runs it just fine.

Here's a rundown of what is featured in each demo level:

Map01 - model platforms and moving method 1
Map02 - model platforms and moving method 2
Map03 - sprite platforms and moving method 2
map04 - model platforms used as 3D floors, includes monsters

Zandronum versions also exist, though only map01 and map04 are functional. Models must be enabled to view them correctly. In 2.0 everything looks good online and offline, and it 1.3 stuff mostly works good except occasionally the platforms will ding you for 1 damage. This has been solved with a script that negates that occasional health loss, and won't be an issue unless there are things in your map that can cause exactly 1 damage.

Zandronum 2.0 Version:
https://drive.google.com/file/d/0BxbbtK ... sp=sharing

Zandronum 1.3 Version:
https://drive.google.com/file/d/0BxbbtK ... sp=sharing

There is a model skin template included in the file, marked so you know which side ends up where and what other sides it borders. The largest possible dimensions at standard Doom texture resolution are 128x128x128, and making a new platform is as easy as a couple of minutes in paint (or other editing program of your choice) and a tiny bit of math.

Future planned demo releases will include:

--Voxel versions of model used in Map01 (doesn't add functionality, and less easy for people to get different appearances than models with skins, but pretty for ZDoom)
--A couple more levels showcasing how existing functionality this can be used (trams, monsters on flying platforms, items on moving platforms, etc)
--Some more tweaking of numbers to make moving on a moving platform a little easier in method 1 (method 2 is pretty much they way it's gonna be.)
--While it should be pretty easy to follow in its current state, more documentation for those using this in projects.

/////////
//CREDITS
/////////

Model made by Revae, using obj. converted from voxel made by scroton
Model converted to .md3 from .obj by torridGristle
All other stuff by scroton

Feel free to use for whatever project you want; in fact you're encouraged to do so!
Please gibe credit (especially to Revae and torridGristle)!

/////////

Anyway hope you guys enjoy and put to good use.
Last edited by scroton on Fri Oct 24, 2014 3:54 am, edited 1 time in total.

chesse20
Forum Regular
Posts: 110
Joined: Fri Mar 22, 2013 4:00 am

RE: Rideable Moving 3D Platforms

#2

Post by chesse20 » Wed Oct 22, 2014 8:23 pm

how do u run OpenGL doom, when I try to open doom in OpenGL I get "no signal"

scroton
 
Posts: 63
Joined: Mon Aug 26, 2013 3:33 am

RE: Rideable Moving 3D Platforms

#3

Post by scroton » Thu Oct 23, 2014 12:56 am

You might need an earlier version of GZDoom if your computer doesn't like the version of opengl it uses. I use gzdoom-g1.8.1-305-g0f8ed01 for this reason.

http://devbuilds.drdteam.org/gzdoom/gzd ... 0f8ed01.7z

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: Rideable Moving 3D Platforms

#4

Post by Watermelon » Thu Oct 23, 2014 1:56 am

chesse20 wrote: how do u run OpenGL doom, when I try to open doom in OpenGL I get "no signal"
http://forums.steampowered.com/forums/s ... ?t=1966741

scroton
 
Posts: 63
Joined: Mon Aug 26, 2013 3:33 am

RE: Rideable Moving 3D Platforms

#5

Post by scroton » Thu Oct 23, 2014 2:01 am

Uploaded a fix to the GZDoom version involving a minor oversight of A_RadiusGive using a circular radius by default rather than a square radius. Link in OP has been updated.

EDIT: whoops, that will teach me to upload fixes without testing them first!
Fix has been fixed and tested this time.

EDIT2: Also forgot to mention that there is a model skin template included in the file, marked so you know which side ends up where and what other sides it borders. The largest possible dimensions at standard Doom texture resolution are 128x128x128, and making a new platform is as easy as a couple of minutes in paint (or other editing program of your choice) and a tiny bit of math. OP has been updated.
Last edited by scroton on Thu Oct 23, 2014 2:28 am, edited 1 time in total.

chesse20
Forum Regular
Posts: 110
Joined: Fri Mar 22, 2013 4:00 am

RE: Rideable Moving 3D Platforms

#6

Post by chesse20 » Thu Oct 23, 2014 6:26 am

Watermelon wrote:
chesse20 wrote: how do u run OpenGL doom, when I try to open doom in OpenGL I get "no signal"
http://forums.steampowered.com/forums/s ... ?t=1966741
and that update got in the game
plus the took a idea I had for a medigun (the grappling medigun) and used it as buff for the quick fix

User avatar
Zeberpal
Forum Regular
Posts: 476
Joined: Mon Jun 04, 2012 6:55 am

RE: Rideable Moving 3D Platforms

#7

Post by Zeberpal » Thu Oct 23, 2014 6:01 pm

Thanks for this stuff man! I'll be sure to use it in one of my projects I remember someone made similar thing some time ago, and it was about midtextures being moved every tic I think.
On 2nd method, however, platforms thrusts me (1.3) :(
By the way, is there a way to mae a diaogonal path?

P.S. Can someone cool off that Terry fan? So a guy made a usefull thread with opensource contribution, then some attention cheese whore makes his move, and there is already a number of useless posts.
Image ImageImage

scroton
 
Posts: 63
Joined: Mon Aug 26, 2013 3:33 am

RE: Rideable Moving 3D Platforms

#8

Post by scroton » Thu Oct 23, 2014 6:15 pm

Updated Zandronum 1.3 version with a script that checks if the player lost exactly one health (no more) and if so gives them back that one health to negate the occasional damage caused by the platforms. Link in OP has been updated.
Zeberpal wrote: Thanks for this stuff man! I'll be sure to use it in one of my projects I remember someone made similar thing some time ago, and it was about midtextures being moved every tic I think.
Glad you'll be able to use it!
Zeberpal wrote: On 2nd method, however, platforms thrusts me (1.3) :(
Yeah, method 2 doesn't work in zand, as it says in OP. But method 1 is the smoother method anyway.
Zeberpal wrote: By the way, is there a way to mae a diaogonal path?
Yeah, just edit the changevelocity in the script that moves the platform and make sure the corresponding script that the player calls is changed as well.
Last edited by scroton on Thu Oct 23, 2014 6:22 pm, edited 1 time in total.

scroton
 
Posts: 63
Joined: Mon Aug 26, 2013 3:33 am

RE: Rideable Moving 3D Platforms

#9

Post by scroton » Fri Oct 24, 2014 3:54 am

Updated these guys again. Things are now even smoother with regard to being able to move in the opposite direction the platform is traveling, moving while a platform is going up or down, and moving right when a platform stops moving.

Also scripts run by the player from items/painstates have changed; rather than the script needing a case which specifies the exact movement the script is instead passed the x, y, and z velocities of the platform the player is standing on and handles it from there. Script 200 handles movement from integers, script 201 handles stopping from integers (passed the same arguments as the movement one to stop that movement.) Old stopping cases have been retained in script 202 under cases 1 and 2. Scripts 300 and 301 act the same as 200 and 201 except that they accept fixed points by inputting the fixed point number you want * 65536. So for instance if you wanted to have -2.5, you would input -163840.

This means that, while it's really easy to control the platform movement via ACS, if you wanted you could now implement these platforms using only decorate (via A_ChangeVelocity, inventory counters and the above mentioned scripts) and copypasting the relevant scripts into your project.

Links in the OP have been updated.

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: Rideable Moving 3D Platforms

#10

Post by Watermelon » Fri Oct 24, 2014 3:28 pm

chesse20 wrote:
Watermelon wrote:
chesse20 wrote: how do u run OpenGL doom, when I try to open doom in OpenGL I get "no signal"
http://forums.steampowered.com/forums/s ... ?t=1966741
and that update got in the game
plus the took a idea I had for a medigun (the grappling medigun) and used it as buff for the quick fix
You should suggest that for zandronum!

User avatar
fr blood
Frequent Poster Miles card holder
Posts: 994
Joined: Wed Mar 06, 2013 4:04 pm
Location: France

RE: Rideable Moving 3D Platforms

#11

Post by fr blood » Sat Oct 25, 2014 7:31 am

Thats one of the best original project, this should be added in Zandronum/Zdoom good job.

scroton
 
Posts: 63
Joined: Mon Aug 26, 2013 3:33 am

RE: Rideable Moving 3D Platforms

#12

Post by scroton » Sun Oct 26, 2014 3:57 am

Crossposting this from Doomworld so other interested parties can see the explanation: EDIT: Realized posting an explanation of the Zand versions would be better than reposting the one for the GZDoom version. If you want to see the GZDoom version explanation go here. They're pretty similar though.

It's a pretty simple process once you know how it works. I probably should have included some comments pointing people to things instead of just leaving it for them to go hunting for.

So once you modify the actor velocities for the platform in ACS, then set it to a new (or existing since you're probably not gonna use the ones from the test) state where it will spawn the projectile it needs to keep them on (or give the player the item, in GSDoom's case.) The parts mentioned here are the same in both the 1.3 and 2.0 versions.

For instance let's change this part in ACS

Code: Select all

script 107 enter
{
  SetActorState(1896,"MovingStop8"); 
  SetActorVelocity(1896,0,0,0,FALSE,FALSE);
  Delay(128);
  SetActorState(1896,"Moving5"); 
  SetActorVelocity(1896,-4.0,0,0,FALSE,FALSE); 
  Delay(128);
  SetActorState(1896,"MovingStop5"); 
  SetActorVelocity(1896,0,0,0,FALSE,FALSE);
  Delay(128);
to

Code: Select all

script 107 enter
{
  SetActorState(1896,"MovingStop8"); 
  SetActorVelocity(1896,0,0,0,FALSE,FALSE);
  Delay(128);
  SetActorState(1896,"Moving5"); 
  SetActorVelocity(1896,-6.0,0,1.0,FALSE,FALSE); 
  Delay(128);
  SetActorState(1896,"MovingStop5"); 
  SetActorVelocity(1896,0,0,0,FALSE,FALSE);
  Delay(128);
Once that's done, we go into decorate to the actor PlatformMobileModelMethod1 and find the Moving5 and MovingStop5 states, which look like this:

Code: Select all

  Moving5:
    TNT1 A 0 A_SpawnItemEx("ProjectileMover5",0,0,25,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx("PlatformThing",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TEST A 1
    Loop

  MovingStop5:
    TNT1 A 0 A_SpawnItemEx("ProjectileStopper5",0,0,25,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx("PlatformThing",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TEST A 1
    TNT1 A 0 A_SpawnItemEx("ProjectileStopper5",0,0,25,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx("PlatformThing",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TEST A 1
    TNT1 A 0 A_SpawnItemEx("ProjectileStopper5",0,0,25,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx("PlatformThing",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TEST A 1
    TNT1 A 0 A_SpawnItemEx("ProjectileStopper5",0,0,25,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx("PlatformThing",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TEST A 1
    Goto Spawn
You don't actually need to do anything here, since they exist already, but if not you would have to create them and give them a projectile to spawn and hit players if one didn't exist already.

From the states it shows the projectiles they're spawning are ProjectileMover5 and ProjectileStopper5, so go to them:

Code: Select all

ACTOR ProjectileMover5 : ProjectileHardStopper { DamageType "PMover5" }
ACTOR ProjectileStopper5 : ProjectileHardStopper { DamageType "PStopper5" }
Again, you don't actually need to do anything here, since they exist already, but if not you would have to create them and give them a corresponding unique damage type and give the player a painstate for them.

Looking at the player's painstates in the TestPlayer actor we see they have corresponding painstates for the PMover5 and PStopper5 damage types:

Code: Select all

  Pain.PMover5:
    PLAY G 0 A_SetBlend("0 0 0", 0.0, 10)
    PLAY G 0 HealThing(1)
    PLAY G 0 ACS_ExecuteWithResult(200,-4,0,0)
    Goto Spawn	

  Pain.PStopper5:
    PLAY G 0 A_SetBlend("0 0 0", 0.0, 10)
	PLAY G 0 HealThing(1)
    PLAY G 0 ACS_ExecuteWithResult(201,-4,0,0)
    Goto Spawn
The only thing that needs to be changed with these guys is the arguments they're passing on to their scripts, which are for the old velocities. So let's change those to the new velocities.

Code: Select all

  Pain.PMover5:
    PLAY G 0 A_SetBlend("0 0 0", 0.0, 10)
    PLAY G 0 HealThing(1)
    PLAY G 0 ACS_ExecuteWithResult(200,-6,0,1)
    Goto Spawn	

  Pain.PStopper5:
    PLAY G 0 A_SetBlend("0 0 0", 0.0, 10)
    PLAY G 0 HealThing(1)
    PLAY G 0 ACS_ExecuteWithResult(201,-6,0,1)
    Goto Spawn
And that's it! You'd need to do the same for all the other states that correspond in the changes to velocities you've made, but after that you're pretty much done.

Things get more complicated if you have to have it change direction without it going to a stop state (which you can definitely do with a new script) but if you don't want to mess with ACS much you can always just have a short 4 tic stop state before changing velocity.

Hope that helps. If anyone has any other questions about this feel free to ask.
Last edited by scroton on Sun Oct 26, 2014 8:15 am, edited 1 time in total.

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: Rideable Moving 3D Platforms

#13

Post by ZzZombo » Mon Oct 27, 2014 1:43 pm

You can make damage 0 and apply +FORCEPAIN.
QZRcon - Qt-based tool for Zandronum/Skulltag servers!
#grandvoid funny stats

scroton
 
Posts: 63
Joined: Mon Aug 26, 2013 3:33 am

RE: Rideable Moving 3D Platforms

#14

Post by scroton » Mon Oct 27, 2014 8:19 pm

ZzZombo wrote: You can make damage 0 and apply +FORCEPAIN.
I tried this initially for the 2.0 version, before the hacky current method with the 1 damage and healthing but it didn't work for whatever reason, so I ended up with the method I have now.

EDIT: The reason it doesn't work is probably because it's a ripping projectile, rather than a normal projectile. From what I understand because the projectile is a ripping projectile this isn't a bug.
Last edited by scroton on Mon Oct 27, 2014 8:25 pm, edited 1 time in total.

Post Reply