i made a game about a penguin
recently i made a little game in javascript in about a week!
its kind of a gay love story walking simulator i guess? i dont really know the genres it would fit in best. anyway im just gonna write about the developpement of the game hehe
snow simulator
the original thing i started with was a tiny prototype for a snow physics simulation. you could just move around and in doing so displace the snow. i didnt even know if i wanted to make a game out of this, i just had the idea for this while going to sleep and really wanted to see if it would work lol
i made it using my tiny javascript game engine microgame which ive been using for most of my recent projects. its fairly similar to löve2d except it has way less features and is made for the type of games i usually make. its still basically only msde for me and has a lot of weird quirks but id like for itto become a tool other ppl could use for their games :)
the pinguni
the next step is to add an actual playe character lol. whats interesting is that the penguin (and all other objects in the game) arent sprites or 3d models, its just a bunch of circles and other shapes drawn slightly offset to eachother
and since its a bunch of shapes drawn cia code i can just animate it using math and stuff :D although tweaking the animations was really annoying since i had to edit a number in the code and refresh thpage each time. next time ill probably make some kind of debug ui to edit the values live.
i do kinda have a problem with making tools to make the developpement easier. its just really annoying to make new code that wont be used in the game. but they do make editing stuff way easier.
trees
next up i had to add trees to spruce up (pun intended) the landscape. i know there arent really trees in the south pole but who cares. the penguin is a poet.
here are a couple of in developpement screenshot:
it took a while to get right but i think they look alright.
i spent a while trying to make drawing the trees more efficient cuz turns out drawing a lot of circles every frame kinda hurts performance. ill write more about optimization later
writing the story
so at that point i had a game where u can walk around and see trees. not very interesting. so i spent like 10 minutes figuring out what the game is about and what you do. then i locked in for a few hours and wrote most of the journal entries. then during the rest of the developpement i edited them a bunch
funnily enough a few detail that i randomly came up with actually match up pretty well with real life. for example in antarctica its winter during june.
this is my first time spending so much time writing. usually i write the first word that comes to mind and sometimes after i quickly check if what i wrote sounds okay. but for this game i tried to put a lot more thought into the words. im not really satisfied with the writing but i think its ok, and i cant get better without doing it! i did kinda give up at the end cuz its pretty boring for me to try and express my thoughts perfectly.
originally the journal ui looked quite different, but my friend convinced me to make an actual ui, which was a good idea. and also led me to make my own handwritten font because i guess i didnt think of using one that already existed lol
also instead of pencils you would find ink bottles... which isnt as easily recognizable
creating the world
then i spent the next few days fixing stuff, adding trees and pencils and optimizing. i did start to slow down quite a bit cuz it got pretty boring...
i had a pretty funny way to add trees. since i was too lazy to make an editor, i just made a keyboard shortcut that spawned a tree at the player position, and another to copy the list of trees to the clipboard as json.
optimization
i spent a bunch of time on this, originally trying to get 60fps on my (old as hell) computer but i kinda gave up on that. i did do a bunch but i dont think i could do that much better without using webgl. i just couldnt be bothered with learning some complicated looking technology.
the biggest bottleneck is drawing all the snow and trees. originally each snow particle was a circle but squares are much faster to draw. also the snow is processed and rendered in "quadrants" stored in a hashmap (basically like chunks in minecraft). it might be slightly overkill but maybe not actually.
trees were a bit harder cuz they have to look good and not lower the fps... i think they look ok? im not very happy with the snow on them but im not sure how i could improve it
so yeah not any fancy groundbreaking tricks but way more than i usually do.
conclusion
making this game was pretty fun :D
i think its really underrated and more ppl should play it hehe
sorry if this article isnt really well written and stuff ._.