Boardgame Tutorial

Discussion of tools and resources for game developers

Post » Wed Feb 13, 2013 12:07 am

Hi All,

I hope this is in the correct topic, I'm a noob to the forums and Construct 2. I've completed a few tutorials already and now looking at tic tac toe and arrays.

Are there any other boardgame tutorials that involve turn-by-turn piece movement?

I'm looking at creating a game that uses pieces to move on a grid fashioned board and the moves are determined by dice etc.

thanks
Chris
B
3
Posts: 7
Reputation: 439

Post » Fri Feb 15, 2013 6:20 pm

Hi Chris,

I'm also rather new around these parts (haven't had a go at this game making malarkey since Amos on the Amiga 500!) and have been working on a board game for a few months. Mine is also dice based, and involves players trying to get various Rpg style characters to the dungeon exit whilst avoiding traps etc.

I haven't located that much in the way of board game specific tutorials, though there's a few which might point you in the right direction. I seem to recall there's a Pacman tutorial that involves moving the character in increments, and using collision detections (useful if you need your pieces to change direction at a certain point on the board). Also there's some well thought out Plugins by Rex Rainbow that allow you to use Grid Based movement, which might be appropriate to your needs (I decided not to use them in the end, as games that use 3rd party plugins can't be uploaded to the Scirra arcade and may suffer unforeseen side effects).

Things I would recommend getting to grips with when designing a board game are: Families and Functions (which will help minimise the amount of repeated events), groups (which can help keep things organised, and running in a logical order), variables and arrays (although I haven't quite mastered the art of the array yet, I'm currently using them to keep track of all the board tiles, dictate which direction the pieces travel around the board, and prevent enemies from spawning on certain squares). Also a basic understanding of how events and sub events work will save many a headache down the line.

Anyway, apologies for not giving you more to go on, but I'm currently writing on my ipad. Once I've had a peek at my project on my PC at the weekend, I'll see if I can find a few useful examples (hopefully a few more folk might've replied to you by then)

Best of luck with your project.

- Dave

B
12
S
3
G
1
Posts: 235
Reputation: 2,053

Post » Sun Feb 17, 2013 6:18 pm

Okay, I've just had a chance to peek at the events that I've been using in my fantasy board game.

Although the movement is functional, I haven't implemented dt yet (which keeps the frame rate consistent when the game is played on different browsers or devices). I'm sure I'll figure it out soon, but whenever I tried to implement it before things started to go wrong.

Anyway, I'll try and explain as best as I can a few of the commands and actions I'm using, in the vague hope that you might be able to glean some information from the words of an inexperienced babbling fool.

So, pieces on my board are moved using the 'Move at Angle' command. As each board square is 64 pixels (as are the pieces), they are moved at 64 pixels each time. I have four directions which the pieces can travel; up, down, left or right. Up equals angle of 270, Down equals angle of 90, Left equals angle of 180 and Right equals angle of 0.

I have two main variables which influence the movement; Direction, and PlayerMoveCounter. The PlayerMoveCounter is set to the Dice.AnimationFrame once the player has rolled the dice (so on a roll of six, it would hold the value of six). The Direction is currently set by four arrays containing all the board square UID's for specific directions (it's easier to use invisible collision detection squares, but I wanted to reduce sprites and get to know arrays). The event here looks a little like:
Condition Blue Wizard On Collision With Path
Sub Event Array UpDirection contains value Path.UID
            Action: Blue Wizard set Direction to 0 (in my variable, 0=up)

And then in the Movement Group:
Condition System: PlayerMoveCounter>0
Sub Event System: Blue Wizard Direction=0
Sub Event System: Every 0.25 Seconds
            Action: Blue Wizard Move 64 Pixels at angle 270
            Action: System: Subtract 1 from PlayerMoveCounter
            Action: System: Wait 0.125 seconds

(The first wait is there to stop the Blue Wizard moving in massive leaps. I seem to recall the second wait of 0.125 seconds was something to do with trying to slow the pieces down on corners, or something)

Events are repeated (with a change to the angle) for the three other directions. I then have a separate event that sets the Movement group deactivated when the PlayerMoveCounter=0.

Hopefully within the next few weeks I'll have enough of my board game up and running to show a preview. In the meantime, I hope your project goes well, and if you find out anything useful when creating it please feel free to share any tips.

Must dash, as I've just downloaded FTL whilst it's on sale, and need to discover inventive new ways of dying in the cold, harsh depths of space!
B
12
S
3
G
1
Posts: 235
Reputation: 2,053


Return to Tools and Resources

Who is online

Users browsing this forum: No registered users and 1 guest