HyperOnion
0f1b2f0d54
update readme.
2023-06-28 16:18:58 +02:00
HyperOnion
171d78adb0
clean up world constants to make more sense.
...
create a constant that represents the amount of tiles a box extends out
from its center in all 4 directions. compute the box size and box center
position constants from this new constant, instead of having them be
hard-coded.
2023-06-28 16:16:26 +02:00
HyperOnion
9193a43fbc
improve drawing of empty tiles.
...
make empty tiles render as 2x2 squares, fixing color alignment and chirality issues.
also make corners and centers of boxes be marked by empty tiles there
being darker than usual.
2023-06-28 15:40:23 +02:00
HyperOnion
7c7d939905
add world utility function for setting tiles to empty.
2023-06-28 15:15:19 +02:00
HyperOnion
b886a3a965
make representation of empty tiles consistent.
...
previously, world generation would represent empty tiles as the number
0, while other code would expect them to be an object with its `type`
property set to `"empty"`. the object representation is now used
consistently.
2023-06-28 15:15:19 +02:00
HyperOnion
a55eb310b0
recursively update tiles within boxes.
2023-06-28 15:15:19 +02:00
HyperOnion
b5574e33fa
improve grass growth.
...
grass now checks all adjacent tiles when attempting to grow.
2023-06-28 15:15:19 +02:00
HyperOnion
b93cc3210c
initial grass test.
...
start working on tile updating code; add grass as test & demo for this.
add temporary "texture" for grass, and keybind for creating it.
2023-06-28 15:15:19 +02:00
HyperOnion
27fe7d64eb
fix typo in iter_2d.
...
replace two "for in array" loops with "for of array" loops. the former gives indexes
as strings, whereas the latter gives the actual array items.
2023-06-28 15:15:19 +02:00
HyperOnion
4ec9d7fb4c
add todo list and todo item.
2023-06-28 15:15:19 +02:00
HyperOnion
9f2f80a02b
fix readme formatting typo.
2023-06-28 15:15:19 +02:00
HyperOnion
f4daeda953
add various rambles to readme.
2023-06-28 15:15:19 +02:00
HyperOnion
54d4a07b90
rewrite readme info about exiting boxes.
2023-06-28 15:15:19 +02:00
HyperOnion
80bb0edf03
don't render box contents if they would be small enough to be invisible.
2023-06-28 15:15:19 +02:00
HyperOnion
b28dcba597
refactor graphics code.
...
separate tile drawing from box/world drawing, and simplify some of the
math.
2023-06-28 15:15:19 +02:00
HyperOnion
1c79bca1c9
track nesting depth in boxes.
2023-06-28 15:15:19 +02:00
HyperOnion
5643fd86e2
fix world save & load bug.
...
previously, serialization of world data couldn't handle boxes, since
they contain references to their parents, meaning worlds are cyclic.
this commit fixes this, and changes world loading to correctly re-assign
parents to boxes after deserializing them.
this bug is what happens when you commit without testing for more than a
few seconds.
2023-06-28 15:15:19 +02:00
HyperOnion
41b9ab7a2e
fix worlds with boxes not saving & loading due to cyclic references.
2023-06-28 15:15:19 +02:00
HyperOnion
17ad391731
add autosave and world reset button.
2023-06-28 15:15:19 +02:00
HyperOnion
229e7471ef
fix unnoticeable bug in world creation code.
2023-06-28 15:15:19 +02:00
HyperOnion
7299916fa7
implement saving and loading world data to file.
2023-06-28 15:15:19 +02:00
HyperOnion
bfb207386c
add keys for more paint colors.
2023-06-28 15:15:19 +02:00
HyperOnion
75c42acefe
add demo video.
2023-06-28 15:15:19 +02:00
HyperOnion
78e8d3c4fc
create readme.
2023-06-24 14:15:27 +02:00
HyperOnion
821dbc4db4
add more temp controls for experimenting.
2023-06-24 14:15:27 +02:00
HyperOnion
4dbb92c951
tiny refactor of entity code.
2023-06-24 14:15:27 +02:00
HyperOnion
e40eede84d
handle out of bounds positions in tile manipulation functions.
2023-06-24 14:15:27 +02:00
HyperOnion
9668b8a8d2
make box checkerboard floors line up nicely.
2023-06-24 14:15:27 +02:00
HyperOnion
9fd2b0e21b
create basic paint tile type and some controls for creating paint.
2023-06-24 14:15:27 +02:00
HyperOnion
204075465c
recursively draw box contents inside of them.
2023-06-24 14:15:27 +02:00
HyperOnion
b2b4d9dced
implement basic box entering and exiting in entity movement.
2023-06-24 14:15:27 +02:00
HyperOnion
68c93726f0
refactor world code to no longer assume the player entity:s pov.
2023-06-24 14:15:27 +02:00
HyperOnion
c8e8d7eb70
begin refactoring movement logic out of player code into entity code.
2023-06-24 14:15:27 +02:00
HyperOnion
96678ea5a2
remove dead comment.
2023-06-24 14:15:27 +02:00
HyperOnion
9deb3b024a
change canvas size to be a power of 9.
2023-06-24 14:15:27 +02:00
HyperOnion
fbf0960e7e
create entity module and refactor player into entity.
2023-06-24 14:15:27 +02:00
HyperOnion
f7caf8a3a8
implement basic box functionality.
2023-06-24 14:15:27 +02:00
HyperOnion
b4976a0d94
basic player movement and general cleanup.
2023-06-24 14:15:27 +02:00
HyperOnion
82a1cd243a
get basic graphics set up.
2023-06-24 14:15:27 +02:00