miércoles, 16 de septiembre de 2015

Basic Mechanics Overhaul

The current speeds are too big for the game, we are getting jump distances of over 150 units at zero starting height, so all the Movement variables have to be greatly diminished.

Also, having so much air time (more than 2 seconds) easily attainable complicates a lot the level design, as:
  • Boost jumping with highspeed will make the player skip big parts of the level.
  • Not Boost jumping at highspeed will make have to go through a lot of stuff avoidable by jumping.
  • Level design becomes very complicate as we have to deal with really high values.
To solve these problems some decissions have to be taken:

  • Refocus the game from tricks to platforming: Tricks are a nice gimmick, but they force too many sacrifices in level design.
  • Choose a standard distance and balance all movement magnitudes around it.
  • Give the player more movement options, specially in the x-axis. This way more obstacles can be successfully included.


Turbo charge
We will include an energy charge button. When pressing it, the player´s speed will decrease until it reaches a minimum while accumulating energy. When releasing the button, the accumulated energy will be used to unleash a turbo. A minimum threshold is necessary, so players must charge for some time before the turbo is ready. If the player doesn´t charge enough energy for a turbo, this energy is lost as the player accelerates back to max speed, so consecutive short activations of the brake can add up to a turbo. Also, after releasing a turbo it can easily be cancelled by a single tap of the charge button

This system will allow the player to wait when some obstacles appear and choose for the right moment to unleash the turbo to pass them. The maxTurbo speed will be a bit greater than the speed the player had before braking, so if the player unleashes the turbo the exact moment it charges the overall will be slightly better than not using a turbo. This also allows for a high level tactic.

if (Input.GetKey("")){
  charge = [charge + chargeSp, 0, maxCharge];
} else{
if (charge > chargeThreshold){
  unleashTurbo(charge);
  charge = 0;
}else{
 charge = (charge-ChargeDec, 0, charge);
}

}


Speed Level system overhaul
The Speed Level system will change slightly: now using the trick button successfully in any situation will add points the level gauge. Examples:
  • Boost Jumping
  • Grabbing a speed line
  • Disarming a trap

However, filling up the bar won´t give a free turbo. Instead, these points will also be added to the new turbo gauge. Once it´s filled to the top the player can do an instant turbo by taping the charge button.


Standard distances
The standard unit will be 1 unit.
The standard jumping distances will be:

Speed LevelNormal JumpBoost Jump
0X<11<X<2
11<X<22<X<3
21<X<23<X<4
32<X<33<X<4


The standard jumping heights will be:

Speed LevelNormal JumpBoost Jump
0X<11<X<2
1X<11<X<2
2X<12<X<3
3X<12<X<3

When Boost Jumping the player will also get a small temporary boost in xSpeed:
if (turboBoostJumpOn){
 if (currentSpeed + boosJumptTurboIncr < currentSpeed + boostJumpTurbo)
  currentSpeed += boostJumpTurboIncr;
 else{
  currentSpeed = currentSpeed + boostJumpTurbo;
  turboBoostJumpOn = false;
 }
}else{
 if (currentSpeed - boostJumpTurboDec > maxSpeed[currentSpeedLevel]){
  currentSpeed -= boostJumpTurboDec;
 }else currentSpeed = maxSpeed[currentSpeedLevel]; 
}

boostJumpTurboIncr > boostJumpTurboDec, so it accelerates faster than it deccelerates.

This must be taking into account when adjusting the values of the movement parameters.

 y = y0+v0*t-0.5*g*t^2
