Skip to content

Level Connections

AElanagai edited this page Sep 11, 2024 · 2 revisions

LEVEL SYSTEM

levelclass - The Level class represents a single layer of the game, consisting of multiple rooms for the player to navigate and overcome challenges.

Level factory - is an model for setting different levels in the game to a certain level, which in fact can be understood as the “game mode” setter

Class Overview

The Level class denotes the structure and properties of a game level, it presents its map, rooms, and traversal information

Key Components

  • LevelMap: Represents the layout and connections between rooms.
  • Level Number: Identifies the current level in the game progression.
  • Rooms: A collection of Room objects, each representing a distinct area within the level.
  • Room Traversals: Tracks the number of room transitions made by the player.

Core Methods

  1. getRoom(String roomKey)- Retrieves a specific room based on its unique key.
  2. getStartingRoomKey()- Returns the key of the initial room where the player starts the level.
  3. getLevelNumber()- Provides the current level number.
  4. getRoomTraversals()- Returns

Usage

image

Factory Interface overview

This interface allows for the implementation of various level generation strategies, enabling different game modes or difficulty settings.

Core Method

create(int levelNum): Generates a new Level object based on the specified level number.

Usage

image

UML diagram

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