In the Corgi Engine, like in most Unity projects, a level is made of a Scene. You can add lots of stuff to your scene (ladders, enemies, etc.), it can be huge, or very small, it’s really up to you. But whatever you do, there are a few elements required for the engine to work. The engine includes two examples of “minimal” scenes. These scenes show the “standard conditions” minimal elements. Technically, you could even remove more stuff, but they act as a good starting point.
Minimal Singleplayer Scene
The minimal singleplayer scene can be found in Demos/Minimal/MinimalLevel. It’s a good starting point for any singleplayer level. Here’s what it contains :
- GameManagers : a gameobject containing a GameManager, a SoundManager, Achievement Rules and a Time Manager. The GameManager will handle points, time scale, pause, and generally high level stuff. As its name implies, the SoundManager is in charge of sound playback. Achivement rules will store all the requirements to unlock or add progress to your achievements. And the TimeManager will be where all time modification (slow donw, pause…) happens. Note that this object is not mandatory (meaning the game will still start), you can remove it if you don’t want to use these managers.
- UICamera : also optional, the UI camera is a separate camera, complete with a canvas and various GUI stuff like health bar, score, and stuff like that. That’s where you’ll want to put all your GUI elements.
- LevelManager : The LevelManager defines the level bounds used by all characters, it also handles the instantiation of the playable character(s), and all the spawn/respawn mechanism (what happens when you die). This one is mandatory for all scenes that contain Characters (you don’t need one for a splash screen for example). Make sure you select a playable Character from the LevelManager’s inspector.
- Camera : Usually you’ll want to have a camera with a CameraController, which is the component used by the engine to track your character, but you can replace it with any camera you want.
- Level : You’ll need at least a platform for your character to stand on.
Minimal Multiplayer Scene
The minimal multiplayer scene can be found in Demos/Minimal/Minimal4Players. It’s a good starting point for any multiplayer level. Here’s what it contains :
- InputManagers : an InputManager per player is needed for multiplayer scenes.
- GameManagers : Same thing as in a singleplayer level.
- MultiplayerUICamera : a UICamera, and its UI Canvas, dedicated to multiplayer layout. It contains 4 healthbars and jetpackbars, and the player’s names. Of course you can (and should) customize that to fit your particular game and theme.
- MultiplayerLevelManager : this component handles the life cycle of the multiplayer game. What happens when a player dies, have we only one player left standing, should the level restart, stuff like that. In most cases you’ll want to create your own multiplayer level manager, to implement your own rules.
- MultiplayerCamera : a camera that allows for the tracking of multiple players, similar to what you’d find in games like Smash Bros.
- Level : the platforms and items that make your level