MCPcopy Index your code
hub / github.com/AnneKitsune/game_features

github.com/AnneKitsune/game_features @0.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.3.0 ↗ · + Follow
99 symbols 137 edges 16 files 35 documented · 35%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Crates.io docs page

Support what I do on Patreon.

The goal of the library is to share common game features between developers.

Open Source Game Features

Are you tired of games keeping their features for themselves?

Wouldn't it be great if we could share the general features that are really common and spend the time we would save making awesome games?

No one wants to spend 30 hours programming an inventory system that is (almost) the same as those currently released in closed source games.

Its time we change this!

By making as many of the general game features as possible open source, the game developement community will finally be able to focus on what really matters: Making their game unique and enjoyable!

This library aims to do just that. It is a repository where we will share and develop together those reusable game pieces.

Here's some examples of such game features: * Inventory systems * User management * Game chat * Permissions * And many others

Principles

We aim to be data-oriented to facilitate the integration in whichever workflow you have.

Everything here is composed of serializable data and generics. We are not constraining you to a specific way of handling changes in the data.

Integrating those game features is easy: * Take the events coming from your game engine or game logic * Use them on one or many of the features from this repository * Notice the changes in the data * Give feedback to your user/player

Its that simple!

Even better, since all data is meant to be serialized, and is created by composing structures together, you can easily: * Save the game state * Store it in a relational database (or any file, really) * Load it into a running game * Inspect it * Debug changes * Painlessly refactor

Features

Implemented

  • Extensible and fully-featured Inventory system
  • Complex Loot Trees
  • Stats, Stats Modifiers
  • Skills
  • Unlockables

Planned

  • Player Authentication
  • User Management (kick, ban, mute, etc)
  • User Permissions
  • Group Based Chat Formatting and Scopes
  • World ownership and protection systems
  • Faction-based claiming systems.

Stats? Items? Skills? What are those?

Concepts

Contributing

I highly encourage contributing to this library. All of the game developement community will be able to benefit from it. And when they benefit, you benefit too via the increased amount of visibility of the library, which means more developement effort and more features!

If you cannot or don't want to contribute code, you can still help! All money that goes into my Patreon is a huge help and allows me to spend more time working on this project.

Compatibility

I am currently looking into FFI bindings compatibility. If the library is compatible (which it should), that means that it will be usable in any language that can bind to a C API. Yes, that means you will be able to use this library in your c, c++, c# projects, making this library compatible with the following engines: * Source * Unity * Unreal * Cry Engine * Amethyst Engine * Piston * ggez * Any engine that can load a c static library in any way (.dll, .so).

Usage

Add this line to your Cargo.toml file:

game_features = "*"

For more information on each feature, see the docs badge at the top of this page. Alternatively, for usage examples, there are unit tests at the bottom of each file (except lib.rs) in the src/ directory which are good examples.

Good luck! Feel free to ask any questions you may have.

Contact

When possible, report issues through Github's issues page.

Extension points exported contracts — how you extend this code

SlotType (Interface)
A trait defining which items can be inserted into each inventory slot type. [2 implementers]
src/item.rs
LevelFor (Interface)
Will usually use PartialFunction.
src/tier.rs

Core symbols most depended-on inside this repo

get
called by 6
src/item.rs
get_mut
called by 5
src/item.rs
delete
called by 4
src/item.rs
insert_into
called by 4
src/item.rs
insert
called by 3
src/item.rs
build
called by 2
src/loot_tree.rs
transfer
called by 2
src/item.rs
delete_stack
called by 2
src/item.rs

Shape

Method 47
Class 36
Enum 12
Function 2
Interface 2

Languages

Rust100%

Modules by API surface

src/item.rs38 symbols
src/stat.rs17 symbols
src/unlock.rs9 symbols
src/faction.rs7 symbols
src/skill.rs6 symbols
src/loot_tree.rs6 symbols
src/gun.rs6 symbols
src/item_transition.rs4 symbols
src/tier.rs3 symbols
src/user_group.rs2 symbols
src/user.rs1 symbols

For agents

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

⬇ download graph artifact