Skip to content

TERRAIN FACTORY

AElanagai edited this page Sep 11, 2024 · 2 revisions

Overview

The TerrainFactory class is responsible for creating and managing the terrain in the game. It generates the visual representation of rooms and levels using tiled maps

Key Components

  • MAP_SIZE: Defines the size of the map in grid coordinates.
  • camera: The orthographic camera used for rendering.
  • currentLevel: Tracks the current level number.
  • isBossRoom: Boolean flag to indicate if the current room is a boss room

Core methods

1. createTerrain(TerrainType terrainType, boolean isBossRoom)- Creates a terrain component based on the specified type and whether it's a boss room. 2. createRoomTerrain(float tileWorldSize, TextureRegion[] tileSet)- Generates a room terrain using the provided tile set. 3. createRoomTiles(GridPoint2 tileSize, TextureRegion[] tileSet)- Creates the tiled map for a room. 4. fillTiles(TiledMapTileLayer layer, GridPoint2 mapSize, TerrainTile[] tileList)- Fills the tile layer with appropriate tiles, including boundary, broken, and stained tiles.

Usage

image

UML

image

Table of Contents

Home

Design

Design Document

Design Choices

Game Wiki

Gameplay

Controls

Game Features

Utilities
Animals
Menus/screens
Character
Map
Weapon
Projectile
Items
Music/sound

User Guide

Starting the game

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

Enhancement of Settings

Troubleshooting

MacOS Setup Guide

Clone this wiki locally