Snakes & Ladders

3

Attached Files

The following files have been attached to this tutorial:

.capx

board-movements.capx

Download now 1.09 MB

Stats

4,669 visits, 6,861 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 9 Dec, 2014. Last updated 19 Feb, 2019

Many of you send message to me saying Shiva will you create game for me. I want snakes & ladders. Once I see how you create the game in Construct 2 than I am able to create it myself.

Well my answer to you all is this. I am here on Construct 2 forum to help each and everyone. Not just one individual person. Why I should teach one person and not others? So therefore I am doing this simple snakes & ladders game. I will not add SNAKES or LADDER only how to move about on board. Left and right movements by player. Rest is up to you to add and so forth.

THIS TUTORIAL NEEDS moveTo PLUGINS BY REX (Rainbow)

Snakes and Ladders are an ancient Indian board game regarded today as a worldwide classic. It is played between two or more players on a game-board having numbered, I have not added any numbers. the size of the grid (most commonly 8×8, 10×10, or 12×12) varies from board to board, as does the exact arrangement of the snakes and ladders, with both factors affecting the duration of play. Random die rolls determine game piece movement in the traditional form of play.

Start Construct 2 and create new project, name it Snakes & Ladders.

Set windows size set at 1024 x 680 and full screen off

Layout size set at 1024 x 680 Background

Set Margin 1024 x 680

Add layer and name it BOARD

Add layer and name it Dice

Add layer and name it Player

You have four layers Background, Board, Dice and player. Lock other layers and on your VG add colour or whatever you wish to add.

On Board layout add four text boxes and name them as below

Ladder I named mine as txtLadder

Snake I named mine as txtSnake

Move I named mine as txtMove

Press I named mine as txtPress

Create sprite grid size 48 x 48 so we can have board like below:

Set size to 480 x 480. With this we will have 10 x 10 boards. You can have more is well but, for learning just do same as mine. So your board looks like below. Note I have not added numbers but, you could.

Now lock this layer named Board.

Unlock Dice layer and add dice sprites that I have provided below

Also add this two buttons as well

Dice has Instance Variable below

Now your screen looks like below

Now lock it

Add player, home, and marker 1, 2, and 3. I have only one player but, your turn to add many players you wish

Please make sure you have green Marker 1, 2 and 3

SEE MY CAPX PROVIDED

Player has instance variables as below

Complete screen design looks like below

Now let’s open events editor and enter some code below

Set Global variables and enter this lines

Ladder = 0

Snake = 0

Path = 0

Direction = right as text

moveTo = 0

Add Player Animations

Roll dice

Make our Player move according to Dice number

Now we move up, down sides and winning code as well etc

Happy Christmas to each and everyone.

As I said above I have not included Snakes or Ladder. Hint I would use Array coordinate or some other ways to check for Snakes and Ladders. I hope you find this tutorial beneficial.

.CAPX

board-movements.capx

Download now 1.09 MB
  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • The truth is,, his game is not working,, try to download the capx and see,,, it is broken,, nothing is moving, the dice is not working too, even when you copy only the dice scripts,, fake tutorial

  • How can you teach me the way to add another player in this game. I found so much on the internet but there are not any tutorials :(