Update and Corgi Engine Tutorials
- esb690
- May 6, 2022
- 2 min read
Here's my weekly update. I still don't have anything tangible to show off yet, so stay tuned for next week :)
Corgi Engine Starter Tutorials
If you want to work with the Corgi engine in Unity, be sure to start with a blank 2D project, and then import it through the unity asset store.
In Common>Prefabs folder are premade assets that are ready to use.
The Scripts folder contains all core components of the engine’s logic.
The Demos folder contains demo levels for reference and inspiration.
The Minimal demo levels are a good starting point.
It is best to not modify the Corgi Engine files, create a separate directory for project files.
Minimal Scene
The UICamera is a prefab that displays UI elements and other visuals, such as loading screens. It can be removed, but the Input Manager is a necessary component that is housed on this object. This can be copied somewhere else.
The Level Manager handles character spawning and death/respawn for the player and enemies. The Player Prefabs component is where the player character is selected.
The Level Object houses level start settings and the structure of the level, which in this minimal level is made up of white rectangular barriers.
Creating a Character
This is surprisingly easy!
Prefab characters in the Corgi Engine can be found in Demos>Prefabs>Playable Characters. Each Prefab Character comes loaded with scripts so they are ready for gameplay. These are sprite characters but they can be 3D models too.
The Corgi Controller script is responsible for movement and physics on a character.
The Character Script links all classes together. You can define if a character is AI or Player controlled.
Each character is loaded with scripts that give them different abilities: crouch, run, shoot, jetpack, etc.
To start creating: select the sprite or the character, and drag and drop in onto the level. Then add the character script to the object. Select Player under character type and set Player ID to Player1. Further down, click AutoBuild Player Character. The defaults will be enough to give your character physics and movement! The same can be done for NPCs.
To insert a prefab player character, select the LevelManager component and drap and drop the character object into the Element 0 space in the Player Prefab tab.
Generally, I think the premade assets in here are what I will be using. If there is functionality I need to create from scratch I will use Bolt, or insert other assets from the Unity Store.
Comments