Project Info
My Role:
Engine Programmer (C++) Title: Rapid Tile Sandbox Platforms: PC Engine: Custom Genre: Hex tile-based games Time: 2016 |
The Project
Rapid Tile Sandbox is a custom game engine specialized at building hex tile-based games. It features a level and object editor, 3D rendering and lighting, as well as integrated Lua scripting.
|
Playing a game created with the engine ("Hextris").
|
My Contribution
As Engine Programmer, I used C++ to build the underlying hex tile system (generating the grid, hex maths, screen to grid conversion) and serialize level data.
I also used Lua to script 5 small games in our engine to inform development and design a user flow.
I also used Lua to script 5 small games in our engine to inform development and design a user flow.
My Contribution: Details
Hex Tile System
My main responsibility on the project was the hex tile system. For this, I extensively researched hex grids and their underlying maths online, then built prototypes to experiment and test functionality with, and finally migrated my code to the main project. Below I will list my main areas of work on the hex grid.
- Generating the hex grid with an algorithm and setting up relevant base-classes.
- Designing and implementing functions to calculate and return neighboring hexes, hexes in a line, distance between hexes, etc. and exposing them to our scripting language Lua (exposure to Lua was done using a system another programmer implemented).
- Turning screen coordinates (mouse cursor) into hex coordinates to determine which hex is clicked on.
For more information check out this hex grid document.
My main responsibility on the project was the hex tile system. For this, I extensively researched hex grids and their underlying maths online, then built prototypes to experiment and test functionality with, and finally migrated my code to the main project. Below I will list my main areas of work on the hex grid.
- Generating the hex grid with an algorithm and setting up relevant base-classes.
- Designing and implementing functions to calculate and return neighboring hexes, hexes in a line, distance between hexes, etc. and exposing them to our scripting language Lua (exposure to Lua was done using a system another programmer implemented).
- Turning screen coordinates (mouse cursor) into hex coordinates to determine which hex is clicked on.
For more information check out this hex grid document.
Serialization
Another area of responsibility for me was serialization of the hex grid (saving levels created in the editor to hard-drive). I compared existing libraries to assist with this task and settled on using Cereal. I also learned about hashing by creating 32-bit hashes for each hex to store its coordinates (10 bits per coordinate, 2 empty). Then I implemented reading and writing this information plus the hex's type to a JSON file.
Another area of responsibility for me was serialization of the hex grid (saving levels created in the editor to hard-drive). I compared existing libraries to assist with this task and settled on using Cereal. I also learned about hashing by creating 32-bit hashes for each hex to store its coordinates (10 bits per coordinate, 2 empty). Then I implemented reading and writing this information plus the hex's type to a JSON file.
Lua Gameplay Scripting
As I was the only designer on the team, I decided to build a handful of games in our engine to test and show off its functionality and inform development. I ended up building 5 small games (Screenshots at the bottom of this page). Most of them were inspired by simple, popular games, and some ended up being quite interesting. Working on gameplay scripting allowed me to uncover unnecessary hurdles and suggest features or fixes to the team to streamline the engine workflow. One of the things I am particularly proud of is removing the need to expose the hexes' cube coordinates to the user. Since cube coordinates are quite hard to wrap your head around, making all hex queries relative, makes life a lot simpler for the user.
As I was the only designer on the team, I decided to build a handful of games in our engine to test and show off its functionality and inform development. I ended up building 5 small games (Screenshots at the bottom of this page). Most of them were inspired by simple, popular games, and some ended up being quite interesting. Working on gameplay scripting allowed me to uncover unnecessary hurdles and suggest features or fixes to the team to streamline the engine workflow. One of the things I am particularly proud of is removing the need to expose the hexes' cube coordinates to the user. Since cube coordinates are quite hard to wrap your head around, making all hex queries relative, makes life a lot simpler for the user.
|
Here I'm using the engine to build a game as demo ("Bomberman").
|