go_gens

module
v0.0.0-...-127c1ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2024 License: Apache-2.0

README

Go Generators

This repository contains various small attempts at procedural generation, simulation, and other things that might be useful for some people.

PLEASE NOTE: These packages are under constant development for maybe a month or two until I've figured out a consistent style etc.

DO NOT USE YET!

Simulation and procedural generation (WIP)

gamecs: Simulation with agents

This is a very basic simulation with agents using state machines and behavior trees.

gamehex

Sample project to demonstrate how to use the Ebiten game engine to create a hexagonal game. This is still a work in progress.

alt text

gameisometric

This is a simple isometric 'game' experiment using the ebitengine and is written in Go.

alt text

gameraycast: Raycast implementation

This is a very basic raycast implementation using a randomly generated dungeon for testing. This isn't very feature rich yet, but it's a start.

alt text

gamerogueish: Rogue-like game skeleton

This is a very basic rogue-like game skeleton... Barely functional.

alt text

Now found here: github.com/Flokey82/gamerogueish

genarchitecture: Architecture generator

This is a package for architectural style generation. It is still in the experimental phase and will probably change a lot in the future.

alt text

genbiome: Biome helper functions

This package provides functions for looking up the biome (e.g. forest, grassland, etc.) for the given precipitation and average temperature.

gencellular: Simple cellular automata in Golang

This package currently only implements Conway's Game of Life.

gencitymap: City map generator

This package is based on various implementations of city map generation. Currently supports simple random networks and tensor field based road network generation.

alt text

alt text

gendemographics: Medieval demographics generator

This package is based on Medieval Demographics Made Easy by S. John Ross and generates demographics based on settlement density, population, etc. The code is currently very messy and needs to be cleaned up.

gendungeon: Dungeon generator

This package is a modified fork of https://github.com/brad811/go-dungeon/, which is an implementation of http://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/.

alt text

This does now support multi-level dungeon generation with stairs.

genfloortxt: Simple 2D text floorplan renderer

This package provides a little demo on how to 'render' walls as unicode characters, imitating the cp437 symbol set.

genfurnishing: Simple generator for furnishing of rooms

This package will provide logic for generating clutter and furnishing for rooms of different types.

genheightmap: Heightmap generator helper functions

This package provides some helper functions for generating heightmaps like slopes, cones, peakify, relax, etc.

genlanguage: Language generator

Fantasy language generation wrapper used for fantasy map naming stuff.

genlsystem: L-system generator

This package implements a 2d and 3d L-system generator with turtle graphics. This code is heavily based on:

genmap2d: Simple 2D map generator in Golang (WIP)

This package provides functionality to generate 2D maps using procedural methods. It has a rudimentary settlement placement logic and probably needs lots work.

alt text

genmap2derosion: Heightmap generation and erosion

This package is based on the fantastic work of Nick McDonald! See: https://github.com/weigert/SimpleHydrology

alt text

genmapvoronoi: Voronoi map generator

This is based on https://mewo2.com/notes/terrain/ and partially a port of https://github.com/mewo2/terrain/ to Go.

image: alt text

genmapvoxel: Voxel map generator

This package implements a simple voxel based terrain generator. Like... really simple. Don't get excited.

alt text

genmarchingcubes: Marching cubes (WIP)

This package is an implementation of the marching cubes algorithm, which takes a voxel field and generates a surface mesh. Right now it is an almost straight fork of https://github.com/soypat/sdf/blob/main/render/marchingcubes.go and https://github.com/fogleman/mc/blob/master/mc.go but will be heavily modified in future versions. (It might already be, depending how lazy I am updating the READMEs)

alt text

genmarchingsquares: Marching squares (WIP)

This package provides a simple implementation of the marching squares algorithm for illustrative purposes for now.

alt text

genreligion: Religion generator

This is based on Azgaars Fantasy Map Generator.

genstory: Flavor text generator

Provides some functionality to create configurations for generating random flavor text.

genthesaurus: Word association index

A very basic word association index... Work in progress.

genworldvoronoi: Graph based planetary map generator

It simulates (somewhat) global winds and attempts to calculate precipitation and temperature for more intricate simulations in the future. It features SVG, PNG, and Wavefront OBJ output. This is based on https://www.redblobgames.com/x/1843-planet-generation/ and a port of https://github.com/redblobgames/1843-planet-generation to Go.

alt text

genvillage: Village economy generator

This package attempts to generate a stable, self sustaining economy given some initial buildings that serve as seed. The user can define building types that consume and produce resources, which the simulation will use to add new buildings until the sum of produced resources outweighs the sum of consumed resources. Please note that the output of this process is only meant to be used as input for a more sophisticated generator, only ensuring that besides required import of unavailable resources, the village/settlement can be in theory self-sustaining.

Don't get your expectations up, it's really basic. : P

