Tabletop Simulator

Tabletop Simulator

Not enough ratings
Snake - Scripted
   
Award
Favorite
Favorited
Unfavorite
Number of Players: 1
Assets: Scripting
File Size
Posted
Updated
20.472 KB
18 Feb, 2016 @ 11:21am
25 Nov, 2016 @ 11:28am
3 Change Notes ( view )

Subscribe to download
Snake - Scripted

Description
It’s a playable game of Snake, made with the new scripting system. If you don’t know the rules, your childhood was lacking.

There are buttons at each edge of the playable area. You can control the snake by clicking them, but it’s a pain in the arse that way. There’s also a ‘joystick’ that you can control the snake with. Just move it to change the snake’s direction. Watch out; I did my best to prevent the snake from doubling back on itself and crashing on its own neck, but if you’re too quick you can still manage it by mistake.

To be honest, I made this for three reasons: Firstly to see if it was possible, secondly to learn how the new scripting system works, and thirdly to provide an example to anyone else who wants to learn more about the script.

I’ve tried to comment throughout the script, so feel free to have a look through and see how it works. You’re welcome to copy the code for your own uses, but I’d like to be mentioned in the credits if you do :P

UPDATE 1/3/16: Updated to work with the reworked API.

UPDATE 25/11/16: Updated (again) to work with the re-reworked API. Sorry it took so long.
20 Comments
Paradukes  [author] 2 Sep, 2017 @ 10:00am 
It's finally done:
http://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1126388270
The sequel, now with multiplayer and keyboard controls :D
ifoundit1 21 Apr, 2017 @ 7:09pm 
I think this is incredible
Paradukes  [author] 9 Mar, 2017 @ 2:23pm 
I... will have to think about that.
machineguy 9 Mar, 2017 @ 10:49am 
Know what would be cool? Turning this into a two or more players tron game.
Paradukes  [author] 9 Mar, 2017 @ 10:06am 
@Remi: Tell me about it. The day they add scripting for keyboard controls, I'll be extremely happy.
machineguy 9 Mar, 2017 @ 1:13am 
cool but so damn hard to control
Paradukes  [author] 25 Nov, 2016 @ 11:30am 
It's fixed again. Cripes, that was annoying. Sorry it took so long.
Paradukes  [author] 8 Nov, 2016 @ 2:04pm 
Sorry, it's broken atm. I haven't had the chance to go back and fix it when the scripting syntax changed again. I'll update when it's fixed.
JealousPhinehas 7 Nov, 2016 @ 9:45pm 
Seems broken
Markiebeer 22 Aug, 2016 @ 11:57pm 
is it broken again?