Skip to content

Getting Started

polyrain edited this page Aug 1, 2021 · 1 revision

Project Structure

  • assets: Contains supporting assets that aren't directly loaded by the game. This can include wiki images, documentation, texture files, etc.
  • source: Contains the source code of the game following the libGDX project layout.

Running the Game

The game uses the Gradle build tool. Open the source directory with IntelliJ or another IDE with Gradle support to automatically install dependencies. Alternatively, Gradle will install dependencies when you first run the game.

From IntelliJ

A pre-setup Intellij project is provided which contains tasks to run and test the game.

  1. Create a new directory .idea under source/, so that the path of this folder is game-engine/source/.idea/

  2. Copy the contents of .idea.template into .idea. You should now have the path game-engine/source/.idea/workspace.xml

  3. Open the source directory in IntelliJ as an existing project. Say yes to importing Gradle settings.

  4. Under project settings (File > Project Structure > Project), select version 11 as the project SDK and language level.

  1. Run or edit the game using the provided build tasks.

From command-line

Alternatively from a terminal inside the source directory, you can run:

  • ./gradlew run to run the game.
  • ./gradlew test to run the unit tests.
  • ./gradlew build to build a release version of the game.
  • ./gradlew clean to delete the generated output directory.

Dependending on your OS, you may need to substitute ./gradlew with gradlew.bat or gradle (if globally installed).

On MacOS

Depending on your version of MacOS, you may encounter an issue with the game launching but no screen appearing. Make sure you check the MacOS Setup Guide to troubleshoot this issue and get the game running.

Game Introduction

The example game provided is called Box Boy. It is a simple game with a player that runs around a forest filled with ghosts. The following sections will give a light overview on how the game is put together.

Screens and Game Areas

The game is composed of a number of screens and can only display one screen at a time. Within Box Boy there are 3 screens:

The screens are managed by GDX Game: /GdxGame.java, which makes it easy to move between them like a state machine.

When you run the game, you'll first come to the Main Menu Screen. From here you'll see the main menu, where the 'Settings' button will take you to the Settings Screen, and the 'Start' button will take you to the Main Game Screen.

Screens can also contain game areas which makes it easy to create different levels or areas within a screen. An example in the game of this is in the Main Game Screen, which currently has a Forest Game Area. The Forest Game Area is a good place to get started within the code: /areas/ForestGameArea.java.

Screen are responsible for initiating important game services, drawing the background and UI, rendering the entities and handling input. When using game areas, some of the screen's responsibilities can be delegated to the game areas.

In the game, the Main Game Screen intialises important services such as the Physics Service, Input Service, Entity Service, etc., as well as loads assets and creates the UI for the screen. The Forest Game Area is then responsible for loading game area-specific assets, drawing the background tiles, drawing game area-specific UI, creating the trees, player and ghosts, and playing the background music.

Learn more about screens and game areas in Game Screens.

Entities

There are a number of entities within the game including the trees, player and ghosts.

Learn more about entities in Entity Component System (ECS).

Table of Contents

Home


Game Design

Game Design Document

Void/Antivirus

Loading Screen

Game Sound

Menu Assets

Player Design

     Original Design

     Final Design


Gameplay

Movement

Jumping & Sliding

Jump Pads

Portals & Bridges

Buttons

Pick-Ups

Physics

    Momentum & Physics

    Gravity

    Collision


Level Design

Level 1

     Background

     Textures

     Map Design

Level 2

     Background

     Textures

     Map Design

Level 3

     Background

     Textures

     Map Design

Level 4

     Background

     Textures

     Map Design


Sprint Round-Up

Sprint 1 Summary

Sprint 2 Summary

Sprint 3 Summary

Sprint 4 Summary


User Testing

Testing Plans

Sprint 1

     Team 1
     Team 2
     Team 3
     Team 4
     Team 5

Sprint 2

     Team 1
     Team 2
     Team 3
     Team 4
     Team 5

Sprint 3

     Team 1
     Team 2
     Team 3
     Team 4
     Team 5

Sprint 4

     Team 1
     Team 2
     Team 3
     Team 4
     Team 5

User Testing

Sprint 1

     Sprint 1 - Game Audio
     Sprint 1 - Character Design
     Sprint 1 - Menu Assets
     Sprint 1 - Map Design
     Sprint 1 - Void

Sprint 2

     Sprint 2 - Game Audio
     Sprint 2 - Character Design
     Sprint 2 - Menu Assets
     Sprint 2 - Interactable Design Animation
     Sprint 2 - Levels 1 & 4, and Level Editor
     Sprint 2 - Proposed Level 2 & 3 Designs
     Sprint 2 - Current Game State

Sprint 3

     Sprint 3 - Menu Assets
     Sprint 3 - Map Design
     Sprint 3 - Score Display
     Sprint 3 - Player Death and Spawn Animations
     Sprint 3 - Pick Ups and Pause Screen

Sprint 4

     Sprint 4 - Gameplay
     Sprint 4 - Game UI and Animation
     Sprint 4 - Level Background and Music
     Sprint 4 - Game User Testing
     Sprint 4 - Final Game State Testing


Game Engine

Entities and Components

     Status Components
     Event System
     Player Animations Implementation

Level Editor

Level Saving and Loading

Status Effect


Defunct

Development Resources

    Getting Started

Entities and Components

    Level Editor (Saving and Loading
         Multiple Levels)

    Service Locator

    Loading Resources

    Logging

    Unit Testing

    Debug Terminal

Input Handling

    UI

    Level Saving/Loading

    Status Effects

    Animations

    Audio

    AI

    Physics

Game Screens and Areas

    Terrain

    Concurrency & Threading

    Settings


Troubleshooting

MacOS Setup Guide

Clone this wiki locally