15 lines
769 B
Plaintext
15 lines
769 B
Plaintext
Dungeon generation algorithms are written in lua and dropped into scripting->algorithms. They are automatically parsed by the visualizer and assigned keys in the program to run them.
|
|
Algorithms are made up of a single lua file (possibly more with requires) with the following functions:
|
|
|
|
initialize()
|
|
Initializes the algorithm and returns a structure/table with the following fields:
|
|
{
|
|
updates_per_second: int // Number of times the algorithm's update function should be called per second. Minimum of 1, converted into frames per update with a minimum of 1.
|
|
free_data: table // Free table that the developer can store necessary state data in
|
|
}
|
|
|
|
update(state)
|
|
|
|
The following functions are available to algorithms in either their update or initialize functions:
|
|
|