Light snakes by Sentmoraap

[raw]
made by Sentmoraap for Ludum Dare 54 (COMPO)

How to play

This is some kind of multiplayer snake or light cycles. Your goal is to score points by letting other players crash into your tail. Intersecting yourself counts as a suicide and makes you lose one point.

Each time you die, your length resets and you are temporarily a ghost. You must break blocks to grow. Your length is reduced when another player crashes into you.

When two players have equal points, the player who scored the lastest is beaten by the other player.

This game is for 2 to 4 players. I didn’t have the time to implement bots. If you want to try it alone, map some keyboard keys to other players controls, press them randomly to give other player random directions and pretend it’s very dumb bots.

Controls

|Action|Keyboard|Gamepad| |-|-| |Pause|Tab|Start| |Reset|R|Select| |Turn left/right|Arrow keys|D-pad or left joystick|

Controls are remappable.

Default controls assigns 1st player controls to the keyboard and the 1st controller, and other players controls on subsequent controllers.

Keyboard controls are scancode-based. For example, on a DVORAK keyboard reset is P.

Installation instructions

Just uncompress and run the binary.

On Windows you may need to install Microsoft Visual C++ Redistributable packages.

Note that whatever counts as a “initial engagement” costs 0.00€ (≃ 0.00$) so all the installs shouldn’t cost me a fortune.

Stuff used

  • Dear ImGui
  • Lazẏnput
  • nlohmann::json
  • OpenGL 3.2
  • SDL
  • SFXR
  • My own base code using all of the above
  • A custom fixed point template class

My goal was to see how annoying it is to use fixed points. There was some annoyance and bugs due to fixed point, but the biggest pain was C++ metaprogramming.

Thanks

Sébastien Garnier from Start Coffee for some playtesting.

Screenshots

0.png

1.png

2.png

Ratings

Overall 246th 3.354⭐ 26🧑‍⚖️
Fun 223th 3.313⭐ 26🧑‍⚖️
Innovation 158th 3.52⭐ 27🧑‍⚖️
Theme 264th 3.3⭐ 27🧑‍⚖️
Graphics 99th 3.86⭐ 27🧑‍⚖️
Audio 136th 3.396⭐ 26🧑‍⚖️
Given 32🗳️ 25🗨️

Feedback

Baturinsky
02. Oct 2023 · 17:59 UTC
Interesting variant of the snakes games. Controls are a bit disorienting, maybe mouse controls (with snake turning to the mouse cursor) culd work better?
Zirrrus
02. Oct 2023 · 18:04 UTC
Neat!
I only played on my own for a bit, but this seems really neat. Having a direction-dependent turn is crazy difficult for me though.
It's very impressive what you managed to create without using an engine in such a short time!
NoviceDevGames
02. Oct 2023 · 18:21 UTC
the game has good graphics and has an original gameplay . i tested the game alone the controls are difficult to take in charge at first but you get used to it and your movements become fluid.
however since i'm alone right now i will wait someone to play a real party to give a fun rating .
LDJam user 238639
03. Oct 2023 · 00:52 UTC
The concept seems fun and I like the neon graphics. I find it a little frustrating to play, though, because the mechanic where you bounce off of boxes & walls feels disorienting and gives the player little to no time to react to the new direction in which they're suddenly speeding. I can see how it provides a quick way to pivot, but I'd have preferred tighter turning, personally. Also, I think you could've made pretty serviceable "dumb" bots by just having them randomly change their direction. Understandable that you didn't get to that, given the time constraints and the extra UI work.
penguindustin
05. Oct 2023 · 03:49 UTC
Liked the graphics and the menus. Using only arrow keys felt unintuitive, supporting both is usually the way to go because people typically never touch the arrow keys for games (or at least for me). Hitting escape unituitively closed the game instead of opening the pause menu. Loved the little sound bites and particle effects when colliding. Would be great if there were some simple AI that just randomly moved. I didn't really understand why if I hit the blocks too many times in the level it would sometimes shrink me instead of grow me.
🎤 Sentmoraap
05. Oct 2023 · 08:47 UTC
@penguindustin What do you mean by supporting both? Arrows and WASD? It’s doable, you can remap the controls (but yes Esc closes the game and you can’t change it, press Tab instead). Another controls like “go in that direction”?

