# Simple Board Game movements (NOT CHESS)

**URL:** <https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030>\
**Category:** Multiplayer & Networking\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [November 12, 2023, 11:44pm UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030 "2023-11-12T23:44:48Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![D33X2772](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@D33X2772](https://forums.unrealengine.com/u/D33X2772)\
**Post date:** [November 12, 2023, 11:44pm UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/1 "2023-11-12T23:44:48Z")

</div>

I have been looking for weeks now trying to find info on how to move a pawn on a simple game board. I have dice set up so I want my pawn to move around a board according to the outcome of the dice roll. Does anyone know of a good video to follow or is this to simple for UE5?

---

<div class="post-metadata">

**Author:** ![Shmoopy1701](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shmoopy1701/32/1194536_2.png) [@Shmoopy1701](https://forums.unrealengine.com/u/Shmoopy1701)\
**Post date:** [November 13, 2023, 1:39am UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/2 "2023-11-13T01:39:35Z")

</div>

That’s a pretty broad topic and many ways to do everything depending on whether C++ or Blueprints driven game. Research each of these general topics:

- create pawn
- create an AI controller for the pawn
- create a navigation mesh
- create some points that sit above the navigation mesh
- have the AIController order the pawns to move to designated points
- create a graph out of the navigation points based on game rules, which dictates all legal paths
- create a queue of navigation points (i.e. a path) for a pawn to follow, based on the graph of legal moves

Individually these aren’t hard. But fitting it all into a coherent game framework pipeline is somewhat challenging.

---

<div class="post-metadata">

**Author:** ![D33X2772](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@D33X2772](https://forums.unrealengine.com/u/D33X2772)\
**Post date:** [November 13, 2023, 6:35pm UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/3 "2023-11-13T18:35:26Z")

</div>

Thank you for the quick response. I have done the 1st 4 suggestions. I have a dice roll button on my HUD and a pawn blueprint. In my pawn BP I have a next target integer with all 40 target points.  
I have character movement set up, I can even get the pawn to move to the start point and if i roll the dice it will go to the points but nothing more. I believe i need a way to have the “Dice Rolled” number move to the next target. Is an AI required?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/b/c9b696c9f39b4c6dbcb87998ac90de4032bd7eb6.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 13, 2023, 6:42pm UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/4 "2023-11-13T18:42:26Z")

</div>

You can do it with or without AI / navmesh.

> [@D33X2772](#):
>
> I want my pawn to move around a board according to the outcome of the dice roll

What kind of board are we talking about? What kind of movement? There’s probably a dozen ways to approach it all - some may be better than others, depending on what is really needed.

You say it’s not chess. Is it like Monopoly then? Or one of those:

 ![The_Game_of_Life _______ DSCF2280](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/f/58f31326db2131af4aad2a737d87613021b27e76.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/8/2b8317177555af4a360c1656bf342ac0ea742cac.jpeg)

Interconnecting paths? 2d / 3d? Or something completely different?

* * *

Also, have a look here for something truly generic:

> [@How to move an object to multiple locations with a single timeline](https://forums.unrealengine.com/t/how-to-move-an-object-to-multiple-locations-with-a-single-timeline/436696/6):
>
> Not sure what you’re after precisely, but if the generic: keep the locations in an array, locations A, B and C at indexes 0, 1 & 2 when the timeline plays for the 1st time, use the locations in the array 0 & 1 as start / end points (move from A to B) when the TL plays the second time, use the locations in the array 1 & 2 as start / end points (move from B to C) Suggested above is it, then: It will cycle through the locations in the array and Lerp between the vectors; and wait f…

---

<div class="post-metadata">

**Author:** ![D33X2772](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@D33X2772](https://forums.unrealengine.com/u/D33X2772)\
**Post date:** [November 13, 2023, 7:41pm UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/5 "2023-11-13T19:41:24Z")

</div>

Yes it is like monopoly, a board with 40 spots going around and around. I only have character movement. I want to basically roll dice and move through each target point. If i roll a 10, then i move through 10 target locations then stop. I want to keep moving around the board until the game ends. Its only one direction.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/0/c/20cfa76121a4eb2cbe222e4adc215fdc4868a5b9.png)  
there is no timeline, just roll dice and pawn moves. If someone has a simple example for me, that would be great

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 13, 2023, 9:27pm UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/6 "2023-11-13T21:27:35Z")

</div>

I’d use the timeline for this. Perfect example, as in the link.

* * *

What I’d really do is to use a spline but manually setting the data may be fine if that is all that is needed.

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [November 14, 2023, 12:16am UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/7 "2023-11-14T00:16:53Z")

</div>

Easiest thing to do would be to create an actor which represents the tiles, place them on a map in order, then create an array variable somewhere (probably level blueprint) of the tile class. On begin play, you’d get whatever is at array index 0, and teleport the player pawns there and store the index as an int var on teh pawn. Then, to move to new tile, add the dice roll value or whatever to the player’s current tile index (which would initially be 0), and get the new tile from the array, move the pawn to its loc, and update the pawn’s tile index var.

Edit to add: Did this using player controller in top down template:

 ![boardgamething](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/8/678efc7c61788a57900fc16554f5cac9a15f341e.jpeg)

The BP\_TileList class that it gets in begin play is just an invisible actor with a public array variable I can edit in map viewport to create the list of tiles in order. The var _type_ is an actor which just has a cube in it for the tile. Navigation can be a bit wonky with a large roll, but more tiles should smooth it out. I only added 20, so going from, say, 10 to 2 with a 12 roll ends up with char going backwards on the board. Might be best to use spline movement and draw the spline so each point is on a tile…

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [November 14, 2023, 3:12am UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/9 "2023-11-14T03:12:07Z")

</div>

Spline or not I think the important thing is using an int to keep track of where player is on board. If using an array of locations or actors like I did, you can just grab the location from the array at the matching index. If spline you would get the splne vertex by int. And for a looping gameboard like Monopoly, you can use modulu (aka % mod or just %) to loop the int around based on array length or (vert count of a spline), as I did on the array get in the keyboard R event.

Here’s a [link](https://illspirit.com/files/BoredGame.zip) to relevant files from my experiment if you’d like to try it. Just make a project based on top down template, and extract the zip to the /content/topdown in the project directory. Not sure if the reference var in the tile list actor will survive the transfer, but you can at least see where they were set in the included map.

---

<div class="post-metadata">

**Author:** ![D33X2772](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@D33X2772](https://forums.unrealengine.com/u/D33X2772)\
**Post date:** [November 14, 2023, 3:25am UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/10 "2023-11-14T03:25:21Z")

</div>

Thank you, Ill try this out

---

<div class="post-metadata">

**Author:** ![D33X2772](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@D33X2772](https://forums.unrealengine.com/u/D33X2772)\
**Post date:** [December 6, 2023, 5:21pm UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/11 "2023-12-06T17:21:53Z")

</div>

OK After 2 months of learning and research , I finally did it. I made all 40 tiles and made them each a vector and set their coordinates. I added all the vectors to a Make Array and used a Vinterp then Set Relative Location. This moved the pawn but it kept going to the number that the dice rolled. So roll a 6 and it would go to 6, then a 2 would go back to the 2. I fixed this by adding a sum variable to the roll dice. Roll 6, pawn goes to 6, roll 10 then pawn goes to 16, all the way around. I added a branch so when the sum was 40 or over it would subtract 40 and the sum would start at 0 again. Works perfectly…Thank you everyone for your help.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/e/89e8a53494af6b74df17526903239ab26151098c.png)  
 ![image1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/5/955694a41a430e0e3cc203e38673150d9722025f.png)

I know this is not the best way to do it but with my limited experience, it worked…thank you again.

---

<div class="post-metadata">

**Author:** ![Shmoopy1701](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shmoopy1701/32/1194536_2.png) [@Shmoopy1701](https://forums.unrealengine.com/u/Shmoopy1701)\
**Post date:** [December 6, 2023, 11:38pm UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/12 "2023-12-06T23:38:08Z")

</div>

Nice work. 👍

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 5, 2024, 11:38pm UTC](https://forums.unrealengine.com/t/simple-board-game-movements-not-chess/1386030/13 "2024-01-05T23:38:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
