top of page

Salvation And Shadows

Development Period:

Team:

Aug 2020 - Apr 2021

Engine:

PenguinShark (5 students)

  • 3 programmers

  • 2 designers

Custom Engine (C++)

Position:

UI & Audio & Tools Programmer

Technology:

C++, OpenGL, FMOD Studio, JSON, Trello, Tortoise SVN

Description

Salvation and Shadows is a 2D turn-based strategy game where the player is trapped in a storybook and the only way to escape is to defeat all the enemies to retrieve their soul back by using a combination of elements.

​

The game was built from the ground up with a team of 3 programmers and 2 designers.

Engine Architecture 

The engine for Salvation And Shadows was built with an entity-component system (ECS). Almost everything that shows up in the game is an entity with attached components that affect the entity's behavior. The engine systems grab the list of components from the entity and updates each state of the components.

 

We chose to go with ECS because it provides great flexibility/customizability and it can be completely data-driven which is great for our designers. I along with the rest of the programmers on the team worked together to create the whole engine and make it usable for the designers to implement their ideas. 

engineArchitecture_edited_edited.jpg

Code Snippet

User Interface

I worked closely with the UI designer in implementing all the menus and the player HUD according to the wireframes drawn. By making everything customizable through JSON data, I was able to let my designer customize the menu, buttons, and transitions to her liking.

Data-Driven Buttons

I designed a custom button class that could be changed by modifying the data in the JSON file. This allowed my designer to modify it to her liking since our team did not have an editor. 

The buttons had to be able to:

  • Keep track and update its state (hovered, pressed, idle)

  • Button texture, animation, and text should be customizable

  • Update its own animation (visual feedback)

ezgif.com-gif-maker.gif
startButton.gif

Code Snippet

Animated Transitions

I developed a system for handling animated transitions for going to different menus and for transitioning to the next battle.

​

The system itself was an entity that was composed of 3 components (sprite, animation, and transform).

  • Transform was used to set the sizing of the animation to the screen (fullscreen/non-fullscreen).

  • Sprite was used to store the spritesheet and was the component that was drawn to the screen

  • Animation was used to update the frames and keep track of how long the animation should last

Code Snippet

Text Render

The game relied heavily on text to get information across to the player. There had to be text for the buttons, menus, damage pop-ups, health, etc. 

​

The 2 most important functions that it had to be able to do were:

  • Render strings and numbers together or individually in the desired position on the screen

  • Have timer functionality for pop-ups

The TextRender was an entity itself and I had set it up in a way that only one object of the class needed to be created for texts that had constantly changing numbers (health, damage, heal amount, etc.) as opposed to creating a new object each time.

​

The constantly changing texts would be updated/changed by passing in the newly calculated number during the update phase for the turn. Timers for those texts were also updated at the same time and the timers would reset once the time specified had been reached. 

FMOD Integration

I was in charge of integrating FMOD into our engine and all the sounds as well. This was my first time integrating FMOD into an engine and the result turned out better than I thought. It may not be the best, but our game just needed simple background music and sound effects that would play at certain times. 

​

JSON Deserialization

Our team didn't have a chance to make an editor for our designers since we didn't have enough programmers to help spread out the workload and time was limited. In order to make up for the lack of an editor, we decided to make everything as customizable as possible through JSON files. Enemies, animations, buttons, text, sounds, particles, and more were all made customizable through JSON files. I assisted in making some of the deserialization functions for different classes.

Below is an example of the JSON format needed for the creation of a particle

loading.gif

Loading ....

© 2022 by Joanna Li

bottom of page