Skip to content

Orasund/elm-cellautomata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elm-CellAutomata

Elm-CellAutomata is a packages that lets you write your own celluar automatas.

To get started, head over to CellAutomata.LifeLike

If you never heard of a celuar automata (or Conways's Game of Life),
checkout this neat little simulator. This should give you an idea what this package is about.

When to use it:

  • To generate dynamic levels in your game.
  • For generative art.

When not to use it:

  • A.I. behaviour. It is possible, but you will most likely get very frustrated
  • Your rules depend on other things beside the state of the neighbors
  • The new state of the cells can not be evaluate indepentend of one another.

What is a Cellular Automata?

The most famous cellular automata is Conway's Game of Life. A cell automata takes the state of a cell as well as the state of its neighbors and then calculate the new state of that cell.

Where are Cellular Automatas used?

whenever something is dynamically generated in a game, it most often has an underlying cell automata. There are a few nice automatas for building landscapes or dungeons.

Motivation

This package was created along side with a little game of mine (that is not yet finished). I needed some general abstractions for all my terrain-generation code. I could not find any package that had something in that direction, so i created my own.

Upcoming features

  • More modules for different types of fields: 3D Grid, triangulations and graphs
  • A adaption of Nicky Case's emoji simulator. In particular it should be able to generate functional elm code.

Changelog

  • 3.0.0 - Added OneOf (List state) to RuleExpression.
  • 2.0.0 - Changed the Order from Maybe state -> Int to Maybe state -> comparable.