To be clear, no codes shown within this guide work.
This is a work in progress, but is currently at the highest level of gimkit mechanics in my opinion, so it’s a good post to learn from.
The Board Itself
Source: Making a Chess Board by @NightEnd
- First start of by making a 8 by 8 grid of light and dark colored tiles (2x2 floors) in a checkered pattern. The top left and bottom right tiles should be light, bottom left and top right dark.
- Next create a text object and set the text size to 112, and the font to Rubik. Set the text to; A B C D E F G H, and make sure it’s on global.
- Create another text object and set the text size to 112, and the font to Rubik.
Text;
8
7
6
5
4
3
2
1
Picture of A-H and 1-9 (They should be centered with the tiles).
Dynamic Text
Sadly, due to the inability to create newlines with block code, we need 8 text object instead of 1 here.
- Create a text object and center it along the bottom row of your board.
- Set the text size to 102 and the font to Rubik
- Add the block; When receiving on channel UpdateText.
- Add the following code to the block.
- Copy and paste the text object into each row. Make sure to go to the block code of each object and change the row number depending on the row the text is in.
Checkable Inputs (Partway Done)
Warning: This part is EXTREMELY annoying to do, mainly due to needing to copy and paste so many buttons.
- Create a button. Change the button to be invisible to players and set the activation scope to players.
- Set the button message and the transmit channel onto the square it’s on (A1, B1, etc.)
- Set the activation and deactivation to P_[Square] (Activation), E_[Square] (Deactivation)
- Copy and paste the button onto each of the 64 squares, and change the settings for each based on the square it’s on (same rules as above)
At this point
Congratulations, you have finished the first 5% or less of this guide/wiki! It only gets more complicated from here, but it’ll be worth it in the end (hopefully).
Anyway, this is what your board should look like:
Properties
Each of the following properties should be global unless specifically stated otherwise, and should have a default of blank unless stated otherwise in the form of [Property Name] (Default Value).
- Text Properties
- Row1
- Row2
- Row3
- Row4
- Row5
- Row6
- Row7
- Row8
- Board
- Rw (♖)
- Nw (♘)
- Bw (♗)
- Kw (♔)
- Qw (♕)
- Pw (♙)
- Rb (♜)
- Nb (♞)
- Bb (♝)
- Kb (♚)
- Qb (♛)
- Pb ()
- Ee
- Spacer
- Number Properties
- UpdateBoardCounter
- Turn
Teams
You now have a choice to make. Do you want this to be one player, or two?
- Note that I’ll merge these 2 eventually into the player choosing, but I’d recommend 2 player for now, since the AI will take me the longest.
-
Set up 2 number properties with a default of 0
- Teams (Global)
- TeamOn (Local)
-
If you want, you can have a pregame spawner (which would be wherever your lobby would be. This is optional.)
-
Add a spawn pad that you spawn on when you start the game, and a trigger ontop of that.
- The trigger is hidden and is activated when stepped on (active scope of PLAYER):
- Create a when triggered block for the trigger and do the following shown:
This utilizes (sort-of) psuedo-teams, and we all know if it’s complex or uses quantum mechanics for gimkit, it’s going to be great ! Best of all, this uses both!
Anyway, back to the guide.
Updating the Board Dynamically
Here is where this starts to get complicated. If you had trouble with the previous steps, then reach out to me or @Blackhole927 (who’s also really good at this), and either one of us can help (though it’s @Blackhole927’s choice if they want to help).
A quick mention; I stopped using variables here due to them glitching within recursion at times.
Anyway, I’ll explain better in this section due to this being difficult (at least it will once this wiki/guide is finished, not necessarily now).
We created the global number property called UpdateBoardCounter if you remember. The purpose of this property is to loop through updating the board, setting a trackable limit and counter in recursion.
-
Add a lifecycle. Set it so it broadcasts the channel StartGame when the game begins.
-
Create a trigger and make it invisible in game.
-
Set it so it triggers when receiving the channel StartGame.
-
Add a when triggered block with the following block code.
The block code should be the following for this trigger:
Spacer=1 space
Ee=3 spaces
Board=RwNwBwQwKwBwNwRwPwPwPwPwPwPwPwPwEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEeEePbPbPbPbPbPbPbPbRbNbBbQbKbBbNbRb
- Create another trigger. Set the trigger to trigger when it receives on channel UpdateBoard
- Add a when triggered block.
- Put the following Block Code.
- Now that you’ve created that trigger, create yet another trigger with a block code for when triggered. Set the trigger to trigger when it receives on channel UpdateBoard1.
Block Code:
Now copy and paste the trigger, and change the trigger to run when it receives on channel UpdateBoard2.
-
Enter the trigger and change all Row1’s into Row2.
-
Also change the UpdateBoard1 into UpdateBoard2 (n + 1), and UpdateBoard2 in UpdateBoard3
-
Finally change the greater than or equal to in the IF block from 16 to 32.
-
Copy and paste block 2, and repeat the above steps until you have all the way up to UpdateBoard8
-
On the 8th one, change the else loop to broadcast on channel UpdateText instead of any UpdateBoard channels, and add a block that sets the UpdateBoardCounter property to 0.
It should look like this:
Congrats! You now have a dynamic changeable board. You may have to mess around to get the text to line up perfectly in the center (I recommend the snap edit option), but you’ve actually done quite a bit.
Upcoming Sections:
-
Reading Player Input
-
Algebraic Rules
-
Detecting Check
-
Detecting Checkmate
-
Creating the AI
Current memory usage is 14%
Credit to @NightEnd for saving me some time in deciding on the board design.
Credit to @Blackhole927 for the emojis (who @NightEnd got them from).
I just want to say, always feel free to reach out to me for help!
Anyway, that’s all I have to say in this little guide of mine for now. If you have some cool idea that will work for this, reach out in the comments! This also took WAY too long to make.
Toodles!
– @jjnitzan –
I will mention that this is also a wiki due to a 3 day edit limit, so once that runs out look for the wiki that was created for me (named the same).