Rideable Moving 3D Platforms
Rideable Moving 3D Platforms
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.
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.
RE: Rideable Moving 3D Platforms
how do u run OpenGL doom, when I try to open doom in OpenGL I get "no signal"
RE: Rideable Moving 3D Platforms
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
http://devbuilds.drdteam.org/gzdoom/gzd ... 0f8ed01.7z
-
- Zandrone
- Posts: 1244
- Joined: Thu Jun 28, 2012 9:07 pm
- Location: Rwanda
RE: Rideable Moving 3D Platforms
http://forums.steampowered.com/forums/s ... ?t=1966741chesse20 wrote: how do u run OpenGL doom, when I try to open doom in OpenGL I get "no signal"
RE: Rideable Moving 3D Platforms
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.
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.
RE: Rideable Moving 3D Platforms
and that update got in the gameWatermelon wrote:http://forums.steampowered.com/forums/s ... ?t=1966741chesse20 wrote: how do u run OpenGL doom, when I try to open doom in OpenGL I get "no signal"
plus the took a idea I had for a medigun (the grappling medigun) and used it as buff for the quick fix
RE: Rideable Moving 3D Platforms
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.
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.
RE: Rideable Moving 3D Platforms
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.
Glad you'll be able to use it!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.
Yeah, method 2 doesn't work in zand, as it says in OP. But method 1 is the smoother method anyway.Zeberpal wrote: On 2nd method, however, platforms thrusts me (1.3) :(
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.Zeberpal wrote: By the way, is there a way to mae a diaogonal path?
Last edited by scroton on Thu Oct 23, 2014 6:22 pm, edited 1 time in total.
RE: Rideable Moving 3D Platforms
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.
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.
-
- Zandrone
- Posts: 1244
- Joined: Thu Jun 28, 2012 9:07 pm
- Location: Rwanda
RE: Rideable Moving 3D Platforms
You should suggest that for zandronum!chesse20 wrote:and that update got in the gameWatermelon wrote:http://forums.steampowered.com/forums/s ... ?t=1966741chesse20 wrote: how do u run OpenGL doom, when I try to open doom in OpenGL I get "no signal"
plus the took a idea I had for a medigun (the grappling medigun) and used it as buff for the quick fix
- fr blood
- Frequent Poster Miles card holder
- Posts: 994
- Joined: Wed Mar 06, 2013 4:04 pm
- Location: France
RE: Rideable Moving 3D Platforms
Thats one of the best original project, this should be added in Zandronum/Zdoom good job.
RE: Rideable Moving 3D Platforms
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
to
Once that's done, we go into decorate to the actor PlatformMobileModelMethod1 and find the Moving5 and MovingStop5 states, which look like this:
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:
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:
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.
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.
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);
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);
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
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" }
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
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
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.
RE: Rideable Moving 3D Platforms
You can make damage 0 and apply +FORCEPAIN.
RE: Rideable Moving 3D Platforms
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.ZzZombo wrote: You can make damage 0 and apply +FORCEPAIN.
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.