Freeze through ACS

Moderator: GZDoom Developers

User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Freeze through ACS

Post by Nash »

I know this has been suggested and rejected in the past, but circumstances change over the times and recently Graf has kindly added the TimeFreezer powerup from Skulltag into ZDoom.

However, as described in this thread, the TimeFreezer can be used for more than just a powerup.

However, the method I tried is a hacky workaround, and at the end of that thread, you can see why it just won't work for what I want.

So I propose an ACS function that's more flexible than the powerup/inventory hack.

Code: Select all

Freeze(bool state, fixed time)
state would be on or off, and time would be the time it takes for the freeze to gradually wind back to normal speed.
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Post by Kate »

Why not something more like:

Code: Select all

Time_Freeze (bool state, fixed freezetime, fixed slowtime)
if state is TRUE, freezetime would be used to determine how long the freeze lasts, with 0 meaning it lasts forever until it's toggled off with state = FALSE; slowtime would determine how long the "slow effect" (that matrix'y effect when the time powerup is wearing off) lasts and would add onto freezetime. If freezetime is negative and slowtime is 0, the slow effect lasts until state = FALSE.

Somewhat more complicated, but a LOT more flexible that way. But then again, the perfect solution for this would be to have something like:

Code: Select all

Game_Speed (fixed speed)
Like Unreal has, where the game speed is set directly, with 1.0 being normal, 0.5 being half, 2.0 being double, etc. If you wanted to freeze the game, you'd just call Game_Speed (FALSE).
earbenT
Posts: 16
Joined: Mon Jan 29, 2007 12:43 pm

Post by earbenT »

How about something more flexible and generalized like this?

Code: Select all

Time_Shift (bool state, fixed transition1, fixed limit, fixed duration, fixed transition2)
If state is TRUE, the game's current speed (not necessarily the normal speed) slows down/speeds up over a period of transition1 seconds, until reaching the minimum/maximum speed limit (0 being a complete halt and 1 being the normal speed, though not a ceiling). It will remain at this speed over a period of duration seconds (-1 being forever until state is FALSE), then return to the initial speed over a period of transition2 seconds.

This way, you could make neat tricks like different sectors where things gradually slow down/speed up across each one.
User avatar
Cutmanmike
Posts: 11347
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Post by Cutmanmike »

I'd find just Freeze(On/off) more useful to be honest.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Post by Nash »

You're right, come to think of it. Having a simple on/off function is much better.
earbenT
Posts: 16
Joined: Mon Jan 29, 2007 12:43 pm

Post by earbenT »

But what if you want to just slow down or speed up objects rather than freeze them completely? Besides, the time it takes for objects to enter or leave a frozen state should be configurable.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49184
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Remember, the more you want the less likely you are to get it. Adding a means to set freeze mode from ACS is easy. I'd just add another option to SetPlayerPropertx for this (but on the other hand, that'd create no less code than doing with Give/TakeInventory.) But when it comes to configurability this will get much more complicated and far less likely to be done.
User avatar
Penguinator
Posts: 625
Joined: Mon May 22, 2006 6:55 pm
Location: Hell

Post by Penguinator »

Haha, double post!
/ban
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49184
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Argh. I hit the wrong button. I only wanted to edit my post - but since I can delete the redundant one I just did that! :P
earbenT
Posts: 16
Joined: Mon Jan 29, 2007 12:43 pm

Post by earbenT »

How difficult would it be to implement a Game_Speed (fixed speed) function like Kate mentioned?
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand

Post by edward850 »

Well if you’re going to add that, you might as well add PlayerGame_Speed (fixed speed, actor tid).
A cookie to who can find out what it does ;)
User avatar
Cutmanmike
Posts: 11347
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Post by Cutmanmike »

You could "slow" the game down by constantly turning freeze on and off. That's why I said earlier that it would be best to just have an on/off feature.
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand

Post by edward850 »

Dont you think thats a tad bit hacky for you cutman?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49184
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Or...


'no'ing this. If you think about it, there really isn't much that would be gained by adding another method to do something that can be done easily with the features at hand so I really don't see the need to waste time on it.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Post by Nash »

But Graf, removing the TimeFreezer from the player doesn't immediately cancel the effect which isn't ideal for what I intend to use this for.

Any other suggestions?

Return to “Closed Feature Suggestions [GZDoom]”