If you were dots after shrinking and not crossing anyone, it’s because you crossed youself. It may happen after destroying blocks, especially while turning. If you just shrunk, then it’s because you killed someone and you are shrunk up to the collision point. The latter is done to balance the game.
henk
05. Oct 2023 · 23:45 UTC
I had some difficulty trying to run this game. Here's the list of things I tried:
1. I tried to launch the linux build, but it depends on libglew 2.2 and I only have 2.1 (Ubuntu 20.04)
2. Not discouraged, I downloaded the windows build and tried it under wine, but I was missing the Microsoft Visual C++ Runtime Redistributable. I installed it in wine, but it looks like my version of wine is missing some APIs the game uses, so it crashes on launch.
3. I then tried building from source. This gave compilation errors on my machine because `Lazynput/PrivateTypes.hpp` contains a declaration of `StrHashmap<ConfigTagPresent>` but `ConfigTagPresent` is an incomplete type at that point, which is something that apparently compiles fine with some STLs but not others. Swapping the definitions of `ConfigTagBindings` and `ConfigTagPresent` fixed the error for me, and I was able to build the game.
4. I then tried to run the game, at which point it segfaulted immediately. I can't seem to get a debug build working due to linker errors with my system's libinotify, which I assume is a dependency versioning problem.
5. Finally, I tried to see if I could run the windows build under Proton, where it worked just fine. Kudos to Valve.

The game is super neat! The movement feels super smooth and the whole thing has a nice feel. I wish there were a "person-v-computer" mode, though, so I could get a better feel for the mechanics. The turning radius is a bit wide, but I think that adds nicely to the challenge and could imagine getting more skilled at controlling the snake. I think it might be better if it weren't possible to accidentally clip yourself, though, since that seems to happen fairly easily when bouncing off walls while turning and somewhat limits the ability to perform tight maneuvers.
🎤 Sentmoraap
06. Oct 2023 · 09:24 UTC
@henk Thank you for your determination to play the game! It sucks that you had to resort to playing the Windows build, but thanks to you for spotting a problem and finding a fix for Lazẏnput. If you build without defining `LINUX_DYNAMIC_LIBRARY` (used for hot reloading) and `LINUX_DEBUG_FORKS` (it shouldn’t depend on that but I made a mistake) then it won’t need inotify.
henk
06. Oct 2023 · 20:43 UTC
@sentmoraap Thanks! Disabling those two defines got me far enough to see what was going on in the debugger, and it looks like it just couldn't find the `assets` folder (I was building out-of-tree). Copying and pasting that folder into the build directory got the release build working just fine.
ffffchai
08. Oct 2023 · 05:01 UTC
These lines are very silky and fun, I enjoy the auto-running of my light, the bumps just get smaller and quickly get bigger again, gives me a good mood. This is a fun piece and I wish there were more props or mechanisms. Nice job.
animatrix1490
08. Oct 2023 · 18:24 UTC
It takes a little setup but it's very fun to play with a friend. (It helps if the friend is patient) The controls were confusing until I realized you could only turn right and left. I really enjoy the aesthetic--very heavy programming and/or Tron vibe. Super cool!
Plepletier
09. Oct 2023 · 02:26 UTC
I've spent some time playing the game solo, and I sincerely believe that the movement controls require a major overhaul. When you Kick on a block to make the snake grow, it often changes direction unexpectedly, leading it straight into the enemy lines, making it virtually impossible to avoid them and taking damage. The turning controls also seem to have some issues that need attention in order to make the game more manageable and enjoyable. Nonetheless, I must commend the visuals and audio effects, which are quite impressive. Keep up the good work!
bentglasstube
12. Oct 2023 · 06:49 UTC
I really enjoyed the aesthetics of this one with the simple graphics and the arcade sound effects. Having nobody to play against took away some of the fun I think. The fast pacing made it difficult to know what had happened sometimes, but not to the point that it was frustrating. Great job.
Nougato
12. Oct 2023 · 18:20 UTC
Really cool snake game! It features some particle effects and offers different controls, which are not really easy to master. Nonetheless, it's truly fun to execute some combos with the bouncing effect. Accomplishing this in C++ is no easy task... Well done!
xett
14. Oct 2023 · 21:58 UTC
Very awesome you were able to code this game for a jam using only c++ and libraries without using some engine, super impressive. Taking that into account, the game was fun for a simple snake game, and the graphics were cool. My only issue was getting used to the tank controls, it can be disorientating when you bouncing around and trying to take control. Great job!
LDJam user 375578
17. Oct 2023 · 19:51 UTC
Well, the game is playable and quite good