Code Monkey home page Code Monkey logo

parquet's Introduction

Parquet

This class library implements mechanics and models for a 2D sandbox game focused on building, crafting, and narrative, more or less in that priority order.

A game built with this system offers many of the features of contemporary quest-driven building games but in a simple, top-down world and without combat.

Version 0.4 Warning

Code and documentation are incomplete and under rapid development. Expect frequent breaking changes. Maybe don't use this yet; when the Alpha milestone has been hit the project should be much more usable.

Design and usage will be fully documented once the Beta milestone has been reached.

Development milestone deadlines are tentative right now. Because this is one of several side projects that I maintain in addition to my fulltime dayjob, it will be a long time before Parquet is ready.

Goals

This project has two goals:

  1. To provide a foundation for games developed in C# stacks;
  2. To provide a learning exercise for the lead developer.

Due to goal 2, no attempt has been made to design the most elegant, efficient, general-purpose, or powerful library possible. What has been attempted is a cleanly-coded, clearly-documented, easily maintainable class library.

Features

Parquet targets the following features:

  1. A peaceful 2D top-down overworld map that may be explored.
  2. Simple free-form building mechanics allowing player characters to create homes in the world.
  3. Resource collection mechanics allowing players to upgrade their homes and tools.
  4. A simple crafting system allowing players to unlock new tools and building materials.
  5. Interactive noncombatant NPCs.
  6. A quest system encouraging players to build particular building types.
  7. Dialogue and narrative delivery.
  8. Data-driven design with all game models customizable from CSV files.

Repository Structure

The solution contains several related projects. Each C# namespace gets its own folder.

  • Documentation
    • How to use the library and its tools.
  • ExampleData
    • Configuration files used in developing and testing the library.
  • ParquetClassLibrary
    • The library itself. The root namespace contains classes for working with Models and Statuses.
    • Beings, including player characters and NPCs.
    • Biomes, sets of characteristics that Regions may share.
    • Crafts, recipes and mini-games that produce Items.
    • Items, objects that Beings may carry, including parquets.
    • Parquets, the basic units of play.
    • Properties error strings, icons, and other static content.
    • Regions, collections of parquets and Beings which together make up the game world.
    • Rooms, built from parquets and recognized at runtime.
    • Scripts, used to define Being Interactions and Item effects.
  • ParquetRunner
    • A simple smoke test.
  • ParquetUnitTests
    • Unit tests for ParquetClassLibrary.

Requirements

To work with this repository you will need:

Contributors

parquet's People

Contributors

caidencestone avatar mxashlynn avatar wispymouse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

parquet's Issues

Revise ChunkType

Many more combinations of floors and blocks are possible than are currently encoded, and there are many more permutations of directionality.

One solution is a "ChunkDescriptor" flags enum, where each Chunk has an open sized list of descriptors: "River" could be a complete set, but so could "North, River, Cavern".

Another solution is to simply have multiple enums for different Chunk properties.

See Isabelle's thoughts at #57 (comment)

Extend Furnishings

Furnishings need to be Walkable/Non-Walkable.

Furnishings should be lockable.

Move the concept of locked doors from blocks to furnishings.

Separate Being Definition from Being Status

Behavior, location, health(?), and individual identity need to be distinct from definition.

This may need some unraveling as there will certainly be multiple instances of the same critter but it's possible many NPCs may have a 1-to-1 relationship between status and definition. Also, critters likely reset on map load whereas characters may persist.

How do spawn points fit in?

Create Item Model

This models items that exist within the player's inventory.

Subtypes of items might include:
• Tools
• Materials
• Key Items
• Equipable Gear
• Consumables

Note that this probably does not include the collectables:
• Health & Mana
• Money

Design & Implement Inventory System

An Inventory needs to:

  • Track arbitrary stacks of arbitrary items.
    • (Including multiple stacks of identical items, i.e. "999 Brick" followed by "183 brick")
  • Provide for organization
  • Indicate different item types, perhaps by segregating them
  • Allow for item disposal (trashing)
  • Provide information about items (subtype, description, rarity, sources)
  • Allow for item consumption

Improve the ToString method of Map types.

Current ToString methods are really wordy. It would be better to provide a simple summary of the object, sort of like:
{ Class : InstanceName (dimension x dimension) contains [int] parquets and [int] special points }

So for example~
”RegionMap: Mordor (12x12) contains 38 parquets and 3 special points”

The existing ToString methods are useful for diagnostic purposes, so they should be maintained with some other method name.

Create Crafting Recipe Model

This should incapsulate:
• the item will be crafted
• all materials needed to craft it
• the layout of panels for the crafting minigame

We need to handle recipe fall-off.

Consider whether CratingRecipes should have fall-offs.
For example, imagine the following recipe;

In: Bucket of Water, Flour
Out: Dough

...but what happens to the bucket of water? Perhaps it comes back as an empty bucket.
If so, this should be modeled, perhaps by having recipes produce multiple outputs.

Create Room Recipe Model

This should include:

  • ID
  • Name
  • Minimum Dimension x&y
  • Floor Types Required (normally any)
  • Wall Types Required (normally any)
  • Furnishings Required (never empty)

Room Type Detection

The game detects what parquets are present within enclosed spaces and uses that information to assign a room type.

This implies that the game also needs to detect enclosed spaces.

Room detection should happen automatically and immediately on loading a map (for any reason; i.e., game load, map editor load, player movement between regions, etc.).

CSVConverter fails on biomes.

CSVConverter fails with "The conversion cannot be performed" on biome text "Swamp".
line 46 of CsvReaderExtensions.cs

Allow Definition/Deserialization of Parquets from CSV files

After a lot of thinking and tools exploration I feel that this will be the most scalable way to define game elements before we have a dedicated modding tool. (I don't want to get bogged down writing a modding tool until we've moved beyond the Class Library phase to work with a GUI stack.)

Create Model for NPCs

Initially, these should just be "critter" type entities without much smarts or substance.

Extend Collectables

Collectables need to support multiple collection actions:

• Adding Items to the players inventory
• Awarding Health, Mana, or Money

Implement Liquids

• Liquids can only exist on the map in Trenches
• Liquids move/spread on their own
• Liquids that border absent floors will pout down to the floor below

  • Liquids that pour down create falls on the lower floor
  • Falls only spawn new liquid blocks if they exist above a trench

Create Panel Model

Panels are areas that the player strikes during the crafting minigame.
This should include:
• lower acceptable boundary
• upper acceptable boundary

This should be v simple, used only within the Recipe model.

Biome Type Detection

The game detects what parquets are present in a loaded map region and uses that information to assign a Biome type.

Create Room Model

A Room contains:

  • its location

Upon request, a Room is able to determine and output:

  • its bounds
  • its contents

Note that rooms must be reevaluated whenever ParquetStacks within their boundaries are updated.

Create Quest Model

A quest needs to contain:
• requirements for its completion (item, maps state, room existence, task completion, more?)
• current status (unknown, unaccepted, accepted, nearly complete, complete)
• effects of its completion (reward item, ability, or plot progress?)

Quests are given by NPCs.

Write all documentation.

The documentation should describe the purpose of each project in the solution and the overall architecture of the programs. This information could also be included in the repo itself in a series of text documents.

Extend Blocks

Blocks need to support the following collection actions:

• Spawn a Collectable
• Spawn an Item in the player's Inventory

Gather actions should be associated with this.

Create a class to handle all serialization IO

There should be one central place that handles write to disks. Individual objects should not have to worry about how to access the filesystem.

Probably this should be a static class.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.