t = (-v0+/-sqrt(v0^2-4*y0*(-0.5*g))/(2*-0.5*g)
D = t*xSp

Ramp Height = y0
Ramp Length = 2*Ramp Height
Standard ramp:
 RH = 0.5
 RL = 1

A realistic system with gravity doesn´t seem to be able to allow the jumps we want to make, so we´ll use a different system instead inspired by SMW. ump divided in 3 phases with constant speeds:
  • Rising: ySp>0.
  • Hanging: ySp=0 (3-4 frames? Maybe 6-8 in 60fps?).
  • Falling: ySp<0.
In SMW the speed is the same when both in the Rising or Falling stage, but we can test the effect we get by making the Rising part slower and the falling part faster.

This way we can manually control the speed height and better adjust the horizontal speed.


domingo, 13 de septiembre de 2015

Redefining Skill Themes

The defined skill matrix doesn´t match nicely with the actions the player can do, so a redefinition of it is necessary, as well as a reevaluation of the player´s actions.

Actions:
  • Move Towards
  • Move Away
  • Attack (Spin against enemies)
  • Use (Spin against contraption)
  • Disarm (Spin against trap)
  • Change Pace (Turbo)
  • Avoid (Manual Jump)
  • Trick

Entities
Entities in the game fall in 2 groups:
  • Obstacles: non-desirable entities.
  • PowerUps: desirable entities.

Obstacles
Obstacles can be structured in 4 groups:
  1. Enemy: Moving obstacles that can be saved with a spin attack or by not colliding.
  2. Traps: Stationary obstacles that can be saved with a spin attack or by not colliding.
  3. Berserk: Moving/intermitent obstacle that can only be saved by not colliding.
  4. Rock: Stationary obstacle that can only be saved by not colliding.

ObstaclesAttackAvoid
MovingEnemyBerserk
StationaryTrapsRock

PowerUps
PowerUps are always desired and the player will always try to move towards them when possible. They can be structured in 2 groups:
  1. Simple: These are stationary and don´t require any additional action by the player.
  2. Switch: These are stationary and require the player to activate them with a spin attack,
  3. Prize: Moving/intermiten powerUps that don´t require to be activated.
  4. Capture: Moving powerUps that require to be activated.

ActivateSeek
MovingCapturePrize
StationarySwitchSimple

Main actions
The 2 main actions the player can perform are:
  • Move: Move away, move towards, change pace, avoid
  • Fight: Attack, use, disarm
Both actions have to be considered in all elements.

Skill Theme Axis Definition


MovingStationary
ObstacleBerserk/EnemyRock/Trap
PowerUpCapture/PrizeSimple/Switch

  • Navigate: Move towards/away from the target.
  • Confront: Move towards/away from the target and activate.

The final matrix is:

Movement\PacePrecissionSpeed
TowardsCapture TargetBoost
AwayAvoid TrajectoryReact

Pace
  • Precission: The player must think before acting and get the solution before entering the event. These are complex events with some duration.
  • Speed: The player must react instantly, getting the solution only to the current part of the event. These are simple, short events  that come in series.

Movement
  • Towards: The player must move towards the element.
  • Away: The player must escape from the element.

Skill Themes

Movement\PacePrecissionSpeed
TowardsCapture TargetBoost
AwayAvoid TrajectoryReact


Capture Target
Player must foresee and intersect the PowerUps´trajectory. Prize and Capture fall here. It can combine nicely with React elements.
Elements:

  • Moving boost: Boost pads changing lanes, so the player must follow the sequence to intercept it.
  • Flying Boost: Flying Boost in a periodic path, the player must try to capture it. 


Avoid Trajectory
Player must foresee and avoid the Obstacle´s trajectory. Berserk and Enemy are used in this group. It can combine nicely with Boost elements.
Elements:

  • Flying mine: Series of mines flying describing a path, so the player must understand this path and avoid it (snake).
  • Patrolling mine: Mine moving in a periodic fashion, so the player must understand it and look for the best place to pass.
  • Intermitent gates: Player must understand the period and choose the correct one to pass.


Boost
Player must move towards and use a series of PowerUps in a fast way, reacting by instinct. Simple and Switch make this group. Combines with Avoid Trajectory elements.
Elements:

  • Ramp: Series of displaced ramps in an irregular fashion.
  • Boostway: Lanes with turbo boosts describing an irregular path.


React
Player must react to Obstacles on his way. Rock and Trap are used in this skill. The player can avoid them or use them, but he must decide fast. Combines with Capture Target.
Elements:

  • Red floor: Slowing floor describing an irregular path.
  • Bouncers: Bouncers laid out in an erratic way.




















sábado, 12 de septiembre de 2015

Level analalysis: SMW Yoshi´s Island 4

T1 Training Wheels challenge:
Single sinking platform: H(N, 1), W(1, 2)
Mario falls from above, jump with delta height  = 0, width = 2 to exit.

S1 Standard challenge:
Single sinking platform. H(1,1), W(1,3)

V1 Evolution challenge:
2 sinking platforms: H(0, 0, 0), W(2, 3, 1), I(0, 0, 0A)
This is an evolution because it adds something new (an intercept) rather than just modifying the existing characteristics of the challenge.

E1V1 Expansion challenge:
2 sinking platforms: H(N,0,2), W(3, 3, 1), I(0, A, 0)

Reward by fun/Crossover challenge

E2V1 Expansion challenge:
2 Sinking platforms: H(-3, 0, 3), W(2, 3, 1), I(0, A, A)

E3V1 Expansion challenge:
3 Sinking platforms: H(-3, 0, 0, 3), W(2, 3, 3, 2), I(A, A, A, 0)

M1V1 Mutation Challenge:
Sinking platforms: H(-3, 0, 3), W(2, 3, 1), I(A, 0, B)
This is a mutation because it modifies an already existing component (an intercept). I t really doesn´t add anything new to the challenge it mutates, it just changes it slightly. The skills used are the same as before.

Cadence:
T1-S1-V1-E1V1-E2V1-E3V1-M1V1.
Basically, the level presents the challenge, then evolves it by adding an intercept, and then lays out a series of different expansions which make the meat of the level, ending with a mutation.



viernes, 11 de septiembre de 2015

Track Design: Trickster

Skill Theme: Boost (Towards/Speed)
Complementary Theme: Avoid Trajectory (Away/Precission)

Main mechanic: Ramp
This mechanic requires 2 things from the player: positioning and activation. Positioning is rather intuitive, so the training wheels challenge will focus on activation.

Complementary mechanic: Trap Ramp
Trap ramps appear, marked with a "forbidden" symbol. When taken player´s speed will decrease,  boost jumps won´t be available and the landing lane will become a red floor.

Complementary mechanic: Mines
These are an evolution of the Trap Ramp mechanic: instead of positioning the hazardous elements in the ramp itself, mines can be located just before the ramp. In long ramps, groups of  mines can be located at different parts in the ramp´s length.

Challenges

Training wheels challenge:
All the starting zone will be divided in separated lanes that don´t allow z-movement. The player will watch 2 opponents on different lanes. One of them just advances normally while the other performs repeated spins. After a while they will come to a ramp, the first one will jump normally while the second one will perform a spin and then make a boost jump. Then the player will come to a ramp so he can try to boost jump himself. After this first jump, all lanes will come together so Z-Movement becomes possible.

Standard challenge:
The standard challenge makes the player move towards a ramp and activate it. The ramp will be displaced only one lane up or down from the player´s initial position and it will be very wide.

Expansion challenge:
Floors which reduce speed will appear, thus increasing the penalty of the standard challenge.
The number of ramps will have more z-distance between them, so the player has to navigate the whole width to keep on getting on them.
Reduce the width of the ramps.
Series of ramps will appear allowing little time for the player between each one, so the Skill Theme becomes present.

Evolution challenge:
V1: Trap Ramps. The skills in play are the same, but the player must first consider which ramp to take.
V2: Trap Ramps are replaced by moving mines. The mines can be located anywhere relatively to the ramp: just before, in the ramp itself if it´s long enough...so it changes the challenge in an important way: the player must plan a bit more in advance if mines are before the ramp and, most of all, he still has to maneuver after entering the ramp and before boosting from it.
V3: Combine Ramps, Trap Ramps and Mines. Mines will only appear before the ramp moving in opposite direction to the mines, so there´s only one correct place to enter at any time. It´s not more difficult than V1 or V2 as the space to enter will be the same, but it will look more complicated. Difficulty can really be made harder if we force the smallest gap to be of 2 lanes in V1 and V2 and use a smallest gap of 1 in V3.

Mutation challenge:

Variying length ramps will appear, so the player must wait to reach the border before attempting the boost jump. This breaks the rythm and makes the player stay alert...so hazards can appear while the player climbs the ramp.


Crossover challenge:
Moving mines without ramps. It can be used to both break the monotony of the repeated series of ramps and to introduce mines in a forgiving way.

Cadence Prototype
  1. T1: Training Wheels Challenge, 1 lane width ramp, no Zmovement allowed.
  2. S1: Standard Challenge: Ramps that take the whole width. 2 consecutive instances.
  3. X1...XnS1: Expansion challenge: All lanes but 2 will have ramps. From now on, all lanes without a ramp will have a Red Floor. Steadily change the number and width of ramps and add Red Floor to all ramps so it can only be avoided by boost jumping.
  4. M1S1: Mutation challenge: longer ramps star appearing. Start with a ramp of L=2 or 3 and width=all.
  5. X1...XnM1: Expansion challenge: modify ramps like in the standard expansions.
  6. V1S1: Evolution challenge: A ramp that takes all lanes will appear, with 1 moving Trap Ramp. Repeat.
  7. X1...XnV1: Expansion challenge: Reduce the number of safe ramps. Repeat while reducing the number of safe ramps until there´s only one left.
  8. C1: Crossover challenge: Mines taking all lanes with a hole of width = 2 or 3. First instance: stationary, next instances will have the mines move up/down.
  9. V2V1: Evolution challenge: Mines. Start with positioning mines before Ramps.
  10. X1...XnV2: Expansion challenge: Moving mines. Change their position to only in the middle of the ramp, then combine, tweaking ramp length to get more options and instances.
  11. V3V2: Ramps, Trap Ramps and Mines. Only 1 instance as a final challenge.

Cadence formula:

The cadence will have to follow the Hishotenketsu structure (Intro-Development-Crysis-Resolution).

T1-S1-X1...XnS1-M1S1-X1...XnM1-V1S1-X1...XnV1-C1-V2V1-X1...XnV2-V3V2

These challenges may be too much to include in one single lap and don´t overlay well with the Hishotenketsu structure. What´s more, it could become too repetitive to have to go through all this 3 times, so we will reorganize the cadence with Lap Variations.

Lap cadence
To break up successfully the cadence into 3 laps and make the game engaging while keeping an eye on repetition, we must give a different purpose to each lap:
  1. Lap1: Introduction: The simplest lap, it will comprise basically of the training wheels challenge, the standard challenge, some expansions, a mutation, one instance of the first evolution and a final expansion of the mutation. The idea is to keep it simple around the standard challenge, while laying the basis from where the more complex evolutions will grow in the next laps.
  2. Lap2: Conflict: The first evolution briefly presented in Lap1 will take focus on this lap alternating expansions of it and of the standard challenge mutation. A crossover challenge will appear before a single instance of the next evolution.
  3. Lap3: Resolution: The 2nd evolution will take focus now, alternating with the standard challenge and the first evolution while gaining weigh. the disruptive element (the 2nd evolution) will have to share time with the standard challenge and 1st evolution derivations, so it won´t be as present as the 1st evolution was in Lap 2. This will be like saying "this is all there is to this track", so that this lap provides closure.

In this case we have 3 mechanics: Ramps, Trap Ramps and Mines, so we can present each one in every lap. However, by doing this we may loose some coherence between all laps, so a better method would be to make a double division of the level so mechanics can cross over from one lap to the others:

ChallengeLapMechanicIntroDevelopmentCrysisResolution
Intro1RampTW1
S1
X1...XnS1
M1S1
X1...XnM1
V1S1 XfM1
Conflict2Trap RampX1...X2V1Xn...XmS1/V1
M2V1
X1...XnM1/M2
C1
V2V1
XfM2
Resolution3MineX1...X2V2Xn...XmS1/V1/V2
M3V2
X1...XnM1/M2
V3V2
X1V3V2
XfM1

The complexity peak will be in Lap3: Crysis VS Resolution. After that, the expansion of the first mutation will be repeated to relax the complexity and present the end of the race. Focus here will be set on the player himself, who will have to use his last resources for this final part of the race.

So, the general lap cadence will be:
[(T+S)/(X2S)]+[XnS+MS+XmM]+[V+(0/C/X)]+[XM]
We have simplified the lap cadence while at the same time arriving at a nice structure for each lap.

The track will be adapted in every lap, maintaining the same basic structure so the player knows what to expect to some point.

The AI will also have to follow this narrative, though this will be discussed more deeply when the time comes.


jueves, 10 de septiembre de 2015

Trick System Overhaul

With the current trick focused gameplay system some problems may arise: Performing chains of tricks require the player to be a lot of time in the air. During this time they aren´t doing anything besides inputting tricks. They are isolated from the world as they can´t change trajectory or interact with anything in the world. Thus, jumps must become shorter and tricks must be performed faster. Performing tricks can be a repetitive action, so this can´t be repeated too much or it will become old and tedious fast. To solve this issues, the track design must get the spotlight and propose interesting interactions to the player at a continuous pace. So the gameplay focus will shift from tricks to platforming.
The adjustments that need to be made to achieve this are:
  • Reduce air time: So the player stays more time on the ground dealing with obstacles.
  • Reduce speed: So more complex obstacles can be used.

Reducing air time 
To reduce air time we can do 2 things:
  • Augment gravity: The player will fall faster. Jumps will become wilder.
  • Reduce jump speed: Less height achieved when jumping. Less spectacular, but will help with keeping the track visible so incoming challenges can be detected in time.
Gravity manipulation is straight forward. However, jump speed manipulation must be done in separate cases:
  • Normal Jump: This jump is achieved by going off a ramp and not performing a Boost Jump. The jump height is related to the horizontal speed, so this relation must be tweaked and tested. This jump is usually a consequence of the player failing to do a boost jump, so the ability to do tricks with it should be little.
  • Boost Jump: In this case the vertical speed depends mostly on the speed level. We can try making it a fixed value independent of the horizontal speed. The player must be rewarded for doing this, so more tricks should be available during a Boost Jump.

Reducing speed
This will allow for the player to have more time watching incoming obstacles, as well as reduce jump height in normal jumps (and somewhat in boost jumps).


Trick System Overhaul
As a result of these modifications, the trick system must be altered to fit the reduced air time in the following ways:
  • Faster tricks: So the player can perform or chain tricks with the reduced air time.
  • Reduced, simplified system: Instead of requiring L1->L1->L2/L3 and allowing cancels (L2->L1 or L3->L2) the trick system will be more straightforward: L1->L2->L3->L3->L3...Tricks upgrade one level until the max level is reached. Also, there´s no posibbility of moving down the level ladder.
  • Change trick relative speed: spL3>spL2>spL1. This way introducing higher level tricks in normal jumps won´t need to rise the air time that much. Also, the higher level the trick is, the harder it will be to keep the chain going as inputs will be required more frequently.




miércoles, 9 de septiembre de 2015

Movement Definition

Trick requirements with zero height delta:

Normal Jump

  • SpeedLevel 0 must allow no tricks
  • SpeedLevel 1  must allow L1
  • SpeedLevel 2 must allow L1lpL2
  • SpeedLevel 3 must allow L1cL2
Boost Jump
  • SpeedLevel 0 must allow L1cL2
  • SpeedLevel 1 must allow L1cL2lL3
  • SpeedLevel 2 must allow L1cL2cL3lL3
  • SpeedLevel 3 must allow L1cL2cL3cL3

Skill Themes

DIRECT APPROACH

Skill Themes
This is a racing game, so the main objective is getting to the goal in the least possible time. In platform games, the objective is to get from A to B, which means getting to B depends on the player´s performance. In action games the objective is to confront the enemies and best them. So this game will have a lot of platformer component and little action component.

The obstacles and opponents will try to make the player loose speed, so all penalties will affect that. At the same time, there will be penalties by avoidance: some elements will help the player gain speed, so not taking them will have a relative similar effect to being affected by an obstacle.

Penalties:

  • 0: No penalty
  • 1: Speed gain opportunity lost
  • 2: Speed loss
  • 3: Crash (big speed loss, points loss...)


The different types of elements in the game are:

  • Targets: The player must get to them to continue without loosing speed AND even gain speed. Sometimes they are related to other targets, like switches controlling the state of a different element. Penalty = 1.5;
  • Boosters: Targets that are not enforced: not getting them won´t have a negative effect, but getting them helps to gain speed. Penalty = 1.
  • Obstacles: The player must avoid them by moving to a different lane. Penalty = 2.5;
  • Contraptions: Must be activated to get a speed boost, otherwise they don´t affect speed. Penalty = 1.5.
  • Traps: Must be activated to get a speed boost, otherwise they affect speed dramatically. Penalty = 2.5.
  • Intermitents: Have different states not controlled by the player that can allow free pass or generate speed loss.
  • Sand: The player must manually jump over them.

The player must learn the following skills:

  • Navigation: identify and move towards a desired position.
  • Activation: activate targets, contraptions and traps, defend against opponents.
  • Avoidance: avoid quick succession of obstacles.

Navigation - Optimal path
Elements: Targets, Boosters.
Instances:
 Turbo boosters (1)
 Ramps  (1)
 Speed Lines
 Jump pads (1)

Activation - Contraptions and Intercepts
Elements: Targets, Contraptions, Traps
Instances:
 Ramps (1)
 Jump Pads (1)
 Speed Lines (1)
 Bouncers (3)

Avoidance - Periodic enemies and Intercepts
Elements: Obstacles, Intermitents
Instances:
 Color Floors (2)
 Speed Gates (2)
 Laser Walls (3)


Skill Matrix

Skill ThemePlanAct
TargetOptimal pathContraptions
AvoidPeriodic enemiesIntercepts


Optimal path
These levels will be focused on having different routes and an optimal one which the player must take by navigation. The optimal path will be highlighted with elements that help the player gain speed, so the penalty will mostly come from omission. Periodic enemies can also be used to discard other routes, or to force the player to use manual turbos to bypass them. Contraptions can be used deceptively as the goal of the level isn´t to use them. For example: activating a jump pad can launch the player into a floating bomb, or activating a turbo launcher can make him crash against a periodic enemy. Color floors can be used as guides to the optimal route.

Contraptions
These levels will be focused on using a single contraption. The optimal route will always be the one that has more instances of this contraption and is reached by making more succesful uses of the contraption. Intercepts will be only avoidable by the use of the contraption or in other words, failing to use a contraption will launch the player into an intercept. This way the penalty will be double: for missing the speed boost due to the contraption and a direct speed loss due to the intercept. However, as there are a lot of contraptions to use the player will have an easy time gaining points and recovering from crashes.

Periodic enemies
These levels will focus on avoiding environmental hazards with 2 cycling states (on/off), or moving in such ways that they change the place where they are avoidable. Contraptions can be used to help with some obstacles, like a full lane of turbo launchers: the player must choose the correct moment to activate one so he can bypass an obstacle in the right moment. Manual jumps will be most used in these levels. The player is required to spin before being able to jump, so some planning ahead on his part is guaranteed.

Intercepts
These levels will focus on avoiding enemies and using traps quickly and in series, so one-instance events will happen regularly. The player will have to perform 2 actions: avoid enemies (fixed like bombs or barriers and moving like lasers, bullets or other incoming objects) and use traps as contraptions (bouncers). Enemies with irregular paths will appear which will force the player to react quickly, either avoiding them or spinning to defend himself.



REVERSE APPROACH
Genres
  • Platformer: there are jumps.
  • Action: there are enemies. 2 different types of enemies exist in the game: opponents (the other runners) and active obstacles (those which require an input from the player upon collision).
  • Racing: the main objective is to go fast and end the race 1st.

The racing genre doesn´t affect the core gameplay in the same way as the other 2 genres, but in a higher scale. Jumps and dealing with enemies will directly affect the player´s actions with high priority, while going fast and ending 1st is a consequence of those actions. Only at times where the player is free from any imposition will he be able to truly choose to perform additional actions that affect the main objective. thus, the skill themes must be divided in 2 layers:
  • Lower layer: Any skills which have an immediate effect on the player, opponents or world. Platform and action skills fall here. These will have a direct effect on the level design down to the detail.
  • Higher layer: Any skills which don´t have an immediate meaningful effect, but which will help the player to achieve the final objective. Racing skills fall here. These skills affect the overall level design, like including big empty zones to allow the player to use turbos safely or big jumps to perform many tricks.
Player actions
An action is something the player does to exercise a skill. It´s the way the player has to show the skills he has obtained. The player actions available in the game are the following:
  • Move Up/Down: Move to avoid obstacles and to choose a more favorable route.
  • Power spin: Spin in place to attack or defend from enemies, avoid or use obstacles, as a preparation for a Power Spin Jump, use friendly contraptions.
  • Power Spin Jump: Low jump used to avoid obstacles.
  • Jump: Medium jump used to avoid obstacles and sometimes to perform tricks. In certain situations, it will be more advantageous to use this jump instead of a Boost Jump, sometimes to choose a more favorable route (Higher Layer action) or to avoid obstacles. The ability to perform tricks lies also in the Higher Layer.
  • Boost Jump: High jump used to avoid obstacles, as a preparation to perform tricks or choose a more favorable route.
  • Tricks: Used to gain speed, get points, level up or unlock manual turbos after landing.
  • Recovery: Used to stop loosing speed (gain speed), save points (get points) and in certain situations can be necessary to avoid obstacles.
  • Bounce Jump: Used to attack or defend from enemies, avoid or use obstacles, get points, level up, unlock manual turbos.
  • Manual turbo: Used to gain speed, avoid obstacles or attack or defend from enemies.
  • Speed Line Grab: Used to avoid obstacles, choose a more favorable route or to get points, level up and unlock manual turbos.
All actions have one or more purposes:

Avoid obstacles: Avoid incoming obstacles.
Use contraptions: Use contraptions to gain an advantage. Some obstacles may be turned into friendly contraptions. At the same time, some friendly contraptions may be necessary to avoid obstacles. In these cases, the contraptions become part of the obstacle themselves and are regarded as such.
Choose a more favorable route: The player may choose different routes based on personal preference (like choosing a route that centers around a preffered skill) or to gain an advantage. This way this action transcends the Lower Layer as it doesn´t have an immediate consequence on gameplay and is related more with a general objective.
Attack and Defend from enemies: It can be necessary (so the enemies become obstacles themselves) or optional (mostly when attacking, in which case it´s done with a bigger purpose and lies in the Higher Layer).

Perform Tricks: Has no immediate effect other than opening the possibility of a crash. The player will consciously put himself in a dangerous position for a not immediate gain (speed, points, turbo, level up...) so it lies in the Higher Layer.
Gain speed: Doesn´t affect gameplay immediately->Higher Layer.
Get points: Doesn´t affect gameplay immediately->Higher Layer.
Level up: Doesn´t affect gameplay immediately->Higher Layer.
Unlock manual turbos: Doesn´t affect gameplay immediately->Higher Layer.

Lower Layer Skills
Lower layer actions are executed in reply to an event in the game:
  • Avoid obstacles: Platformer
  • Attack and Defend from enemies: Action

The player can reply to these events in 2 ways:
  • Act: Actions that must be carried as fast as possible once the event that requires them becomes active.
  • Plan: Actions that require the player to choose the right moment to execute them and give more thought to them.

Skill ThemesPlanAct
PlatformerOptimal path selectionQuick navigation
ActionPeriodic obstaclesIntercepts

The 4 skill themes are:
  • Navigation: The player sees in advance a series of obstacles or contraptions and must navigate to avoid them/get to them. The player has some time before seeing them, so he can decide the optimal path. The contraptions or obstacles are complex and come in individual events. These are usually obstacles that allow or deny passage in different lanes at every moment.
  • Quick navigation: The player will see a series of fixed contraptions and must navigate avoiding them.
  • Periodic obstacles: Avoid Intermitents.
  • Intercepts: A quick succession of obstacles that have to be avoided while going fast.





Reverse Design: Super Mario World

Source: http://thegamedesignforum.com/
Basic definitions

Composite game
A composite game is one in which a player can use the mechanics and abilities of one genre
to solve the problems of another genre, making it a composite of two videogame genres.

Declension
Now, when we talk about a level or section of a level in a composite game that emphasizes one genre
more than another, we’re talking about that level’s declension. (I.e., that level or section declines or “leans”
toward one genre, but never abandons either genre.)

D-Distance
The danger distance or D-Distance is the amount of lateral distance that Mario has to cover in a single jump event. D-Distance measures the size of deadly obstacle Mario is trying to avoid, whether it’s a bottomless pit or some kind of damage floor (or, in some cases, a fall that forces the player to tediously climb back up).


Delta Height
Starting height - target height > 0 Descending jump, easy
Starting height - target height < 0 Climbing jump, hard


Target width
Width of the landing platform. Wider = easier.

Starting width
Width of the starting platform before making a jump. Doesn´t affect much difficulty usually.

Soft sizes
  • Good objects/platforms/... have a hitbox greater than their sprite.
  • Bad objects/hazards/... have smaller hitboxes than their sprite.
Intercepts
An intercept is an enemy timed and placed so that it interferes with a jump that Mario needs to
make. It is not the cause of the jump event, but rather an obstacle that modifies the jump event. 

Penalty
Penalty for failing a challenge. It can take 3 values:
  • 0: If the penalty for failing a jump that the player has to try that jump over again, and Mario doesn’t lose a life or take any damage, the penalty rating is a zero.
  • 1: Jumps whose penalty is guaranteed damage but not necessarily death are rated one.
  • 2: Instant death pits are rated two.
The 4 main skills
  1. Getting Mario to the right momentum: Preservation of momentum
  2. Standing at/jumping from the right place: Periodic enemies
  3. Jumping at the right time: Moving targets
  4. Avoiding the sudden appearance of enemies: Intercepts


Challenges

A challenge is the essential unit of content in a level: a cluster of actions that must be undertaken
in one attempt, although that attempt can take a long time if the player chooses to stall, in many instances. The most reliable indicator of the space between challenges is a safe platform. The types of challenges are:
  1. Punctuating challenge
  2. Standard challenge
  3. Expansion challenge
  4. Evolution challenge
  5. Mutation challenge
  6. Evolution challenge
  7. Training wheels challenge
  8. Crossover challenge
  9. Expansion by contraction challenge
  10. Reward by fun challenge
Punctuating challenge
A kind of small mini-challenge that sometimes breaks up two challenges in a cadence. The punctuating challenge is a kind of punctuation mark in the sentence of a cadence. It is sometimes used to cleanse the palate, so to speak. Rather than having the end of every challenge be a safe platform that starts the subsequent evolution, expansion or mutation, sometimes the designers will throw a simple punctuating challenge at the player to refresh and refocus him or her. The key identifier of a punctuating challenge is that it is never developed. Although a punctuating challenge may be reiterated, it will never really evolve or expand, or else it would simply be a second standard challenge.

Standard challenge
The standard challenge is the first and most basic form of the challenges that get developed in the course of a level. The standard challenge is, in a sense, defined by its relation to later challenges. It’s not always the case that the first challenge in a level is the standard challenge. Sometimes the first challenge in a level doesn’t actually evolve, expand or mutate. Sometimes that first challenge is just there to accomplish something else, identifiable only on a case-by-case basis. Nevertheless, a standard challenge is usually simple, and no subsequent challenge in the cadence will be simpler qualitatively (excepting punctuating challenges, which are intentionally not developed), although some may be quantitatively easier to compensate for qualitative decay.

Expansion challenge
An expansion challenge is a standard challenge with one or more of the event variables increased numerically. An expansion challenge doesn’t change from the standard challenge qualitatively (or at least not by much), but it does change quantitatively. That is, the player is using the same skills in an expansion challenge as they would in a standard challenge, but the difficulty is greater because some aspect of the standard challenge has been increased. The variables that can be increased in an expansion challenge are:
  • D-Distance
  • Delta Height
  • Intercepts
  • Penalty

Evolution challenge
In contrast to an expansion, an evolution is a qualitative change that uses all the same skills as the standard challenge but in a more qualitatively complex situation.

Mutation challenge
A  mutation challenge is an iteration of any challenge that neither increases the complexity by evolution
nor expands the quantitative aspects of the challenge that is being mutated. Rather, a mutation challenge simply reiterates a challenge in a slightly different way that is more or less equally challenging. It’s not more complex, it’s just different. Mutation challenges are important because not every single challenge can get more difficult or complex, or else many levels would become terribly tiresome. Part of establishing a good sense of pacing in level design lies in knowing when to give the player a break or an easy challenge to restore their morale and give their concentration a rest.

Training wheels challenge
A training-wheels challenge is designed to allow players to use new skills in a low-risk, easy-to-understand
environment. In order to make acquisition of these skills easy and not frustrating, the designers do two things:
  1. Break what would be a standard challenge in any other level into its smallest component parts, teaching players how to execute each individual part of the challenge before putting them together (whereas an evolution would either throw them into a strange new element, added to the old, or combine two already-deadly challenges).
  2. Use one or more methods to reduce the penalty of the challenge down to 0.
Crossover challenge
A crossover challenge is a challenge that features a brief shift from one declension to another. They
are generally brief, featuring five or fewer events, and rarely more than one or two sequential challenges.
They are put in place to break the monotony of doing the same declension of challenge over and over (i.e.
moving target jump after moving target jump). They are usually built out of the complement skill theme (but not always).

Expansion by contraction challenge
This is just an expansion challenge that operates by narrowing the amount of safe space in a challenge. Most expansions are literal expansions of some numerical element; in these cases, they’re just reductions in the size of safe space or beneficial features like platforms.

Reward by fun challenge
The primary criterion for a reward by fun is the availability of non-death failure. Usually this means that Mario has to do something strange to get a reward. He can lose that reward, but it’s almost impossible for him to come to real harm—the only penalty is not succeeding.

Cadences
A cadence is the progression of challenges, explained by their relation to the standard challenge.
Almost everything in a level relates back to the standard challenge clearly, although the punctuating challenge
is often a minor exception to this.

Skill themes
Just as jump events add up into challenges, challenges add up into skill themes. A skill theme is a
series of levels which develop a consistent set of player skills through the use of fundamentally similar
but ever-evolving challenges. Skill themes in a composite game are the material embodiment of composite
design. A designer can take advantage of the various elements of the contributing composites to get specific
effects in any given level. There are basically four skill themes in the game, and they lay out well on a matrix:

Skill themeTimingSpeed
PlatformerMoving targetsPreservation of momentum
ActionPeriodic enemiesIntercepts

Each skill theme has a complementary theme which is usually used for crossover challenges:

Skill themeComplementary challenge
Moving targetsPeriodic enemies
Preservation of momentumIntercepts
PlatformerAction











martes, 8 de septiembre de 2015

Height Detection System

Target
Detect the maximum level of the trick the player can safely perform before landing. The time will be calculated supposing the trick is performed at normal speed (no link or pefect link).

System

  1. Detect the time until landing. This is done as soon as the player leaves the ground.
  2. Check against the time for every trick level.
  3. Show a gizmo on the UI with the color of the corresponding trick level.

Detecting the landing time

int GetLandingTime(){

bool landingSpotFound = false;
float distX = 0f, distY = 0f;
float safetyDistance = 10f;
float ySpeed = currentJumpSpeed;
int landingTime = 0;
//RaycastHit landingSpotInfo = new RaycastHit();

while (!landingSpotFound){
origin = new Vector3(transform.position.x + distX, transform.position.y + safetyDistance, transform.position.z);
 if (RaycastHit(origin, Vector3.Down, out landingSpotInfo, safetyDistance + distY, layerTerain)){
  landingSpotFound = true;
 }else{
  distX += currentSpeed;
  distY += ySpeed;
  ySpeed += gravity;
  landingTime++;
 }
}

 return landingTime;

}