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!

Rideable Moving 3D Platforms

Postby scroton » Sat Nov 29, 2014 5:12 pm

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/0BxbbtKR5bll_VjBwWlJWYjFsdlk/view?usp=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/0BxbbtKR5bll_ZWJ2ZnZMN3Q4dW8/view?usp=sharing

Zandronum 1.3 Version:
https://drive.google.com/file/d/0BxbbtKR5bll_bDVoaU9jSmZZVmM/view?usp=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
 
Joined: 27 Apr 2013

Re: Rideable Moving 3D Platforms

Postby scroton » Sat Nov 29, 2014 5:12 pm

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
scroton
 
Joined: 27 Apr 2013

Re: Rideable Moving 3D Platforms

Postby RastaManGames » Sun Nov 30, 2014 11:14 am

Ridable 3D-Floors reminds me a HL1 and CS 1.6 with cars and ridable blocks!
User avatar
RastaManGames
Syberian Doom Fan
 
Joined: 13 Mar 2014
Location: Russian Federation, Krasnoyarsk
Discord: ℝ𝕒𝕀π•₯π•’π•„π•’π•Ÿπ”Ύπ•’π•žπ•–π•€#4168
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Rideable Moving 3D Platforms

Postby leileilol » Sun Nov 30, 2014 3:29 pm

Shadow Warrior-style weaponfied vehicles!

in multiplayer!
User avatar
leileilol
ダークエルフ!!!!!!!!!!
 
Joined: 30 May 2004
Location: GNU/Hell

Re: Rideable Moving 3D Platforms

Postby mallo » Sun Nov 30, 2014 3:47 pm

This will come in handy... someday, I think. Bookmarked the thread.
User avatar
mallo
GO TO NEXT SECTOR.
 
Joined: 22 May 2010
Location: Once upon a land in a far off time

Re: Rideable Moving 3D Platforms

Postby Slax » Sun Nov 30, 2014 8:30 pm

Seems like this would fit right in with Push.
User avatar
Slax
Saucy.
... in loving memory ...
 
Joined: 19 Oct 2010
Location: Window office.

Re: Rideable Moving 3D Platforms

Postby scroton » Sun Nov 30, 2014 9:28 pm

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
scroton
 
Joined: 27 Apr 2013

Re: Rideable Moving 3D Platforms

Postby X-DOOM » Sun Nov 30, 2014 11:03 pm

mmm looks handy... :)
User avatar
X-DOOM
Imp monger
 
Joined: 15 Jul 2003
Location: Charlesbourg, QuΓ©bec, Canada

Re: Rideable Moving 3D Platforms

Postby DOOMERO-21 » Mon Dec 01, 2014 7:46 am

very nice, also doom3 contain the same property.
User avatar
DOOMERO-21
 
Joined: 02 Jan 2008
Location: Chile

Re: Rideable Moving 3D Platforms

Postby GooberMan » Mon Dec 01, 2014 7:59 am

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
GooberMan
Best taken in small quantities
 
Joined: 08 Aug 2003
Location: Helsinki, Finland

Re: Rideable Moving 3D Platforms

Postby SyntherAugustus » Mon Dec 01, 2014 10:03 am

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
SyntherAugustus
 
Joined: 15 Jul 2003

Re: Rideable Moving 3D Platforms

Postby GooberMan » Mon Dec 01, 2014 10:24 am

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
GooberMan
Best taken in small quantities
 
Joined: 08 Aug 2003
Location: Helsinki, Finland

Re: Rideable Moving 3D Platforms

Postby SyntherAugustus » Mon Dec 01, 2014 10:44 am

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
SyntherAugustus
 
Joined: 15 Jul 2003

Re: Rideable Moving 3D Platforms

Postby scroton » Mon Dec 01, 2014 2:48 pm

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
scroton
 
Joined: 27 Apr 2013

Re: Rideable Moving 3D Platforms

Postby SyntherAugustus » Mon Dec 01, 2014 4:14 pm

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.
User avatar
SyntherAugustus
 
Joined: 15 Jul 2003

Next

Return to Resources

Who is online

Users browsing this forum: No registered users and 0 guests