Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haerfest/bubble-universe
Bubble Universe in Lua and OCaml
https://github.com/haerfest/bubble-universe
bubble-universe love-framework lua ocaml stardot
Last synced: 3 months ago
JSON representation
Bubble Universe in Lua and OCaml
- Host: GitHub
- URL: https://github.com/haerfest/bubble-universe
- Owner: haerfest
- Created: 2024-06-17T12:08:49.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-28T20:10:44.000Z (7 months ago)
- Last Synced: 2024-09-30T06:24:34.317Z (3 months ago)
- Topics: bubble-universe, love-framework, lua, ocaml, stardot
- Language: OCaml
- Homepage:
- Size: 2.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bubble Universe
Implementation of Bubble Universe in:
- [Lua](https://www.lua.org) with [LÖVE](https://www.love2d.org).
- [OCaml](https://ocaml.org) with [ocamlsdl2](https://ocaml.org/p/ocamlsdl2/latest).See [this StarDot thread](https://www.stardot.org.uk/forums/viewtopic.php?t=25833) for context.
The Lua version is somewhat interactive, letting you generate alternative universes or patterns. The OCaml version displays just the default universe.
Interaction in the Lua version:
- `escape` exits.
- `1` and `2` change the number of objects `n` by one. Keep `shift` pressed for steps of 50.
- `3` and `4` do the same for the number of particles per object `m`.
- `space` resets everything to the default universe.
- `a` changes to an interesting figure.
- Click the mouse in the figure to set the starting angles `rx` and `ry` between -2π and +2π.In the top-left corner the current frame rate is shown, as well as the current values of `n`, `m`, `rx` and `ry`.
Some images:
![Original universe](images/1.png)
![A random alternative](images/2.png)
![A random alternative](images/3.png)
![A random alternative](images/4.png)
![A random alternative](images/5.png)