lunes, 30 de noviembre de 2015

playerController

States
stIdle
stWalk
stJump
stSlide
stWallJump
stDash
stAirDash
stGetHit
stDie
stSpawn

playerController

public float accWalk;
public float spHWalkMax;
int dirFace = 1, dirSpH = 0;
float spH = 0;

void stWalk(){
spH
dirSpH
if (keyRPressed){//R
 if (spH + accWalk < spHWalkMax) spH += accWalk;
 else spH = spHWalkMax;
 dirFace = 1;
 dirSpH = Mathf.Sign(spH);
}else  if (keyLPressed){//L
 if (spH - accWalk > -spHWalkMax) spH -= accWalk;
 else spH = -spHWalkMax;
 dirFace = -1;
 dirSpH = Mathf.Sign(spH);
}else{//None
 if (Mathf.Abs(spH) > deccWalk) spH -= dirSpH*deccWalk;
 else{
 spH = 0f;
 state = stIdle;
 }
}
}


}

lunes, 23 de noviembre de 2015

Editor

Game will have 4 modes:
Play: Normal way of playing the level.
Editor: Editing the level.
Test: Playing the level through the editor, the player can instantly switch from/to editor mode at any moment, make changes, start at any position, disable damage, click and drag the avatar, change some characteristics of the elements...
Publish: Playing the level in the normal way without using checkpoints when dying. the level must be beat in succession from each checkpoint.

Editor mode

  • Center: Level overview. Bottom: horizontal slider. Right: vertical slider.
  • Top left: Level commands (Save, Load, Save As, Exit Editor).
  • Left: Subworld toolbox (theme selection, subworld size, add subbworld, remove subworld, select subworld...). Under it: properties panel.
  • Bottom left: Test, Publish, Edit.
  • Right: Elements in tabs (Geometry, enemies, obstacles, powerUps, Misc...). Under it: Mode select, Undo, Redo, Multiple Selection.
  • Bottom right: Zoom controls.
  • Bottom: Level overview.

Everything can also be achieved with shortcuts.

Workflow
Dummy subworld added by default: 24x24, with starting point at the left and goal at the right, both at the bottom.

Click an element on the tabs to select it. For some elements, click on the + button on the bottom right of each element to open the properties panel. The mouse cursor will show the element that will be added.
Click anywhere on the main window to add the selected element to the level. Click on an empty space and drag to add multiple elements.
Some elements have variations: use the mouse wheel to change the variation of the active element.

Properties
Properties are the characteristic of every element that can be changed, like the walking speed of an enemy. When the player selects an element on the right tabs, the properties panel will show the data of that element. Changes made in the properties panel will affect all instances created after that.
However, if the player clicks on the + symbol on an element which has already been added to the level he will be able to change the properties of that instance only.

The different values that can be applied to each property are locked: this means that for example the player will be able to select slow, normal or fast walking speeds for an enemy, but won´t be able to set the speed to an arbitraty number.

Structure
Each level will consist of the following data:
Name
ID
Timestamp of creation
Timestamp of last modification
Number of subworlds
Theme[NSubWorlds]
Width[NSubWorlds]
Height[NSubWorlds]
Scrolling[NSubWorlds] = None, Horizontal, Vertical, Custom
Geo[NSubWorlds, width, height] = Empty, solid, semisolid...
Enemies[NSubWorlds, NEnemies]
Items[NSubWorlds, NItems]






Game description

Main description

Platforming game.
Player will unlock new abilities.
SMW structure.
Hidden exits that unlock new stages in the Overworld.

Player skills


Hit recoil
When hit, the player will recoil backwards loosing all previous momentum and gain some frames of invincibility. During some frames, the player won´t be able to take control.

Walk
Walking has 3 parts:
Startup: Player will accelerate until he reaches the normal speed.
Normal Speed: Player will walk at a constant speed.
Stopping: If hSpeed > Threshold he will deccelerate until he stops completely. This decceleration is very fast so he can stop in a few frames.

Jump
Jump will work like in SMW, having 3 different parts:
Rising: Player will rise with constant speed for a specific time. The time will depend on how long the player keeps the jump button down and on the horizontal speed.
Peak: VSpeed = 0 for 3 or 4 frames.
Falling: Constant speed, same as rising.

Stomp
Player can kill certain enemies by stomping on them. Keeping or pressing the jump button at this moment will make the player bounce higher.

Ground pound
Player will stop mid-air and perform a downwards ground pound. This move can interrupt air dashes, break solid blocks and kill armored enemies.

Dash
Player will make a short horizontal dash in the direction he´s facing or in the currently pressed direction at high speed.
The dash can be cancelled at every moment by pressing in the opposite direction of the dash. This will make him walk at max speed in the opposite direction.
The player can jump at any moment with max hSpeed. while stopping, the player will use the current speed instead of the max speed.
It has 2 parts:
Dash: Player will slide forward with a constant speed for some time.
Stop: Player will deccelerate until he stops completely. If a direction is pressed, he will slow until he reaches the maximum walking speed and start walking without stopping.

Air Dash
Same as Dash, but performed in the air. Can only be performed once, but is reset by touching a wall or bouncing off an enemy/obstacle.

Wall slide & wall jump (Unlockable)
While in the air if the player touches a wall and keeps pressing in the direction of the wall he will start sliding slowly down the wall. If the jump button is pressed he will perform a wall jump in the opposite direction.

Elemental powerUps
There are 4 types of powerUps: Neutral, Fire, Ice and Elec. Getting a different powerUp will get rid of the previous one. The neutral powerUp won´t appear if the player is already using an elemental powerUp and instead will appear as the equipped powerUp.
The Neutral powerUp just allows the player to take one hit without dying. It also allows him to break some blocks by dashing into them, hitting them with the head or ground pounding on them.
Enemies and obstacles respond differently to each element.
By pressing a button, the player will equip the next element.
With a different button, he will equip the previous element.
Examples:
Player will not slide when walking on ice platforms if the fire element is equipped, or become frozen when hit by ice hazards. Can break Ice walls when dashing, can wall slide on Ice Walls, can bounce on ice enemies.
Player will not suffer damage when fire is equipped and hit by fire hazards. Can break magma walls when dashing, can bounce on fire enemies. Can catch fire to burn things with a dash.
Player will not suffer damage when hit by elec hazards. Can travel through wires, can bounce on elec enemies. Can charge electricity to powerUp devices with a dash.

World structure

First stage will be an introduction focusing on variable jumps.
Second stage will focus on dashing.
Third stage will focus on air dashing.
Fourth stage will focus on wall sliding & jumping.
Fourth stage will focus on ground pounding.

domingo, 22 de noviembre de 2015

Goomba

Behaviour

  • Walks forward, doesn´t stop even when reaching the border,
  • Will turn around when hitting a wall.
  • Dies in 1 hit.

Characteristics

  • Speed: 3 types of speed, slow, normal and fast.
  • Starting direction: right, left or towards the player.