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;

}

lunes, 31 de agosto de 2015

Track Design II - Obstacles and themes

Obstacles

  • Ramps: If traversed with enough speed will make the car jump. If the trick button is pressed at the correct moment a boost jump will happen.
  •  Bouncers: If the player collides with them it will send him rolling to a different lane and make him loose some speed. If the player uses the trick button when colliding he will go through them and get a turbo boost. If the player lands on top of one he will crash, but if he uses the trick button he will bounce upwards and make the multiplier rise by one.
  • Gates
  • Speed lines
  • Drones
  • Boost arrows
  • Turbo walls: The player must be using the turbo to be able to cross safely.
  • Switches: to activate/deactivate floors, gates, ramps...
  • Jump pads: If the player pushes the trick button he will get a boost jump.
  • Speed lights: Not an obstacle, it indicates if the lane which it´s above is free to pass or has an obstacle the player can´t currently pass because of level or anything else. They can be used to make lap 1 easier and then progressively start making them fail.
  • Shield stations: The player has a shield that protects him from environmental damage, but this shield is constantly running out, so he must pass through the shield stations to replenish it. Running out of shield will make him loose speed gradually.

Themes
Testing track
Cloud city
Dome/Stadium
Space
Wasteland

Useful Links

The Pure Advantage: Advanced Racing Game AI

40+ Fantastic Game Development Tutorials From Across the Web

Lenticular game Design

 Tools for Game Design 

The Chemistry of Game Design

Game Career Guide

 Critical-Gaming: Game Design 101

 mrBossDesign

Super Mario Bros. 3 Level Design

Game Design Forum (great in-depth SMW analysis)




lunes, 24 de agosto de 2015

Car Customization

Cars have different skills:

  1. Acceleration: How fast it accelerates and how slowly it looses speed after a turbo.
  2. Max Speed: Maximum speed attainable in every level. Care must be taken so it is in a certain range. This way levels can be designed with accesible paths for different speeds.
  3. Boost jump: How high the player can jump in every level.
  4. Agility: Lighter cars will perform tricks faster. 
  5. Style: Cars with high style will get more points when performing tricks, but the imput windows will be more demanding.
  6. Endurance: High endurance allows for faster recoveries after crashes and less speed loss dues to obstacles.


Cars are composed of 3 parts:

  1. Frame: Affects max speed and agility positively, boost jump and endurance negatively.
  2. Engine: Affects acceleration and endurance positively, max speed and style negatively.
  3. Stabilizers: Affects boost jump and style positively, accceleration and agility negatively.

Each individual part will also have an unlockable perk:

  • Trick booster: Yields more points when doing tricks.
  • Zero boost: Start the race with a turbo token.
  • Experienced: Start the race at level 1, but rising the level will require more points.
  • Safe pass: Lower the requirement of color obstacles by 1 level. Rising the level will require more points.