A demo gameplay of all 3 levels.
Developer: Lam Ngo. Mentor: Silvio Carréra
Develop @ Ubisoft 2023 Submission
Overview
About DAU: "The selected candidates will be able to create a project around a pre-set theme. They will be mentored by a Ubisoft expert for four to eight weeks, receiving feedback from them to build their project." - Official Website
This year's theme for Ubisoft UK studios is "space exploration". In the programming track, the challenge is to make the game entirely in C++ using the provided bare-bone API.
Engine and gameplay features that I implemented
1. Entity - Component structure
- Component: the parent Component class is an interface inherited by all the specific components. Each specific component contains data and logic for that component and has its own Update & Render functions.
- Game Object: a container for the components. It loops through all the components it has and updates/renders them. Link to game object class.
- Game Object Manager: a container for the game objects. It loops through all the game objects in the game and updates/renders them if they are active or skip them if they are not.
2. Design patterns
- State: used to display a certain UI window when game state is changed.
- Factory: the GameObjectFactory namespace acts as a “factory” to create all the specific game objects in the game by adding suitable components to a game object.
- Object pooling: creates a number of objects (i.e: enemy, bullet, power-up, particle) up front in a single contiguous allocation and reuse them when needed.
- Observer: the template class Event is used to create an event system using the observer pattern. It uses function pointers to store the observers and their corresponding member functions. It allows objects to register and unregister as observers to be notified when the event occurs.
3. Level Manager: controls level-specific logic as follow:
- Reading and parsing commands from text files into a list of commands.
- Spawning enemies based on command types. Level Manager will go through each command in the list and check for the type of command in order to execute accordingly.
Level Manager is designed this way so that designers can have more control on how each level is laid out. It gives designers the flexibility to introduce new enemies and increase or decrease the level difficulties.
4. AI behaviors
- Movement: enemy can move to a waypoint and stand there or follow the player or move randomly between different waypoints.
- Shooting: enemy can predict the player's next position when the player is moving. When the player is not moving, enemy simply shoot towards the player (Image below). Link to enemy shooter class.