Frictional Games Forum (read-only)
Sprint limit or none? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Frictional Games (https://www.frictionalgames.com/forum/forum-3.html)
+--- Forum: Off-Topic (https://www.frictionalgames.com/forum/forum-16.html)
+--- Thread: Sprint limit or none? (/thread-25220.html)



Sprint limit or none? - Froge - 05-05-2014

In a lot of horror games, there's usually a bar which shows how long the player can sprint, and once the bar is out, the player has to walk. This does wonders for realism, as when you're being chased by a monster down a hall it totally makes sense to just slow down to a casual stroll once you're out of breath.

The other option is like what Amnesia did, which is permasprint. To counter this, some monsters in the game are faster than the player. Nevertheless, it sometimes doesn't make sense that your player can run forever without needing to slow down and catch their breath.

Do you prefer horror games with sprint limits or not?


RE: Sprint limit or none? - 7heDubz - 05-05-2014

Neither. I (in my mod) plan to slow down the players move speed down to a jog when they are holding down shift, and if a monster appears bring it back to normal, giving them that feel of, OH SHIT TIME TO GO!!!


RE: Sprint limit or none? - FlawlessHappiness - 05-05-2014

I like perma-sprint and slow monsters because I don't like getting caught. Of course that's what I like.
But that just becomes boring...

The real thing is if you can make it challenging with what you have, but still possible in a way that isn't out of this world.

Yes, the monsters may be faster if we have perma-sprint, but that's why you don't create a 2 mile corridor and make the player run through the whole thing.
I hate it when playing a map, and then suddenly out of nowhere we have a chase scene where it's barely possible to survive, because the monster IS faster than you.

I don't care what I have, as long as it's well made by the editor.


RE: Sprint limit or none? - Streetboat - 05-05-2014

there are no sections in amnesia that don't make sense for an average person to be able to run through without collapsing from exhaustion. with adrenaline involved, "stamina" isn't really a thing.


RE: Sprint limit or none? - 7heDubz - 05-05-2014

(05-05-2014, 07:27 AM)Streetboat Wrote: there are no sections in amnesia that don't make sense for an average person to be able to run through without collapsing from exhaustion. with adrenaline involved, "stamina" isn't really a thing.

after getting away from the monster, i guarantee absolutely NO human being can go on adrenaline for 4-8 hours straight. And another thing, some people yes, have been known to pick up whole cars on their own this and
this but it can leave people with snapped tendons if the weight is to much.

basically no, even if you were underneath an adrenaline rush for 8 hours straight, and you ran for all of this time, you would drop from pure body exhaustion after at least 2 hours of straight running.


RE: Sprint limit or none? - Kurton - 05-05-2014

I don't like sprint limits - having to slow down and walk every 20 seconds is frustrating. Realism is one thing, but I have a hard time sympathizing with a character who's tired when I'm not :P


RE: Sprint limit or none? - DnALANGE - 05-05-2014

Here is a script function;
Put this OnStart \ OnEnter.
PHP Code:
stamina_obj.Start(); 
PHP Code:
//////////////////////////// Running breath ///////////////////////////

const string STAMINA_TIMER_CALLBACK_NAME "STAMINA_TIMER_CALLBACK";
const 
string STAMINA_PLAYER_SPEED "STAMINA_PLAYER_SPEED";
const 
string STAMINA_PLAYER_LENGTH "STAMINA_PLAYER_LENGTH";
const 
string STAMINA_PLAYER_BREATH_SLOW "STAMINA_PLAYER_BREATH_SLOW";
const 
string STAMINA_PLAYER_BREATH_SNT "react_breath_slow.snt";
const 
string STAMINA_PLAYER_HEAD_BOB "STAMINA_PLAYER_HEAD_BOB";

const 
float STAMINA_TIMER_SPEED_TIME 0.5f;
const 
float STAMINA_PLAYER_HEAD_BOB_SPEED 0.7f;

enum StaminaStages
    
{
        
Full,
        
Low,
        
Exhausted
    
}

class 
StaminaSystem
    
{
        private 
int state;
        private 
uint length;
        private 
bool head_bobbing;
        private 
bool is_running;

        
StaminaSystem()
            {
                
PreloadSound(STAMINA_PLAYER_BREATH_SNT);
                
this.state StaminaStages::Full;
                
this.length 15;
                
this.head_bobbing false;
                
this.is_running false;
            }

        ~
StaminaSystem()
            {
                
this.Stop();
            }

        
void AddDebugMessage(string &in messagebool checkbool to_file)
            {
                ::
AddDebugMessage("Stamina system: " messagecheck);
                if (
to_file) Print("Stamina system: " message);
            }

        
bool IsPlayerRunning() const
            {
                return 
this.is_running;
            }

        
void PlayBreathSound()
            {
                
PlaySoundAtEntity(STAMINA_PLAYER_BREATH_SLOWSTAMINA_PLAYER_BREATH_SNT"Player"0false);
                
FadeImageTrailTo(5,1);
            }

        
void Start()
            {
                
SetPlayerRunSpeedMul(1);
                
SetPlayerMoveSpeedMul(1);
                
AddTimer(STAMINA_PLAYER_SPEEDSTAMINA_TIMER_SPEED_TIMESTAMINA_TIMER_CALLBACK_NAME);
            }

        
void StartPlayerHeadBob()
            {
                if (
this.head_bobbing)
                    
MovePlayerHeadPos(0, -0.350STAMINA_PLAYER_HEAD_BOB_SPEED0.6);
                else
                    
MovePlayerHeadPos(000STAMINA_PLAYER_HEAD_BOB_SPEED0.6);

                
this.head_bobbing = !this.head_bobbing;
                
AddTimer(STAMINA_PLAYER_HEAD_BOB0.75fSTAMINA_TIMER_CALLBACK_NAME);
            }

        
void StartPlayerTiredEffect()
            {
                
this.PlayBreathSound();
                
AddTimer(STAMINA_PLAYER_BREATH_SLOW1.5fSTAMINA_TIMER_CALLBACK_NAME);
                
FadeImageTrailTo(5,1);
            }

        
void Stop()
            {
                
this.StopPlayerTiredEffect();
                
RemoveTimer(STAMINA_PLAYER_SPEED);
                
RemoveTimer(STAMINA_PLAYER_LENGTH);
                
SetPlayerRunSpeedMul(1);
                
SetPlayerMoveSpeedMul(1);
                
SetPlayerJumpDisabled(false);
                 
FadeImageTrailTo(0,1);
            }

        
void StopPlayerTiredEffect()
            {
                
this.head_bobbing false;
                
RemoveTimer(STAMINA_PLAYER_BREATH_SLOW);
                
RemoveTimer(STAMINA_PLAYER_HEAD_BOB);
                
MovePlayerHeadPos(0,0,011);
                 
FadeImageTrailTo(0,1);
                
// StopSound(STAMINA_PLAYER_BREATH_SLOW, 1); // Crashes the game upon exit.
            
}

        
void SetStaminaLength(uint length)
            {
                if (
length != 0)
                    
this.length length;
                else
                    
this.AddDebugMessage("Length cannot be 0!"falsetrue);
            }

        
void Update(string &in timer_name)
            {
                if (
timer_name == STAMINA_PLAYER_SPEED)
                {
                    
this.is_running = (GetPlayerSpeed() > 3) ? true false;

                    if (
this.is_running && GetTimerTimeLeft(STAMINA_PLAYER_LENGTH) == 0)
                        
AddTimer(STAMINA_PLAYER_LENGTHthis.lengthSTAMINA_TIMER_CALLBACK_NAME);

                    else if(!
this.is_running)
                    {
                        if (
GetTimerTimeLeft(STAMINA_PLAYER_LENGTH) > && this.state == StaminaStages::Full)
                            
RemoveTimer(STAMINA_PLAYER_LENGTH);

                        else if(
this.state == StaminaStages::Low)
                            
AddTimer(STAMINA_PLAYER_LENGTHthis.length/4STAMINA_TIMER_CALLBACK_NAME);

                        else if(
this.state == StaminaStages::Exhausted)
                            
AddTimer(STAMINA_PLAYER_LENGTHthis.length/7STAMINA_TIMER_CALLBACK_NAME);
                    }

                    
AddTimer(timer_nameSTAMINA_TIMER_SPEED_TIMESTAMINA_TIMER_CALLBACK_NAME);
                }

                else if (
timer_name == STAMINA_PLAYER_BREATH_SLOW)
                    
this.StartPlayerTiredEffect();

                else if (
timer_name == STAMINA_PLAYER_HEAD_BOB)
                    
this.StartPlayerHeadBob();

                else if (
timer_name == STAMINA_PLAYER_LENGTH)
                {
                    if (
this.is_running)
                    {
                        if (
this.state == StaminaStages::Full)
                        {
                            
this.state++;
                            
SetPlayerRunSpeedMul(0.3);
                        }

                        else if (
this.state == StaminaStages::Low)
                        {
                            
this.state++;
                            
SetPlayerRunSpeedMul(0);
                            
SetPlayerMoveSpeedMul(0);
                            
SetPlayerJumpDisabled(true);
                            
this.StartPlayerTiredEffect();
                            
this.StartPlayerHeadBob();
                            
FadeImageTrailTo(5,1);
                        }
                    }

                    else
                    {
                        
this.StopPlayerTiredEffect();

                        
SetPlayerRunSpeedMul(1);
                        
SetPlayerMoveSpeedMul(1);
                        
SetPlayerJumpDisabled(false);
                         
FadeImageTrailTo(0,1);

                        if (
this.state == StaminaStages::Low)
                            
this.state StaminaStages::Full;

                        else if (
this.state == StaminaStages::Exhausted)
                            
this.state StaminaStages::Full;
}
}
}
}

StaminaSystem stamina_obj;

void STAMINA_TIMER_CALLBACK(string &in timer_name)
    {
    
stamina_obj.Update(timer_name);
    } 

//////////////////////////// Running breath End /////////////////////////// 
---
Credits goes to : Your Computer
Here is the tread ; http://www.frictionalgames.com/forum/thread-16949.html


RE: Sprint limit or none? - Romulator - 05-05-2014

Lange, without being mean, did you even read the OP? Tongue

I think that while the sprinting mechanism is great, it can be overused - however I wouldn't ever grant a limited sprint in a game I develop. The player may be smart and not use sprint at all, or be impatient and sprint all the time, using it up before you need it most.

One thing I would probably do is incorporate a 'cooldown' period, but ALSO grant more sprinting times soon after, which could be abused, but also beneficial. I may have just contradicted myself, but if I were to use a limited sprint method, this is what I would do.