Skip to content

Level

Levels in Isetta are comparable to scenes in Unity.

Creating Levels

To create a level, add the following .h and .cpp file.

LEVEL_NAME.h

#pragma once
#include <IsettaEngine.h>
using namespace Isetta;

DEFINE_LEVEL(LEVEL_NAME)
void Load() override;
void OnUnload() override;
DEFINE_LEVEL_END

LEVEL_NAME.cpp

#include <IsettaEngine.h>
#include "LEVEL_NAME.h"

using namespace Isetta;

void LEVEL_NAME::Load() {
    // Level NEEDS a camera
    Entity* cameraEntity = Entity::Instantiate("Camera");
    cameraEntity->AddComponent<CameraComponent>();
    cameraEntity->SetTransform(Math::Vector3{0, 5, 10}, Math::Vector3{-15, 0, 0},
                             Math::Vector3::one);
}

void LEVEL_NAME::OnUnload() {
    // Anything you might need to do on the level unloading
    // Entity's will be destructed/destroyed on actual level unload
}

  • To load the file you just added as start up level, go to your user.cfg and set start_level to LEVEL_NAME.

Essential API

  • LevelManager::Instance().LoadLevel("levelName"): programmatically load levels
  • LevelManager::Instance().loadedLevel: get information about current level

Example Levels

Level Inputs

Some of the levels have inputs, too. But they display badly here! Go to our Git repo to look like them!

Level Name Level Description
AILevel Level showing how navigation module works in the engine and how to use the particle system
AudioLevel Level with 2D and 3D audio looping and one shot
BVHLevel Level testing our dynamic AABB tree
CollisionsLevel Level testing our collision intersections
CollisionSolverLevel Level testing our collision solving system
DebugLevel Level demoing our debug drawing capabilities
EditorLevel Level showing the editor components: inspector, heirarchy, and console and level loading menu
EmptyLevel Empty level to be used as a starting point for user created levels
EventLevel Level demoing our event messaging system with sender and listener components
ExampleLevel Level with an animating model and example component
GUILevel Level demoing some of our GUI capabilities
InputLevel Level demoing some of the input capabilities
LevelLoadingLevel Level showing a menu to browse levels and load specific level
MeshAnimLevel Level with a mesh that is being animated
NetworkLevel Level demoing some of our networking capabilities. The default_server_ip in config should be set to your LAN IP for this level to work.
PrimitiveLevel Level displaying all the types of primitive objects
SkeletonLevel Level displaying a mesh and entities used to follow the skeleton
Halves First demo twin-stick shooter game we created! Only support gamepads
KnightGame Game with a knight and a sword, can you take down the most training dummies?
Week10MiniGame First demo game with networking. Fool your enemy with your sword young man!