Giter Club home page Giter Club logo

cccitygen's Introduction

cccitygen

ComputerCraft Procedural City Generation Framework - taking city generation with command computers to the next level.

GitHub issues Maintenance GitHub license

This project aims at providing a solid, object-oriented base for procedural city generation in Minecraft. Rather than being a single script (as most of other city generators out there), CCCG mirrors the hierarchy of real world cities in OOP, from districts down to furniture in individual rooms, and uses this pattern to rebuild these structures in Minecraft worlds, procedurally. Apart from being a framework, it also includes example city generation scripts and working assets that can be used freely in any other project (open source FTW! All contents of this repository are licensed under the terms of the GPL v3.0 license).

WIP Notice

CCCG is still quite young, most of the planned features are missing! I am working hard on bringing it into a usable state, but that will take quite some time. Once the repo hits the first pre-release (0.1) I'll switch to a nicer development flow, but for now all commits are dumped straight to master.

~ @viluon

Features

A list of working features implemented to date.

  • Block
    • Supports full NBT data
    • Separate ID and block value fields
    • solid field for distinction between solid and non-solid blocks
  • Point3D
    • Simply stores 3 values, x, y, z
    • Has overloads for adding Point3Ds or numbers to self
  • Grid3D
    • Stores essentially any data in an array of arrays of arrays (3D)
    • size and origin fields
    • Can be (un)serialized to/from a file
    • Methods for converting coordinates from global to local and vice versa
    • Grid3D:iter() iterates over all elements
    • Constructor automagically fills up the mesh with a fill function
  • Structure
    • Extends Grid3D
    • Structure:build() iterates over Grid3D data and places all Blocks encountered
  • Room
    • Implements IHasChildren
      • Support for any children that have the :build() method implemented
    • So far only supports exactly 4 Walls, Walls can be theoretically empty though
    • Ceiling and floor, handled differently than Walls but are in fact instances of Wall
  • Material
    • Pose as shaders for Rooms (Buildings, Walls, Windows, essentially anything that is made of Blocks)
    • Dynamic values with the Mutator class
  • Mutator
    • Can affect a Block depending on its relative position
    • Simply pass a function accepting block, x, y, z to the constructor to create a Mutator
    • Mutators can be chained (using one Mutator at the beginning of the chain will return a result that passed through the whole chain)
  • MaterialPalette
    • A palette of Materials for Rooms to pick Materials from
    • Shortcut methods to add Mutators to all Materials in a subpalette

Credits

Thanks to @Exerro for his amazing class library.

cccitygen's People

Contributors

viluon avatar

Watchers

 avatar

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.