1 Star 0 Fork 9

YFdyh000 / level13

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Level 13

汉化版:http://likexia.gitee.io/level13

英文版:https://nroutasuo.github.io/level13/

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.

Currently in early development. See changelog.json for version details.

Play lastest (semi-) stable version here.

Features

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

Main features still missing: story and role-playing elements, gods, magic & the ending.

Code Overview

The project uses jQuery, Require.js, and Ash.js and is structured into entities, components and systems.

Entities and Components

There are four types of entities: the player, the tribe, sectors and levels. The player entity has a position, items, stats and so on. The tribe entity stores general game status things like unlocked upgrades. Sectors and levels represent the structure and status of the game world.

All actual game data is stored in various Components of these entities and the game save simply consists of selected components.

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.

User input is detected and mapped to PlayerActions by UIFunctions.

WorldCreator

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

samplelevel2 samplelevel3

(Sample level structure)

The WorldCreator generates from the seed value

  • Basic structure of the world (ground level, surface level, sector locations and passages between levels)
  • World texture (sector features like building density and environmental hazards)
  • Resources (locations where the player can find supplies and workshops)
  • Locales (special locations that can be scouted once for rewards such as blueprints)
  • Enemies (locations and types of enemies that appear in some sectors)

The main constraints for the world creator to keep the game fair and balanced is that all sectors are accessible (there is enough water/food scattered across the level) and that enemy and environmental hazard difficulty increases proportionally to available equipment.

The basic unit for balancing the world creator is the Level Ordinal. Level 13 where the player always starts is ordinal 1, Level 12 is 2, and so on all the way to the Ground Level. Level 14 is Ground Level + 1 and so on until Surface Level. For some values, Camp Ordinal is used instead.

Game Systems

The game consists of several systems but here are some important ones:

  • GameManager starts and loads the game and creates entities.
  • Various UIOutSystems update the UI.
  • SaveSystem saves the game state periodically by simply saving certain components that have been marked with the SaveComponent.
  • PlayerPositionSystem keeps track of the current sector and level the player is in.

Contributing

If you want to report bugs or suggest new features please check 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:

The MIT License (MIT) Copyright (c) 2015 Noora Routasuo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

汉化版: 展开 收起
HTML/CSS
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
HTML/CSS
1
https://gitee.com/yfdyh000/level13.git
git@gitee.com:yfdyh000/level13.git
yfdyh000
level13
level13
master

搜索帮助