simmarket: Market economy simulation

Based on a few, way better implementations for economy simulation.

simnpcs: NPCs with daily routines

This is an early experiment in simulating NPCs with daily routines. Sadly it is quite messy and doesn't follow best practices. It also has plenty of leftover code that I don't want to delete. I might clean it up in the future.

simnpcs2: NPCs with daily routines (WIP)

This is a rewrite of simnpcs and gamecs... still in early stages of development.

simvillage: Village simulation

This package is a port of the wonderful village simulator by Kontari. See: https://github.com/Kontari/Village/ Since I ported it straight from Python to Go, it is quite chaotic and probably would benefit from a refactor.

simvillage_simple: Village simulation (simple)

A very basic village simulator which has settlers settle, procreate, live, love, and perish :) It is a very dumbed down version of kontari's village simulator, written from scratch.

simvillage_tiles: Village simulation on a tile based map (WIP)

Currently, this only provides a very basic tile based renderer with some basic collision detection, etc. In future, it will be a village simulation on a tile based map. (Uses https://ebiten.org/)

alt text

Utility

utils

This package contains a number of useful and commonly used functions and structures.

vectors

Various vector math functions.

vmesh

A voronoi mesh generation helper library. This is still very much bound to the genmapvoronoi package, so not very helpful for generic use. Sorry about that.

Directories

Path Synopsis
Package gameconstants provides various interesting constants for games.
Package gameconstants provides various interesting constants for games.
cmd
Package gamehex implements an example hexagonal game board and uses ebiten for rendering.
Package gamehex implements an example hexagonal game board and uses ebiten for rendering.
cmd
cmd
cmd
Package gamesheet provides a minimal character sheet for agents, or players.
Package gamesheet provides a minimal character sheet for agents, or players.
cmd
cmd
Package gencellular implements cellular automata (for now Conway's Game of Life).
Package gencellular implements cellular automata (for now Conway's Game of Life).
cmd
Package gencitymap generates a city map.
Package gencitymap generates a city map.
cmd
Package gendemographics is based on Medieval Demographics Made Easy by S. John Ross.
Package gendemographics is based on Medieval Demographics Made Easy by S. John Ross.
cmd
Package gendungeon implements a simple dungeon generator forked from https://github.com/brad811/go-dungeon which is in turn based on http://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/
Package gendungeon implements a simple dungeon generator forked from https://github.com/brad811/go-dungeon which is in turn based on http://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/
cmd
Package genfloortxt renders a primitive floor plan read from an ASCII file to the console.
Package genfloortxt renders a primitive floor plan read from an ASCII file to the console.
cmd
cmd
cmd
cmd
cmd
Package genmap2d implements...
Package genmap2d implements...
cmd
Package genmap2derosion is based on "Simple Hydrology" See: https://nickmcd.me/2020/04/15/procedural-hydrology/
Package genmap2derosion is based on "Simple Hydrology" See: https://nickmcd.me/2020/04/15/procedural-hydrology/
cmd
Package genmapvoronoi is based on https://mewo2.com/notes/terrain/.
Package genmapvoronoi is based on https://mewo2.com/notes/terrain/.
cmd
cmd
Package genmarchingcubes implements the marching cubes algorithm.
Package genmarchingcubes implements the marching cubes algorithm.
cmd
Package genmarchingsquares implements the marching squares algorithm.
Package genmarchingsquares implements the marching squares algorithm.
cmd
cmd
Package genstory provides means to generate text from templates and / or rules.
Package genstory provides means to generate text from templates and / or rules.
cmd
genbooks
Package genbooks is an example application of genstory for generating book titles.
Package genbooks is an example application of genstory for generating book titles.
genweapons
Package genweapons is an example application of genstory for generating weapon flavor text.
Package genweapons is an example application of genstory for generating weapon flavor text.
cmd
Package genvillage provides a very simple generator which attempts to generate a self-sustaining settlement economy given a number of buildings that consume and/or produce a number of resources.
Package genvillage provides a very simple generator which attempts to generate a self-sustaining settlement economy given a number of buildings that consume and/or produce a number of resources.
cmd
Package simmarket implements a simple market simulation.
Package simmarket implements a simple market simulation.
cmd
cmd
cmd
Package simvillage is a port of the wonderful village simulator by Kontari.
Package simvillage is a port of the wonderful village simulator by Kontari.
cmd
cmd
Package simvillage_tiles is a tile based village simulation based on: https://ebiten.org/examples/tiles.html https://ebiten.org/examples/animation.html
Package simvillage_tiles is a tile based village simulation based on: https://ebiten.org/examples/tiles.html https://ebiten.org/examples/animation.html
cmd
Package utils provides some commonly used functionality.
Package utils provides some commonly used functionality.
Package vectors implements various vector thingies.
Package vectors implements various vector thingies.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL