The player can perform tricks when in the air. Some conditions apply:
The trick button must have been pressed recently. This starts a counter during which the game will listen for inputs to determine which trick to perform. If the counter ends without input there´s no penalty.
If the player jumps using a ramp he can press the trick button to get a jump boost and automatically start the trick window. This allows to launch tricks earlier in the air.
Tricks are executed in level order.
Option 1: Each trick being an evolution of the previous one:
- Trick button+Left=Flip Backwards (Lvl1) -> TB+Down=RollFlip Backwards (Lvl2) -> TB+Up=Total Rotation (Lvl3).
Option 2: Each trick input is independent:
- TB + Left = Flip Backwards (Lvl1)->TB+Left,Down = RollFlip Backwards (Lvl2) -> TB+Left, Down, Up=Total Rotation (Lvl3).
Option 1 allows for simpler controls, but doesn´t enforce variety and there are much fewer possible combinations. For example, to do a Triple Flip B the only possible sequence is L, L, L. It forces the player to plan ahead the tricks and makes it so after a Lvl3 trick only other Lvl3 tricks can be performed.
Option 2 has more complex inputs but gives more freedom to the player, as any combination can be made, even lower level tricks can be performed after a Lvl3 trick has been done. It will also allow to make longer jumps and rise the requirements to Lvl3 tricks to something like Lvl1+Lvl2+Lvl2->Lvl3.
Seeing as in the air the player can´t move and the only possible inputs are turbo (not required) and trick button (for landing, already using it to perform tricks), Option 2 seems better. Special attention must be paid to the time it takes to execute the tricks so the player can make the necessary inputs.
Option 3: Each trick is an evolution of the ones before it:
- TB+Left=Flip B (Lvl1)->TB+Up=Spin(Lvl1)->TB+TB=SpinFlip B (Lvl2)
- TB+Left=Flip B (Lvl1)->TB+Up=Spin(Lvl1)->TB+Down=Total Rotation (Lvl3)
- TB+Left=Flip B (Lvl1)->TB+Up=Spin(Lvl1)->TB+TB=SpinFlip B (Lvl2)->TB+Down=Total Rotation (Lvl3)
- TB+Left=Flip B->TB+Up=Spin->TB+TB=SpinFlip B->TB+Down=Total Rotation->TB+TB=TotalRotation-Flip B= RollSpin (Lvl2)
- TB+Left=Flip B->TB+Up=Spin->TB+TB=SpinFlip B->TB+Down=Total Rotation->TB+UP=TotalRotation-Flip B+Spin=DoubleSpinRoll (Lvl3)->TB+TB=DoubleSpinRoll-Spin=SpinRoll(Lvl2)->TB+TB=SpinRoll-Roll = DoubleSpin(Lvl2, we add another spin to create a level 2 trick).
In this case the difference between Lvl2 and Lvl3 tricks must be very big because Lvl3 tricks become accessible at the same time as Lvl2 tricks.
Level 1 tricks can also be executed:
- TB+Left=Flip B->TB+Up=Spin->TB=SpinFlip B->TB+Down=Total Rotation->TB+TB=TotalRotation-Flip B-Spin=Roll (Lvl1)
A safety timer must be set after the first TB so it doesn´t execute a Lvl2 trick instead.
Option3 has easy inputs, allows multiple combinations, has flexibility but at the same time requires a bit of planning to reach the desired Lvl3 trick.
Implementation
List<int> tricks = new List<int>();
List<int> inputs = new List<int>();
const int inpRight=0, inpUp=1, inpLeft=2, inpDown=3, inpTrick=4;
if (trickEnable){
if (rightJustPressed){
inputs.Add(inpRight);
trickEnable = false;
}else if (upJustPressed){
inputs.Add(inpUp);
tricEnable = false;
}else...
}
No hay comentarios:
Publicar un comentario