r/adventofcode • u/flapje1 • Dec 09 '22
Upping the Ante [2022 Day 9] I made a playable snake clone using the elf rope physics! (link in comments)
396
Upvotes
r/adventofcode • u/flapje1 • Dec 09 '22
26
u/flapje1 Dec 09 '22
Play it here: https://ebbdrop.com/AoCropeSnake/
Movement with
WASDor arrow keysSource here: https://github.com/EbbDrop/AoCropeSnake
43
u/Milumet Dec 09 '22
Lol, nice. It would be even more hilarious if the tail would do the eating instead of the head.
6
u/kaveman909 Dec 10 '22
Pretty proud of my 2948 score! Funny to watch the other parts of the tail collide/mesh into one another! There seemed to be a disproportionate number of blobs generated along the edges vs. the interior, not sure if that's by design or not (didn't look at the source).
4
u/undergroundmonorail Dec 10 '22
you know, having it interactive like this really makes it clear how surprisingly good of a rope physics model it is
15
u/daggerdragon Dec 10 '22 edited Dec 10 '22
Changed flair fromUpping the AntetoVisualization.Edit: Nah, this is
Upping the Ante. Changed flair back. Sorry!3
u/SimonK1605 Dec 10 '22
Thats awesome
2
u/scratchisthebest Dec 10 '22
enjoying how terrible the puzzle's metric is as a game scoring mechanic. i think the ideal strategy for score is to run around in circles and never eat any pellets lol
2
u/aQaTL Dec 10 '22
Awesome!
2
u/TenViki Dec 10 '22
I was about to do the same thing lol
You were faster..
1
u/QultrosSanhattan Dec 10 '22
You could change the gameplay so you can't eat with the head. Only with the knots.
1
u/prendradjaja Dec 10 '22
Excellent!
1
u/osalbahr Dec 10 '22
Wonderful! How do you decide where to insert the new pixel when the length increases?
1
u/janiczek Dec 10 '22
This would be properly mindbending with a wraparound on the edges
1
u/osalbahr Dec 10 '22
I think the result of this edit was funny, thought I'd share :)
1
u/illuminati229 Dec 10 '22
Yes! Some of my code was based off my old Snake game.