Skip to content

Areso/level13

 
 

Repository files navigation

Level 13

Level 13 is an text-based incremental science fiction browser adventure where the player must survive in a dark, decayed City, (re-)discover old and new technologies, and rebuild a civilization that has collapsed.

The game is in early development. You can play latest (semi-) stable version here.

Level 13 is a personal side project but has received some fixes from the community along the way. If you are interested in contributing, check the contributing guidelines first.

Features

  • Survival and exploration
  • Base-building and resource-management
  • Randomly generated maps
  • Items, equipment and environmental hazards
  • Technologies that slowly unlock new aspects of the game

Major features still missing are story and RPG elements. Player progress is currently also limited to certain levels - it is not yet possible to reach the actual ending of the game.

Code Overview

The project uses jQuery, Require.js, and Ash.js and is structured according to an entity system framework into entities, components and systems. The playable version lives on the gh-pages branch whereas master may contain untested and unbalanced features.

Entities and Components

All game data is stored in various Components that are attached to entities such as the player or a sector. Entities are simply containers for Components. The EntityCreator gives a good overview of what kind of entities have what kind of components.

Systems

Various independent Systems use and change data on Components and make stuff happen in the game. They generate resources, update movement options, resolve fights and so on. Each area of the UI is taken care of its own UI system.

Player Actions

Everything that the player can do in the game - mainly button clicks - are "player actions". Each action has a name, costs, requirements and so on defined in the PlayerActionConstants. The PlayerActionFunctions class contains a function for each action and handles their results. Various helper classes take care of checking those requirements, deducting costs, unifying random encounters etc.

World Creator

At the start of a new game, a seed value is assigned to the game. The World Creator generates a unique world based on this seed and only the seed needs to be saved between sessions.

samplelevel2 samplelevel3

(Sample level structure)

The world is generated in roughly the following steps:

  • WorldGenerator determines rough structure of the entire world and important points like camp and passage locations
  • LevelGenerator adds more details to each level
  • StructureGenerator determines the structure of each level, placing sectors and paths according to constraints set in the previous steps
  • SectorGenerator populates the sectors with features like resources, item stashes, environmental hazards, movement blockers etc

Two important units for balancing the world are the camp ordinal and the level ordinal. Level 13 where the player always starts has level ordinal 1 and camp ordinal 1.

Contributing

If you want to report bugs or suggest new features please read the contributing guidelines first.

Links

Level 13 is heavily inspired by A Dark Room. Other great text-based and / or incremental games that the game owes much inspiration to include:

About

Incremental browser text adventure

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 90.4%
  • CSS 5.0%
  • Less 2.3%
  • HTML 2.3%