Skip to content
llafuente edited this page Mar 16, 2017 · 4 revisions

Introduction

As you may expect, this is a Unity "Framework" to build platformers/side-scroller games (maybe more if you hack a bit).

This project will require a coder in your team, this is not meant to solve all problems, but rather to help you solve the complex ones. The rest is up to you. For example: Jumping. Mario and super meat boy has very specific jumps, not the same. We don't provide a magic-class to mimic all jumps, we provide:

  • A class that handle jumps for Characters: CharacterActionJump
  • A Jump abstract class that allow you to implement different jump types
  • Some implementation examples: JumpConstant | JumpConstantSpring | JumpVariableHeight

Implementation examples is not always available ^^

Editors

We don't want to provide custom Editors (don't want doesn't meant there aren't). Custom editor usually do more than show information, so we use it just in that case, we need to edit Class properties but in a very specific a careful way, then use an Editor.

But we want beatiful editors.

Update order/loop (UpdateManager)

unity-platformer has it's own loop. It's use FixedUpdate but none other class will.

If you want your class to be updated extend: IUpdateEntity and implement: PlatformerUpdate and LatePlatformerUpdate

Why?

  • Be precise in updating order: moving platforms before character for example
  • Support time scale changes, Coroutines are not reliable. UpdateManager.SetTimeout and UpdateManager.SetInterval are.

Configuration (Singleton MonoBehaviour)

Each scene can have different configuration, but We really recommend UpdateManager & Configuration into a prefab.

Configuration has many, many, properties, mainly allow to wire your unity configuration in the unity-platformer core. This also allow you not to follow any naming pattern, or specific layers just fill the Configuration.

Physic vs Manual.

We develop our custom manual collision, but it's proven to not be 100% reliable. We are moving to a mixed solution to handle everything before move the RigidBody2D, not just try to move an see what is going to happen. We will move the Character after some checking, but it something fast hit the player and we don't see it, Unity will and react. This is very useful if you have rotating objects like gears.

No graphics

There is no graphic here, just game-logic.

Clone this wiki locally