Log In  


Cart #catinsnow-3 | 2023-12-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

a cozy lill' walk through some snowy woods
this game is mostly about atmosphere, so no objectives here. just walk around till you feel done :)

the trees

i'm real happy about how natural the tree generation feels so i figured i'd talk about it.
the trees start out like this.

the main thing that helps sell the forest is the random tree placement. but if we just did something like..

tree.x = x + RND(8) - RND(8)
tree.y = y + RND(8) - RND(8)

..then each time we re-spawn the trees for a area they would be in different spots then before. basically we need a function that returns a sudo random value y from value x. thats were this function comes in...

FUNCTION ConstRnd(_𝘹,_𝘳)
	IF _𝘳 == NIL THEN
		_𝘳 = 1 -- r meaning range
	END
	RETURN (COS(_𝘹*.6)+SIN(_𝘹*4.9)+SIN(_𝘹*.01)+COS(_𝘹*7.3))/4*_𝘳
END

here's a part of the function on desmos..

so while not totally random, it looks random enough :)
so instead we do something like this

tree.x = x + ConstRnd(y)
tree.y = y + ConstRnd(x)

the reversal of x and y is important, otherwise we get this banding effect..

beyond that, its just a matter of scaling the top of the tree with SSPR, placing some random sets of branches, and doing some random flipping of the tiles.

links

an archive of the dev files can be found on the itch.io page
was made as part of the 2023 Secret Santa game jam

8


2

In browser on mobile and desktop I'm seeing this

Not sure if I'm missing something or doing something wrong

EDIT: Looking good this morning! Will have to give this a try now, thanks :)


very nice :)


Very pretty game, mysterious and melancholic yet cosy.


I got this error after catching a mouse and pressing Z.



[Please log in to post a comment]