# Snake 3D game with obstacles and collision detection

**URL:** <https://discourse.threejs.org/t/snake-3d-game-with-obstacles-and-collision-detection/58426>\
**Category:** Showcase\
**Tags:** gsap, fog, game, collisions, procedural\
**Created:** [November 21, 2023, 4:45pm UTC](https://discourse.threejs.org/t/snake-3d-game-with-obstacles-and-collision-detection/58426 "2023-11-21T16:45:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gianluca\_Lomarco](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gianluca_lomarco/32/42223_2.png) [@Gianluca\_Lomarco](https://discourse.threejs.org/u/Gianluca_Lomarco)\
**Post date:** [November 21, 2023, 4:45pm UTC](https://discourse.threejs.org/t/snake-3d-game-with-obstacles-and-collision-detection/58426/1 "2023-11-21T16:45:40Z")

</div>

Link to the game: [https://snake-3d.dev/](https://snake-3d.dev/)

 ![Screenshot 2023-11-21 alle 16.30.31](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/e/5/e5aefc5d02aee641873b65244b968a6d5c17183b.jpeg)

---

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [November 22, 2023, 7:56pm UTC](https://discourse.threejs.org/t/snake-3d-game-with-obstacles-and-collision-detection/58426/2 "2023-11-22T19:56:02Z")

</div>

Great! It was fun playing the game. Brings back some old memories.

I’m not sure, but I have the feeling that the keyboard reaction is somewhat slow. For example, I have to change direction slightly earlier. Also, U-turns are impossible if I press the two keys quickly one after another, I have to make some small delay between them (otherwise the second key gets ignored).

---

<div class="post-metadata">

**Author:** ![Man](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/man/32/34985_2.png) [@Man](https://discourse.threejs.org/u/Man)\
**Post date:** [November 22, 2023, 9:50pm UTC](https://discourse.threejs.org/t/snake-3d-game-with-obstacles-and-collision-detection/58426/3 "2023-11-22T21:50:08Z")

</div>

so interesting game. I love this animated effect.

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [November 23, 2023, 2:30am UTC](https://discourse.threejs.org/t/snake-3d-game-with-obstacles-and-collision-detection/58426/4 "2023-11-23T02:30:24Z")

</div>

I dig it! But also I’m used to just 2 keys to control left and right? A bit hard to wrap my head around AWSD when the direction isn’t obvious since the viewpoint isn’t straight on…
