Skip to content

Game Areas

Anastasia Laczko edited this page Jun 11, 2021 · 4 revisions

Introduction

Game areas are areas within the game that have their own terrain, entities and UI. The aim of game areas is to make it easy to create different levels and areas within the same game screen.

The Forest Game Area within the Main Game Screen is an example of a game area.

Resource Management

Assets can be loaded/unloaded at both the screen and game area levels.

In the example game there is only one game area, however, it is very straight forward to add a new game area. This is an example of what it would look like if we added a new (made-up) game area called Forest2GameArea.

There are going to be some assets that are relevant to all game areas within the screen, e.g. the exit button on the Main Game screen. These would be loaded in the screen using the Resource Service.

Whereas assets that are only needed for a single game area, e.g. the Game Area Display which displays the game area's name, can be loaded by the game area using the Resource Service.

This is what asset loading and unloading would look like for a screen which started with a ForestGameArea then transition to a Forest2GameArea.

Usage

Initialising and Moving Between Game Areas

Intialise a game area within the screen:

TerrainFactory terrainFactory = new TerrainFactory(renderer.getCamera());

ForestGameArea forestGameArea = new ForestGameArea(terrainFactory);
forestGameArea.create();

Transition to a new game area within the same screen:

forestGameArea.dispose();
ForestGameArea2 forestGameArea2 = new ForestGameArea2(terrainFactory);
forestGameArea2.create();

Table of Contents

Home

Game

Game Home

Design Influences

Gameplay Features

Style

Story

Friendly Units
Map
City
Buildings
Unit Selections

Spell

Game User Testing: Theme of Unit Selection & Spell System

UI User Testing

Tutorial

Resource Stats Display

Loading Screen Bar

Health Bars
In Game menu
  • Feature
  • User Testing:In Game Menu

Landscape Tile Design

Landscape Tile Design Feedback

Weather Design

Weather Design Feedback

Camera Movement

Enemy design

Enemy Units

Enemy AI

How Animation Works

Map Flooding

Game Engine

Getting Started

Entities and Components

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Troubleshooting

MacOS Setup Guide

Clone this wiki locally