[ZScript] 3D Platform Actor / Faux 3D Polyobjects

Post your example zscripts/ACS scripts/etc here.

[ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby FishyClockwork » Sat May 14, 2022 2:49 pm

For the past several months I've been working on something that's supposed to spice up my mapping. But I ended up working on this thing more than doing any actual mapping, heh.
So without further ado.

This is a actor class whose main feature is the ability to carry other actors on top of itself while it moves around.

Possibilies include:
- Old-fashioned platforming
- Enemies that ride moving "cars" while attacking you.
- Floors and ceilings opening up.
- Any scenario at all where you can imagine a horizontally moving piece of "geometry" that you can stand on and be carried by.

Movement is based on GZDoom's PathFollower. That is, it moves by using map placed interpolation points. But it can also be moved/rotated via ACS since it has dedicated ACS utility functions.

A short demo map (MAP01) is included.

All the models in that map were created with UDB, but a platform can be a sprite, too.

DOWNLOADS:
Github repo: https://github.com/FishyClock/3Dplatform

Latest release: https://github.com/FishyClock/3Dplatform/releases/tag/v1.0.1

Spoiler: "Old release"


Feel free to use this for your own projects as long as you mention me in the credits.
This is licensed under MIT.
I highly recommend you change the FCW_ prefix to avoid conflicts.

Spoiler: "More details"


Spoiler: "Known issues"
Last edited by FishyClockwork on Mon May 16, 2022 7:38 am, edited 5 times in total.
User avatar
FishyClockwork
 
Joined: 23 Feb 2011

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby FishyClockwork » Sun May 15, 2022 2:48 pm

The v1.0.1 release fixes the interpolation issues, so it shouldn't be as jittery as before.
User avatar
FishyClockwork
 
Joined: 23 Feb 2011

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby Enjay » Sun May 15, 2022 2:53 pm

This is very nice. I haven't dived into the file yet to see how modular they are as a drop-in for any project but these really do the job very well.

There have been several attempts to do something similar in the past via a variety of means but I think these may feel the most solid and "part of the engine-like". They certainly seem incredibly flexible in what you can do with them.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby FishyClockwork » Sun May 15, 2022 3:21 pm

Thank you very much.

As for anyone wondering how exactly to use this:
Well, the idea is you inherit from the base class to create your platforms.
And while you can use sprites, the workflow (I imagined for myself) was, you make your level geometry, you use UDB to export that as a model, you then make a subclass of FCW_Platform, and set it up accordinally.

If I had to make an analogy, it's like mapping in Quake where you turn a set of brushes into a func_mover or whatever.
I know that doesn't sound really convenient.

Most of any platform's behavior can be set up from its thing arguments; there are defined Editor Keys specifically for UDB so in theory it should be pretty straightforward.
User avatar
FishyClockwork
 
Joined: 23 Feb 2011

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby FishyClockwork » Mon May 16, 2022 1:56 am

Added "Known issues" in OP.
User avatar
FishyClockwork
 
Joined: 23 Feb 2011

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby Enjay » Mon May 16, 2022 6:07 am

On the actor flag issue, you are just using the +CANPASS or +SPECIAL flags to tell your code "you can carry this actor" right? So would there be any merit in you using zscript to create your own +CANBECARRIED flag that is only used as a marker for that purpose (if such a thing can be done)?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby FishyClockwork » Mon May 16, 2022 6:33 am

No, no. What I meant by that is that actors lacking those flags simply fall through the platforms.
Even if you were to attempt to carry anything they would just fall through.

What's keeping those passengers on top of a platform has nothing to do with the platform's code.
I suspect it's more to do with that a object with CANPASS can stand on another CANPASS object.
And the only way an actor with SPECIAL can stand on anything is if the lower actor has ACTLIKEBRIDGE (which FCW_Platform has set).

I didn't just arbitrarily decide an actor has to have one of those two flags. It's just that, if I know they will fall through the platform, then don't even bother trying to move them when the platform moves.
Last edited by FishyClockwork on Mon May 16, 2022 7:15 am, edited 1 time in total.
User avatar
FishyClockwork
 
Joined: 23 Feb 2011

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby Enjay » Mon May 16, 2022 7:04 am

Ah right, understood. That makes more sense than how I originally interpreted the issue.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby FishyClockwork » Mon May 16, 2022 7:34 am

My apologies, it's poor wording on my part.
I've clarified it in the "Known issues" spoiler.
User avatar
FishyClockwork
 
Joined: 23 Feb 2011

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby Nash » Fri May 20, 2022 5:42 am

Thank you for this library. I did play to use models for moving platforms, and this is perfect. :D
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: [ZScript] 3D Platform Actor / Faux 3D Polyobjects

Postby FishyClockwork » Fri May 20, 2022 6:31 am

You're welcome. :)
User avatar
FishyClockwork
 
Joined: 23 Feb 2011


Return to Script Library

Who is online

Users browsing this forum: No registered users and 2 guests