Actions

Difference between revisions of "Fangame How-to:SonicGDK/Set up sidescroller (2.5D) sections"

From Sonic Retro

(2nd SonicGDK tutorial (WIP))
 
(Progressing...)
Line 1: Line 1:
{{GuideBy|Xaklse}}
+
{{GuideBy|Xaklse|NinthCircuit}}
 
{{WIP}}
 
{{WIP}}
 +
Sidescroller 2.5D mode isn't enabled by default, you have to place and configure a set of objects/actors in your map to somewhat cancel the default 3D mode. To follow this guide basic knowledge of Kismet usage is required.
 +
 +
==Available actors==
 +
The key to setting up a sidescroller section is in the paths and the camera. To get you started, the basics of SGDKSplineActors, SensorActors and ForceVolumes will be explained:
 +
* '''SGDKSplineActor''': Ties Sonic movement to a existing path defined by splines, smooth piecewise-polynomial functions used to define curves that allow for a finer degree of control over a target's positioning information. UDK has [http://udn.epicgames.com/Three/UsingSplineActors.html SplineActors]; SonicGDK uses SGDKSplineActors, which are based on the previous ones. When a player touches an invisible SGDKSplineActor node, the player pawn mesh will snap to this navigation path and adjust gradually its movement.
 +
* '''SensorActor''': Triggers events upon player touch and untouch. It works like UDK's TriggerVolume but there are two extra output nodes in its related Kismet node ''Sensor Touch'', which generates 3 types of events: "Touched" (player pawn is whithin the sensor), "UnTouched (Front)" (pawn is in front of the sensor) and "UnTouched (Back)" (pawn is behind the sensor). So this object can essentially be considered as two separate triggers in one. The attached red arrow points to forward and the blue one points to backward.
 +
* '''ForceVolume''': Ensures that if Sonic collides with this volume, it will give Sonic a gentle nudge back onto the mainstream pathway. It's mainly used to push Sonic to another path (allowing parallel paths) or used where splines don't adjust Sonic's movement quick enough.
 +
 +
... ... ...
 +
 +
==Old version of the guide==
 
UDK has [http://udn.epicgames.com/Three/UsingSplineActors.html SplineActors]; SonicGDK uses SGDKSplineActors, which are based on the previous ones.
 
UDK has [http://udn.epicgames.com/Three/UsingSplineActors.html SplineActors]; SonicGDK uses SGDKSplineActors, which are based on the previous ones.
  

Revision as of 12:29, 3 October 2011

(Original guide by Xaklse and NinthCircuit)

Exclamation.svg This article is a work in progress.
Its content and location may change completely and frequently until this notice is removed.

Sidescroller 2.5D mode isn't enabled by default, you have to place and configure a set of objects/actors in your map to somewhat cancel the default 3D mode. To follow this guide basic knowledge of Kismet usage is required.

Available actors

The key to setting up a sidescroller section is in the paths and the camera. To get you started, the basics of SGDKSplineActors, SensorActors and ForceVolumes will be explained:

  • SGDKSplineActor: Ties Sonic movement to a existing path defined by splines, smooth piecewise-polynomial functions used to define curves that allow for a finer degree of control over a target's positioning information. UDK has SplineActors; SonicGDK uses SGDKSplineActors, which are based on the previous ones. When a player touches an invisible SGDKSplineActor node, the player pawn mesh will snap to this navigation path and adjust gradually its movement.
  • SensorActor: Triggers events upon player touch and untouch. It works like UDK's TriggerVolume but there are two extra output nodes in its related Kismet node Sensor Touch, which generates 3 types of events: "Touched" (player pawn is whithin the sensor), "UnTouched (Front)" (pawn is in front of the sensor) and "UnTouched (Back)" (pawn is behind the sensor). So this object can essentially be considered as two separate triggers in one. The attached red arrow points to forward and the blue one points to backward.
  • ForceVolume: Ensures that if Sonic collides with this volume, it will give Sonic a gentle nudge back onto the mainstream pathway. It's mainly used to push Sonic to another path (allowing parallel paths) or used where splines don't adjust Sonic's movement quick enough.

... ... ...

Old version of the guide

UDK has SplineActors; SonicGDK uses SGDKSplineActors, which are based on the previous ones.

First you should use SGDKSplineActors to define the 2D constrained path, the straight purple arrows of the SGDKSplineActors must point to the background.

To change the camera, you have to use a Trigger, TriggerVolume, SensorActor or similar. The SensorActor is like a TriggerVolume but is able to generate 3 types of events:

  • "Touched"; pawn is whithin the sensor.
  • "UnTouched (Front)"; pawn is in front of the sensor.
  • "UnTouched (Back)"; pawn is behind the sensor.

The attached red arrow points to forward and the blue one points to backward.

Copy CameraInfo_6 from the SonicGDKTestMap to your map and use it for the "Camera Info" param of a new "Set Camera Style" Kismet node (New Action>SGDK>Set Camera Style); attach an "All players" object to the "Target" param. You have to trigger the node with a Trigger, TriggerVolume, SensorActor or similar.

Test, if the camera zooms out then you're doing it well. Change the "Camera Offset Vector" of the copied CameraInfo to adjust the camera location.