This is my first guide, so please let me know what I could’ve done better.
In this guide, I’ll walk you through creating the snake game, in which you try to guide the snake towards the food using the arrow keys. It’s a simple concept, but hard to implement in Gimkit because it isn’t designed for this.
Step 1
Go to options, then to editing options, then change these settings. This isn’t necessary, but makes the next part easier.
Step 2
Create a barrier that covers a 2x2 area, then adjust it to make it look how you want. After that, give it these settings under availability. (Edit: there should only be two zeroes)
Step 3
Copy the barrier, then put the new one right above the other.
Next, change the channels so it activates on “01+” and deactivates on “01”.
Step 4
Repeat this process until you have five barriers. Make sure to change the channels. Next, continue the process but move to the right. The first number in the channel should be its X coordinate, and the next one should be its Y coordinate. Go until you have a 10x5 grid. This might take some time.
This is what it should look like:
Step 5
Create a camera point device in the center of the group of barriers that activates on the channel “Start”, as well as a button that broadcasts on the same channel. (You might need to go to editing options and disable player collision)
Step 6
Create a teleporter that receives on channel “Start”, then surround it with four zones that are wired to teleport the player back to the teleporter. Next, make the surrounding zones broadcast on channels “Up”, “Down”, “Left”, and “Right”.
Make sure the zones are positioned as close as possible to the teleporter without the player being able to escape. You might need to turn off the camera point to test it out.
Step 7
Create the following properties:
Name | Default Value |
---|---|
Snake | 32,22,12 |
Direction | Right |
X | 3 |
Y | 2 |
FoodX | 7 |
FoodY | 2 |
Step 8
Create four triggers that receive on the channels you created in step 6.
Add this code to each block, but make the direction in the condition the OPPOSITE of the channel it receives on and set the property to the same direction as the channel it receives on. This is an example from the “Up” trigger.
Step 9
Create another trigger and give it these settings. This trigger will essentially control the game. (You can change the delay later to change the speed of the game)
Now, add this block code:
Step 10
Create an end game device that ends when receiving on channel “End”, then create a trigger that receives on channel “GameOver?” and add this code:
Step 11
Create another trigger that triggers when receiving on channel “MoveFood”, then give it this code:
Step 12
For the barriers highlighted below, turn on “active on game start”.
(Side note: I just realized that you can click while holding shift to teleport in the GKC editor)
Step 13
You’re done! Now you can add some finishing touches such as a border around the playing area or a lobby by the start button.