bunniesin.love
- 8 Devlogs
- 44 Total hours
A daily puzzle game about two lover bunnies! Made with svelte/ts/scss.
A daily puzzle game about two lover bunnies! Made with svelte/ts/scss.
new entity type: carrots! they can be placed on top of existing tiles. carrots subtract 3 from your move count, when a bunny consumes a carrot! consume a carrot by moving a bunny on top of a carrot.
instead of the O(N^2 * 2^C * C) BFS solver, I made a O(N^2 * 2^C * (C + log N)) A* algorithm! to avoid doing a linear scan over the board for every carrot, i implemented a bigint bitmask and used brian kernighan’s bit trick to efficiently read carrots in O(1) time.
although the BFS technically has a better worse case, A* uses a distance heuristic to prioritize paths that lead towards goals, avoiding dead paths.
finally, ive implemented creating a web worker to solve the solution on a different thread, preventing the UI from freezing while the solver tries to solve the level.
used stacks for undoing/redoing in editor, available through ctrl + z or cmd + z/ctrl + y or cmd + y
As a prize for your great work, look out for a bonus prize in the mail :)
more QoL features and guidance!!
you can now move between puzzles from previous dates.
you can now undo your last move, but only one undo at a time.
if you are a new user, it shows you where the editor and tutorial are (for clarity)
you now have to confirm the submission of your solution, so you don’t accidently submit a bad solution.
if you solved the puzzle, and decided to reset, you can now always go back to the best solution you previously had.
you now have to confirm your upload. also gives you the option to change the name/author directly in the modal.
full editor and user uploading!
You can now upload your levels to the database and easily share them! Anyone can play user-made levels if they have the link. Keep in mind, though, there are rate limits to uploading and you can get your IP restricted for the day.
User-made levels can now be renamed using the editor, instead of direct file changing in an exported file.
Stylized the histogram and made it easy to understand the statistics. Also added a share feature that copies text to your clipboard.
beta release!!
I can now easily add daily levels by directly adding them to the database. You can only solve the daily level once per day, kept through a unique user ID stored in localStorage (which can be easily overridden, but I don’t really care.)
User-made levels can be export in a JSON format, and imported.
Added on-screen buttons for mobile users, since they don’t have a keyboard.
Purchased the bunniesin.love domain for $7! Totally worth it
bunny level editor!
You can now navigate to the level editor (top left button) and create a level! Control the board size, bunny locations, and every tile in the board. Export and import levels to save them. You can also see whether your puzzle is solvable or not, and how many moves it takes.
tutorial guide dude :3
There are now 3 total tutorial levels, with me guiding the user through all of them. Each level progressively gets harder, and teaches the user how to solve a puzzle.
The board is now optimized for display on phones; controls are WIP.
Entity infrastructure can now be easily extended for feature such as buttons or other items. However, the solver can’t use these features, so I’m holding off on implementing them.
improved UI; added level creator page and more tiles.
Players that have never visited the website before are now shown an intro modal. This can direct them to play without guides, or play the tutorial.
Full implementation WIP, but I created an editor version of the game so that the user can click to paint tiles. It was pretty annoying to figure out how to detect mouse events and cast them to a tile, and mutate the board state. Also really difficult to add a grid and hover effects.
More tiles, more fun :3. Added variations of grass and walls.
Now displays the day and level name, inside a carrot. Probably the most creative and original idea I’ve ever had. I’m really the best web designer that has ever lived.
functional rule tile/tilemap system using canvas + game state machine
Created a full tilemap/tileset painting system from scratch. Uses HTML5 canvas to paint the tilemap, and a spritesheet for the textures. Pretty difficult to implement, but since I know how game engines work, I can infer on how to implement it in svelte, using state runes.
The game now relies on a single instance of the state machine as a source of truth (class Game). Can be easily extended for future features.