Profile image

Snek Game

60.5k SnoWFLakE0s  28 days ago


Hey all,

I present to you: the classic arcade game, Snake—in SimplePlanes, at last! What more can I say?

Fully functional and playable, the SimplePlanes edition of Snake comes bundled in a neat arcade machine package, complete with full VR compatibility, which allows you to use the joystick to actually play the game.

Gameplay & Controls

Gameplay is simple as it can be: it’s just Snake (with some twists)!

  1. WASD (Pitch & Roll) is used to control the direction you want your snake to move in. Just know that you should only press one type of control at a time (i.e. don’t use Pitch and Roll controls simultaneously!).
  2. You may pause/unpause the game at any time by pressing either the pause button or AG1.
  3. Every time you eat a food cell, you gain an additional tail segment.
  4. If you collide into any of your tail segments, you bite your own tail and lose, ending the game. This also includes trying to go in the opposite direction!
  5. You’re allowed to pass through the world border on one side and out the other, and the game is contained in a 21 x 21 field.
  6. Over the course of the game, as you accumulate more points, the game will accelerate. By the time you’re in 30 or so points, you’ll be moving quite quickly, so watch out!
  7. If you reach 50 points, you “win” the game. The first person to achieve I’ll be awarding 5 upvotes to! Just submit a video of a successful run and tag me on it.

Technical Details

This build features a number of technological innovations that make full use of new features in 1.11 & 1.12. Most prominent is the usage of variable recursion. This simple but powerful feature allows programming logic far more powerful in Funky Trees, and its capabilities are in full display in this build. Building on variable recursion, the following features were implemented:

  1. Full linear congruential generator RNG algorithm
    This simple but effective algorithm is an extremely popular method for computers to generate pseudorandom numbers. This has been fully implemented in the game’s food generation algorithm, which will generate a new food cell every time it’s consumed. The seed for the RNG generator is also randomized, making each and every game you play a pretty unique one!
  2. Label Attribute Mechanics
    This build utilizes to a great extent the various text modification properties to fully animate the game scene. Most prominently are the position modifiers to control the position of the pixels, but also in full use are the color modification attributes which are used to hide inactive pixels.
  3. Full conditional loops
    I’m now fairly confident that Funky Trees is Turing complete. We can not only do various kinds of mathematics, but we can also utilize conditionals in order to group code into logical blocks. For this build, pseudo-code was initially drafted which might have the following kind of structure:

Psuedo-code:

while (i<5) {
  doMethod();
  i++;
}

This can now be directly be converted to variable setter statements.
FT Edition:

doMethod = ... {activator = "i<5"}
i = i+1 {activator = "i<5"}

This is an incredibly powerful tool, and it’s very much possible to do practical programming in Funky Trees with the magic of variables (with the exception of string handling, as variables only take numbers).

With a package under less than 50 parts—maybe 4 for the actual mission critical components—the Snake game delivers an incredibly dense, technologically significant system that paves the way forth for the community to exploit Funky Trees even better.

Comments

So my first semester of engineering school is finally over! It’s been an incredibly busy and tough semester, but I’m now finally back to play the game that led me to becoming an engineer in the first place. This was actually an incredibly useful way to organize my thoughts about programming in general, especially since I’ve been doing C at school. It’s been coded over the span of maybe 3 or 4 weeks, and I’m glad to finally present this to everyone.

Happy holidays and happy snek gaming. I’ll see you in the next one.
- SnoWFLakE0s

Spotlights

General Characteristics

  • Successors 1 airplane(s)
  • Created On Mac
  • Wingspan 2.5ft (0.8m)
  • Length 4.2ft (1.3m)
  • Height 5.9ft (1.8m)
  • Empty Weight 5,718lbs (2,594kg)
  • Loaded Weight 5,718lbs (2,594kg)

Performance

  • Wing Loading N/A
  • Wing Area 0.0ft2 (0.0m2)
  • Drag Points 1298

Parts

  • Number of Parts 49
  • Control Surfaces 0
  • Performance Cost 202
  • Log in to leave a comment
  • Profile image

    You are a wizard of the funk! So cool!

    Pinned 26 days ago
  • Profile image

    20/10 would snake again

    16 hours ago
  • Profile image

    Increíble... Más adelante... GTA 5 en SimplePlanes jajaja xd

    2 days ago
  • Profile image
    30 Ubyk123

    This is so fun!

    3 days ago
  • Profile image
    30 Ubyk123

    Incredible!

    3 days ago
  • Profile image

    Im not goona be suprised when someone make doom playable in sp.

    5 days ago
  • Profile image
    60.5k SnoWFLakE0s

    @ViSilvester
    .
    Arrays would have definitely made this fully complete, as it would allow for infinite tail cell generation (or so I am inclined to believe). Regardless, glad my code was straightforward. Snake isn't the most complicated game, and it translates over to FT quite well.

    +1 7 days ago
  • Profile image

    That's incredible! i look in the "code", and it's surprisingly straight forward! maybe in the future we could get some arrays for funky trees, thats will be neat !

    8 days ago
  • Profile image
    1,117 Charris969

    @JustWingIt oh okay thx

    9 days ago
  • Profile image
    8,132 xNotDumb

    Can you explain some examples of funktrees

    +1 9 days ago
  • Profile image
    1,781 JustWingIt

    This is just the coolest thing. I think it deserves more upvotes.

    9 days ago
  • Profile image
    1,781 JustWingIt

    @Charris969 It means your build has been approved for use in Simpleplanes VR.

    9 days ago
  • Profile image
    1,117 Charris969

    @AndrewGarrison so what does curated mean?

    14 days ago
  • Profile image
    480 Nowhere

    @SnoWFLakE0s
    I HAVE DONE IT
    https://www.youtube.com/watch?v=F6n4MWtWp_U

    15 days ago
  • Profile image

    Bro u will be surprised to when that day of Simple planes in simple planes comes ! @BMilan It won’t be a long wait.

    17 days ago
  • Profile image

    @SnoWFLakE0s so you know when you join the server you see a thing pop up under the screen saying "top things to do here” and then you need to verify yourself I was wondering how to do that on my server but I don't know much on discord
    .
    Also I don't really know what you mean by "I own that server..?”

    17 days ago
  • Profile image
    60.5k SnoWFLakE0s

    @MrShenanigans
    .
    I own that server..? Just leave me a message.

    17 days ago
  • Profile image

    I would literally buy this from you if I could

    18 days ago
  • Profile image

    @SnoWFLakE0s hi um could you help me on discord? I need something similar from the funky trees lab when you join the server

    18 days ago
  • Profile image
    60.5k SnoWFLakE0s

    @Charris969
    .
    Surprisingly, it is! New parts make for very efficient builds.

    20 days ago
  • Profile image
    1,117 Charris969

    .... this doesn’t looks like 49 parts

    21 days ago
  • Profile image
    60.5k SnoWFLakE0s

    @realSavageMan
    .
    There is a popular variation in which you can phase through the border and out the other end! I opted for it to make it a little more novel

    23 days ago
  • Profile image

    Okay I know I’d never be able to do this, hats off to you, but..

    I thought in the original, you also lose once the snake hits the boundary?

    23 days ago
  • Profile image

    This is amazing!
    takes me back to playing this on the old nokia 3310 because there were no other games on cell phones back then XD
    I also broke my joystick, and this is probably the best thing I can control with KB and mouse...

    +1 24 days ago
  • Profile image
    13.8k V

    @Yoloooooo ssshhhh... Dont give him ideas!

    +1 24 days ago
  • Log in to see more comments