Rideable Moving 3D Platforms

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
User avatar
scroton
Posts: 148
Joined: Sat Apr 27, 2013 10:53 am

Rideable Moving 3D Platforms

Post by scroton »

Crossposting this from Doomworld, will update thread again when I get a chance to update this again, hopefully soon:

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:
Spoiler: Videos of them in action by blackfish (also blackfish's levels and platform skins in videos)
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.
User avatar
scroton
Posts: 148
Joined: Sat Apr 27, 2013 10:53 am

Re: Rideable Moving 3D Platforms

Post by scroton »

A current limit that needs to be noted: blackfish has discovered that at least 16 tics of the stop script must be used between move states currently for an actor riding them to fully stop. This will be addressed when I next get a chance to update them.

In the meantime here are two rundowns of how to use the two scripts in method 1:

G/ZDoom version

Zandronum version
User avatar
RastaManGames
Posts: 378
Joined: Wed Mar 12, 2014 11:13 pm
Graphics Processor: nVidia with Vulkan support
Location: Russian Federation, Krasnoyarsk

Re: Rideable Moving 3D Platforms

Post by RastaManGames »

Ridable 3D-Floors reminds me a HL1 and CS 1.6 with cars and ridable blocks!
User avatar
leileilol
Posts: 4449
Joined: Sun May 30, 2004 10:16 am
Preferred Pronouns: She/Her
Location: GNU/Hell

Re: Rideable Moving 3D Platforms

Post by leileilol »

Shadow Warrior-style weaponfied vehicles!

in multiplayer!
mallo
Posts: 1112
Joined: Sat May 22, 2010 12:49 pm

Re: Rideable Moving 3D Platforms

Post by mallo »

This will come in handy... someday, I think. Bookmarked the thread.
User avatar
Slax
... in rememberance ...
Posts: 2121
Joined: Tue Oct 19, 2010 7:01 am
Location: Window office.

Re: Rideable Moving 3D Platforms

Post by Slax »

Seems like this would fit right in with Push.
User avatar
scroton
Posts: 148
Joined: Sat Apr 27, 2013 10:53 am

Re: Rideable Moving 3D Platforms

Post by scroton »

Slax wrote:Seems like this would fit right in with Push.
Term and I have already talked about that possibility.

Basically he said "gimme a map that uses them and we can get to testing it." I haven't had the chance to make such a map yet just cause IRL, but anyone else is welcomed and encouraged to.

If you decide to and have any questions about them feel free to hit me up on irc.
User avatar
X-DOOM
Posts: 541
Joined: Tue Jul 15, 2003 5:16 pm
Location: Charlesbourg, Québec, Canada

Re: Rideable Moving 3D Platforms

Post by X-DOOM »

mmm looks handy... :)
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: Rideable Moving 3D Platforms

Post by DOOMERO-21 »

very nice, also doom3 contain the same property.
User avatar
GooberMan
Posts: 1336
Joined: Fri Aug 08, 2003 12:57 am
Location: Helsinki, Finland

Re: Rideable Moving 3D Platforms

Post by GooberMan »

Another wheel, another reinvention.

You're setting the velocity of the player to the velocity of the actor it is meant to be on. This is bad. The example linked contains some functions that multiplies the difference in movement by a constant for addition to the player velocity and thus and allows free player movement.
User avatar
SyntherAugustus
Posts: 973
Joined: Tue Jul 15, 2003 5:43 pm

Re: Rideable Moving 3D Platforms

Post by SyntherAugustus »

In your example Gooberman, you think it's possible to get a 3D model to sync with your "platform" replacing the boom looking platform with it? Looking at the code briefly it seems possible. Also, what about carrying other monsters/objects?

Scroton's version is a bit simpler code wise, but as Edward850 told me and looking at your example again, this seems a bit more multiplayer (as in Zdoom at least) friendly.
User avatar
GooberMan
Posts: 1336
Joined: Fri Aug 08, 2003 12:57 am
Location: Helsinki, Finland

Re: Rideable Moving 3D Platforms

Post by GooberMan »

Monsters aren't an issue, it's just a matter of updating the scripts a little bit to account for it. The current script tracks TIDs. The idea for handling monsters would be to assign it a temporary TID when it gets on the platform, and unassign it when it gets off the platform.

The 3D model would just be a case of an object riding the platform. There would need to be special consideration to make it a static rider though (which could end up breaking multiplayer if it's done wrong). The script in my example uses a constant to derive the correct additional velocity for riders, but it's not a 100% accurate constant so there is always a very tiny amount of drift - not to mention inertia throwing you about when the platform has a sudden change of direction/speed.

I also didn't get around to handling rotational velocity. That should be achieved by rotating the determined velocity by the polyobject's rotational amount, but I haven't tried it.

Scroton's version isn't particularly simpler code wise. I've looked at it, it copy/pastes code everywhere and relies on DECORATE/inventory items. My implementation is closer to how it would be done natively (ie not through script).
User avatar
SyntherAugustus
Posts: 973
Joined: Tue Jul 15, 2003 5:43 pm

Re: Rideable Moving 3D Platforms

Post by SyntherAugustus »

I was just thinking have the model (being 2 flat planes representing the top and bottom) be spawned on top of the platform with no blockmap (I think) and have the script make it move along with the polyobject via SetVelocity. This would create a "3d polyobject" that can be shot and have decals.

Here's a rather quick preview of what I'm talking about. I didn't try removing the sides of the model to see if everything synced correctly. Sadly it didn't so I'll probably keep the sides of the model after all.

User avatar
scroton
Posts: 148
Joined: Sat Apr 27, 2013 10:53 am

Re: Rideable Moving 3D Platforms

Post by scroton »

GooberMan wrote:You're setting the velocity of the player to the velocity of the actor it is meant to be on. This is bad. The example linked contains some functions that multiplies the difference in movement by a constant for addition to the player velocity and thus and allows free player movement.
Why though? It only clamps it hard for the first 2-3 tics (I forget which off the top of my head) and after that it only sets it to the velocity within a narrow window of velocity, allowing free movement.
GooberMan wrote:Scroton's version isn't particularly simpler code wise. I've looked at it, it copy/pastes code everywhere and relies on DECORATE/inventory items. My implementation is closer to how it would be done natively (ie not through script).
Despite the redundant code (which is just a requirement of DECORATE in most of it, though I do really need to go back and clean up some parts when I get the time) it is pretty simple since it's just a couple of numbers that need to be changed, and they can be plopped down on any map (or even through script) without modifying the map itself at all (of course this has its own set of drawbacks/benefits.)
blackfish wrote:but as Edward850 told me and looking at your example again, this seems a bit more multiplayer (as in Zdoom at least) friendly.
Is it just more optimized or what? This method works reliably with multiple players, though I've not tested in ZDoom netplay (just Zandronum.)
User avatar
SyntherAugustus
Posts: 973
Joined: Tue Jul 15, 2003 5:43 pm

Re: Rideable Moving 3D Platforms

Post by SyntherAugustus »

Edward850 showed me a ZDoom netplay video where the player lost sync with the moving platform (in the startan example map). He said it had to do with prediction failure caused by the velocity changes on the player and the object. I've yet to do much testing of either of the examples myself but I ought to soon before I release my level so I can figure out if I need to do a co-op workaround or not.

Return to “Resources”