Skip to content

City generation

kaitlyn-lake edited this page Oct 4, 2022 · 4 revisions

Overview

Procedural city spawning is implemented with MapGenerator.java, all classes in game/areas/MapGenerator/Buildings/ and all classes in game/areas/MapGenerator/pathBuilding/. The entry point to the generation code can be found in AtlantisGameArea.spawnCity(). The call flow of the major classes are as follows:

MapGenerator->BuildingGenerator->PathGenerator->FindPath ->CheckConnectivity

Where '->' reads as 'instance is passed to'.

Once the city feature placements are generated, spawnBuildings() is called from spawnCity() to spawn the buildings in game and then spawnPaths() is called to place the path tiles.

City Spawning

Testing

Verifying AtlantisGameArea.spawnCity(), and the spawnBuildings() and spawnPaths() methods work, is done visually. Through multiple game generates it was determined that buildings are scaled correctly according to the tile sizes specified in buildingSpecification.json, and placed according to the positions determined by BuildingGenerator and PathGenerator. The following visual checks are done:

  • Walls and gates are placed at the edges of the city, bordering the city tile edges.
  • Wall assets join in a consistent way.
  • Paths meet building door positions relatively accurately.
  • Buildings do not overlap with other entities.
  • Paths are not placed outside city bounds or through building and wall placements.

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