[ACS / DECORATE] GFD's Moving Platform Library

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!
Post Reply
User avatar
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

[ACS / DECORATE] GFD's Moving Platform Library

Post by GFD »

While taking a break from redoing a lot of code in my Mario mod, I made some moving platforms. Check 'em out!



Features:
• Pure DECORATE and ACS, no mapping required
• Easy to implement; just add a couple lines of code here and there
• Players and monsters do not need to be edited to use platforms that use this library
• Can work with platforms that use Actor Mover and Interpolation Point things, but not as well
• Actors will move with velocity-based platforms perfectly
• Actors realistically maintain momentum if they jump off a platform using this library
• Lots of comments in the code; might be hard to understand, but I hope they're useful

The example platform actors are very low-function, but that's not the point of this library. You should be creating your own platform actors to your liking! This library is intended to make it easy to have your platform actors carry things around.

Caveats:
• Platform actors can only carry one actor at a time for 35 tics
• Platforms must all have unique TIDs
• Completely untested with netgames
• No compensation for gravity; actors will not stay on platforms that are moving downward, but instead constantly fall onto them. I've tried my best to get this to work, but without reasonable success
TimeFreezer powerups don't really work with platforms. If they don't have NOTIMEFREEZE set, the power makes them behave irrationally with unfrozen actors. However, if an actor is frozen while already on a platform, it will stop moving, even if the platform is not frozen
• Because platforms modify an actor's velocity, players standing still on one will appear to be running
• Sprite clipping isn't adjusted on platforms, so anything with its legs sticking into the ground normally will still do that on these platforms. This is particularly noticeable if you're used to GZDoom intelligently pushing sprites out of the ground a bit, because it won't do that at all here
• Actors on platforms using Actor Mover and Interpolation Point things will lag behind the platform by 1 tic. This is more obvious on platforms that use a curved path. This is because those things do not actually give the platform any velocity, so we cannot observe their current movement, but only their previous displacement
• Because the script reactivates after every 35 tics the actor is on the platform, it is possible, if the actor is on multiple platforms at once when this reactivation occurs, that a platform with a higher priority than the one the actor was previously being influenced by will suddenly be the one the actor is considered to be standing on. I call this "snagging," and I've tried my best to fix it, but none of my ideas were maintainable
• Actors may be thrusted slightly incorrectly when running from one platform directly onto another
• Bugs??? I've spent a lot of time squashing them, but if you find any more, let me know

Please credit me in your mods if you use this. You can shoot me a message too; I'd be interested to see where this is getting used!

The comments in the files should tell you everything you need to know about how to use this in your own mods. I'll also say what's necessary in here, though.
Spoiler: How to use GFD_PlatformLib in your own mods
Last edited by GFD on Sun Mar 30, 2014 3:16 pm, edited 5 times in total.
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: [ACS / DECORATE] GFD's Moving Platform Library

Post by The Zombie Killer »

Don't let Jimmy see this :p

Seriously though, this is really cool!
User avatar
Batandy
Posts: 1279
Joined: Tue Jul 19, 2011 2:56 am

Re: [ACS / DECORATE] GFD's Moving Platform Library

Post by Batandy »

hm, this could be useful for Doom: The Golden Souls, awesome work!
TheMisterCat
Posts: 53
Joined: Sun Jul 25, 2010 7:25 pm

Re: [ACS / DECORATE] GFD's Moving Platform Library

Post by TheMisterCat »

er, I made something similar that requires a lot less to implement

https://dl.dropboxusercontent.com/u/109 ... m-test.pk3

simply place doomed num 12500, and set its args:

[0] - byte angle
[1] - speed (map units per tic)
[2] - full move distance (map units)


admittedly the code would need to be cleaned up a little in order to work with other projects, but meh
User avatar
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

Re: [ACS / DECORATE] GFD's Moving Platform Library

Post by GFD »

@The Zombie Killer: Let him see it, I say! I'd love for more people to be using this.
Thank you!

@Batandy: I'm a fan of The Golden Souls! I'd be honoured to have assisted its creation.
Nordevai
Posts: 18
Joined: Sun Mar 09, 2014 6:28 am

Re: [ACS / DECORATE] GFD's Moving Platform Library

Post by Nordevai »

Man, I'm imagining all the crazy fun possibilities you could have if one mixed this with Xaser's Parkour mod.
Post Reply

Return to “Resources”