Snake game (geo nodes)

Hey guys!
I was tinkering with geometry nodes then decided it would be fun to try and make a mini game!
so after a few days of testing various methods and systems, I had come up with a logic systems for items and collisions, amazing what Blender lets you do, here is a little test video!

Sorry for the resolution highest my computer can record in OBS without going up in flames!

Here’s some bender screenshots with a node mini map!

(Main player branch)

(Item logic)


Thanks for stopping by, love to hear yours guys thoughts!

9 Likes

Okay I rendered out a version so it isn’t getting compressed by the recording as much!
(much cleaner)

(still a bit blurry if your watching in drive though!)

1 Like

Thank you, always a joy seeing you!
It is crazy what Blender allows you to do, the community comes up with a lot of creative and projects!

2 Likes

Pretty fun !! Well done !

How do you move the snake ? is this connected to the keyboard in some ways ?

1 Like

Moving the snake is not too complex surprisingly!
I tried a few different setups and eventually decided on this simple setup!


Which connects to to a panel outside of the group↓


The user controls the forward and backward using a simple slider which is added to the simulation zone a small amount each frame while the speed controls a scalar value up and down is pretty much the same on a different axis!

And the animation is just some simple noise that distorts the curve before it is converted to a mesh.
Though I couldn’t find a way to connect it to WASD keys, I bet you can do that with some python though!

crazy! any plans to make it turn? :slight_smile:

btw, i believe you can absolutely hook up regular keybinds (no Python code needed) to setting/unsetting bool inputs on you GN modifier. want me to explain how?

1 Like

That would be cool, I would love to learn how!

there are some obscure internal operators in blender, like “Context Set Boolean” (wm.context_set_boolean ) which you can use to set boolean props anywhere if you know their full data path. can be used for quick hacky keybinds. but that does not work very well for geonodes because of need to re-evaluate the graph. but now that i actually put the theory into the test this approach is not working : input is changing, but the geometry is not updated live because Blender has no automatic trigger to refresh the evaluation when we use such hacky ways :stuck_out_tongue:.

there is another way i can think of with drivers. but that is not really “no Python” since they are based on Python expressions.

sorry, no success :slight_smile: my original idea was wrong. happens.

1 Like

Sorry for late response had to go to class, thanks for testing!

I had never known about those I could see those being very useful for various applications in blender!:smiley:

Maybe like this, until the modal tools arrive.

hope that helps

3 Likes

Very interesting Nerdy!

1 Like

Wow that’s very creative, thanks!
I like how clear the controls are as well!

1 Like

Thank you, buddy!

I featured you on BlenderNation, have a great weekend!

1 Like

Thank you so much @bartv !

1 Like