I implement a tilted hexagon-grid map, rotating each hex to i= ( 0.866 , 0.5 ) j = ( 0 , 1 ) grid basis.
Use the IsPointInsideHexXY2D function to select the hex with its coordinate and XML CDATA definition files to store the hex data. In the tile definition file, "X" represents the solid hexagons, while "." means they are not solid. The "player" represents the player index for the unit definition file, and the character represents the unit type and location in the hex map.
I organize particle effects using XML files because they're easy to read and tweak. Each effect contains multiple emitters (like different particle sources), and every emitter controls its own set of particle properties. When an effect starts playing, it creates and manages these emitters, which then handle their individual particle groups. During updates, the effect simply tells each emitter "hey, update yourself," and each emitter in turn updates all its particles' positions/behaviors. This separation keeps things modular - I can easily modify individual emitters through XML without affecting the whole system.
This project involves designing a multiplayer experience using a network system, offering three distinct executable configurations tailored for different network modes. The "None" mode serves as the default setup, utilizing the local machine's network host address and the game's default start map. In contrast, the "Server" and "Client" modes are separate configurations designed for server and client network states, respectively. Both of these modes leverage the host address and default map from the default configuration.
Default Configuration: This mode supports only local play, limiting gameplay to a single machine.
Server and Client Modes: These modes enable multiplayer functionality, allowing both server and client to connect under the same network host address, facilitating seamless multiplayer interaction.
I developed a comprehensive state-based UI system for a turn-based strategy game with hexagonal tiles. This system dynamically manages different game states and updates UI elements based on player actions and game context.
The UI system is built around a state machine with clearly defined game states:
ATTRACT: Initial splash screen
MAIN_MENU: Game menu options
PLAYING: Active gameplay
PAUSED: Pause menu
TURN_START: Beginning of player turns
GAME_OVER: End game screen
WAITING_FOR_PLAYERS: Network play waiting screen
I created detailed unit information displays that show unit stats and are updated dynamically when units are selected or focused. The system maintains separate displays for each player faction.
These information panels include attack values, defense ratings, movement range, and health statistics. When a unit is selected or targeted, its information panel appears, giving players the tactical information they need to make decisions