Log In  


Cart #zan02-1 | 2025-07-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Hey folks!

I'm proud to release v1.0 of my spin on the classic Snake... Snek Vs.

Game has 3 game modes to select from:

  • Redux - A spin on the classic game where everything will only update as you press directions, including rival movement.
  • Original - Classic snake movement.
  • PvP - Classic snake movement with 2 human players

You can also configure:

  • Number of Snakes. (2-4 depending on game mode)
  • The speed at which the game updates. (changes snake speed)
  • The score goal.
  • Snake starting length.
  • Snake growth per collection.

Finally, you can also change the background colour while in game using button o.
Option available are:

  • Black
  • Blue
  • Black/Blue Checker Board

I have commented as much of my code as possible, I borrowed the particle system from a tutorial but the rest is my own doing

The rival AI isn't fantastic, I did have it working quite well by checking x and y coordinates of other snakes, but this hit a hardware limitation as the snakes got bigger so it now checks pixel colours in most cases. I also feel the not so great AI does make the game feel more fun/hectic rather than getting destroyed by AI

[UPDATES]
V1.1 - AI code modified slightly to include both background colour checks.

3


1

I really enjoyed this, I liked the super hot style time only moving when I move. I’ve been building my own snake game your ai is super interesting!


@Piotruś Thanks! :D It's by no way a perfect AI logic, but it was lightweight enough that it didn't hugely impact performance if someone wanted to put huge numbers into the settings haha!



[Please log in to post a comment]