MCPcopy Create free account
hub / github.com/DomWilliams0/name-needed

github.com/DomWilliams0/name-needed

Chat with this repo
repository ↗ · DeepWiki ↗ · release pre-alpha-131 ↗ · + Follow · compare 2 versions
3,181 symbols 8,648 edges 281 files 411 documented · 13% updated 2y agopre-alpha-131 · 2022-01-25★ 1001 open issues

Browse by type

Functions 2,421 Types & classes 760
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

name-needed

Build status Devlog Lines Files Test Count

A one man effort to produce an open source, intuitive and high performance Dwarf Fortress-esque game. Needs a name.


Progress log

  • 25 Jan 2022: A better UI for selecting entities with a dragged selection, and for issuing commands via a right-click context menu.

  • 08 Jan 2022: In-world text labels to show entity types and names, job progress and item stack information.

  • 22 Dec 2021: Material gathering for simple build jobs, with homogeneous item stacking. The build job (translucent square) requires 6 stone bricks, which are brought over in a stack of 5, then 1. The blue circle then uses these gathered materials to build a stone wall.

  • 08 Oct 2021: Major overhaul of activities (go pick this up, go break this block, etc) to use a custom async runtime for long running tasks, rather than manually implementing state machines. Activities are now much easier to write and maintain.

  • 16 May 2021: Simple Lua scripting API.

  • 02 May 2021: Tree placement in forests. Trees are very simplistic for now, more like large mushrooms. There's a lot of progress behind the scenes in parallel regional feature discovery, which will be documented in a future devlog.

  • 29 Mar 2021: Basic planet-scale biome selection based on temperature/latitude/moisture/elevation. Pictured is a smooth transition between a plains and beach biome.

Continued here

Building/downloading

The engine uses SDL2 and OpenGL 3.3, and is developed primarily on Linux, although it seems to work fine on Windows too. macOS is not yet supported due to its depreciation of OpenGL.

See the releases page for prebuilt binaries - occasionally the main develop branch is built and published there. Download the archive for your platform, unzip and run the name-needed binary in that directory. On Linux, you will need to install SDL2 through your distribution's package manager first.

Otherwise you can build it with cargo build --release (debug builds are really slow). Ensure SDL2 is installed.

I use the latest stable Rust toolchain and the newest fanciest language features, so no promises for a Minimal Supported Rust Version.

$ git clone https://github.com/DomWilliams0/name-needed

$ cd name-needed/

$ # optionally modify game config, see below

$ cargo run --release

Configuration

The game config can be found in resources/config.ron. This contains settings for the game engine, world generation and entity spawning parameters.

Entity definitions live in resources/definitions/ and define the stats and capabilities of all entities, both living and inanimate.

The environment variable NN_LOG configures logging, set it to one of trace, debug, info (default), warning, error, critical.

The --scenario parameter chooses a specific situation to spawn entities in, for example people hauling things to a chest or wandering around and picking up food. Provide an invalid scenario to list all available ones (sorry, what an awful interface).

Usage

Note: the "game" is currently very much a demo and not very playable in the slightest. Abandon all expectations!

  • Alt+Esc to exit (most importantly)
  • Alt+R to restart
  • Right-click to drag a selection over blocks in the world
    • Then Right-click in the bottom right corner to build there/destroy the blocks
    • Move the selection up and down with buttons in the World tab
  • Left-click (or drag) to select entities
    • Then Right-click a location in the world, or another entity to order them around
  • Escape to clear the current entity and world selections
  • Move the camera sideways with WASD, and vertically with the Arrow keys

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 2,025
Class 517
Function 396
Enum 191
Interface 52

Languages

Rust100%

Modules by API surface

game/world/src/world.rs80 symbols
game/world/src/chunk/terrain.rs72 symbols
game/simulation/src/ecs/world.rs59 symbols
game/procgen/src/biome.rs52 symbols
game/simulation/src/item/stack.rs48 symbols
game/procgen/src/region/regions.rs47 symbols
game/simulation/src/item/inventory/component.rs44 symbols
game/procgen/src/region/feature.rs44 symbols
renderer/engine/src/render/sdl/gl/vertex.rs41 symbols
game/simulation/src/input/system.rs38 symbols
game/procgen/src/region/region.rs37 symbols
game/world/src/viewer.rs35 symbols

For agents

$ claude mcp add name-needed \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page