playMaker

Author Topic: Board Game Like Movement  (Read 1832 times)

NodeEncounter

  • Playmaker Newbie
  • *
  • Posts: 7
Board Game Like Movement
« on: April 22, 2020, 02:29:06 PM »
Hello! New to PlayMaker and the forums. I've searched and read up on a few similar topics on the forum but I'm still having trouble grasping what to do. I've seen some tutorial videos on ArrayMaker too but it's not helping me with my specific movement, or at least I'm not applying it correctly.

I want to create a board game like movement, Mario Party style but I'm not sure what to do after I create an Array List. I have a GameObject set as "Nodes" and 10 gameobjects under it with the tag "MoveSpace". I created an "Array List Add Range" under Nodes with a variable of 10. Type, Game Object and in Element, I inserted the 10 different game objects object in there.

I'm trying to tackle this one by one, so just trying to get the board movement down first before I attempt to jump over the the next wall.

Any help will be very much appreciated.

Thank you.

NodeEncounter

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Board Game Like Movement
« Reply #1 on: May 09, 2020, 03:36:02 PM »
After many tutorials and messing with PlayMaker I unfortunately could still not get this going.

Bumping in the hopes of getting some help in this wall I've hit.

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Board Game Like Movement
« Reply #2 on: May 09, 2020, 07:10:25 PM »
Hi,

What exactly is board game movement? Something turn based? Try to explain what you want to achieve in plain terms. Like, “player can click on a tile or field (specific area) and the avatar goes to that field using up turns” etc. Then explain what exactly isn’t working? Like the general concept?

It’s a good exercise to write down in bullet points (for yourself) what exactly needs to happen, in what order. But not in technical terms. For example, a simple jump in a platformer looks like this:

- (watch button for input)
- press a button down.
- check if we’re on the ground.
- move upwards for a while / apply upwards force
- downwards movement back to ground / gravity
- cooldown?
- rinse repeat.
« Last Edit: May 10, 2020, 06:16:38 AM by Thore »

aeroW45

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Board Game Like Movement
« Reply #3 on: May 09, 2020, 11:58:11 PM »
Im sorry i dont follow, do you mean grid based movement? If you mean a board like mario party, you could set each board space as an empty object and move your character to said object, that way you have flexibility on shape of your board and dont have to use grids. But you should provide more details on what you mean by board game like movement.

NodeEncounter

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Board Game Like Movement
« Reply #4 on: May 10, 2020, 11:43:38 PM »
Hey all,

Thanks for the reply, I appreciate it!
Sorry if I'm coming off a bit vague, but in reality I want to make a Dokapon Kingdom Style game, which involves boardgame movement.

What I'm trying to accomplish is:

- Game checks who's Player Turn it is (1 - 4)
- Game activates Player X's turn to begin
- Player X rolls a die to determine their move space range, 0-6 and any modifiers
- Player Rolls 4 and game board shows the 4 available spaces to move to
- Player can move to each space, 1 by 1, deducing 1 movement point or returning a movement point if they backtrack
- Player confirms their move on end space, then an event triggers depending on the unique space
- Event triggers for a fight, item grab, event etc.
- Turn ends and repeat for next player's turn

The first thing I want to tackle is figuring out how to disable movement directly only to the game board nodes/objects and how to populate/show the available spaces the player can move and then have the player move between those spaces.

Video reference to exactly what I want to replicate:

If I'm not able to post videos for YouTube, I apologize. I'm just really looking for guidance.

Thanks again.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Board Game Like Movement
« Reply #5 on: May 11, 2020, 02:30:41 AM »
Hi,

Don't try to solve all these questions in one go. Take them separatly and onc eyou master each one of them you will be able to piece them all together.

there is two big chunk, one is the turn based system, the other is the board layout and what can be done.

for the turn base game, it's best that you can play your game purely in theory without any 3d world, just a pure mathematic representation of your game logic, so that you can test the various aspects of the turn based management. It's not simple by any mean, but don't over think this as well. Start with a simple game like dice ( the higher dice results, wins the round), that's simple enough to get you started.

on the board itself:

you need to create a "matrix" of your game flow, to control movements you can do that on the fly with inter connecting each slots with their neighbor so that a slot would know where the user can go from here, but you could also use something like xml or some other text based description of your board and use Ids to represent slots, so that in yout 3d, you can assign ids to your 3d objects and they will refer to that text based description to that what they can do.


within that, you will also need to separate the movement procedure, again, make a simple board game with no purpose, just 3 slots, and try to move your player around with simple command.

once you get acquainted with the above, you will be in a better position to achieve your final goal

 So, as you progress, don't hesitate to come back to their forum and ask more questions ( in new threads) about the specifics of what you are currently trying to achieve ( be it turn base logic, board management, movement, etc)

Bye,

 Jean

NodeEncounter

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Board Game Like Movement
« Reply #6 on: May 12, 2020, 01:51:21 PM »
Hello Jean,

Thank you much for the detailed answer. I do want to take this step by step but I'm not sure how I can link the board pieces together, and that's the problem I'm encountering.

I tried to follow the advice from this forum thread:
https://hutonggames.com/playmakerforum/index.php?topic=12432.0

By adding an array and inputting each Vector3 location in there, labeling them as MoveSpaces but I'm not sure how to make them available to move between. I've attached a very rough look at how it's currently set for testing purposes.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Board Game Like Movement
« Reply #7 on: May 13, 2020, 02:05:43 AM »
Hi,

 you could have four gameobject variables "Left tile", "Right Tile", "Front Tile", "Back Tile" on each of your tiles. this way you can create the "network" of possible moves for a given tile.

 then your fsm, simply go over each, and if null, this means it can't go there.

Would that be better?

Bye,

 Jean

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Re: Board Game Like Movement
« Reply #8 on: October 23, 2020, 07:57:19 PM »
For taking turns:

First state init (blank). Create a int variable for turns.

Second State: Check for Turns
Then do an int compare (variable who's turn and next turn) both set to 0 so that we get our turn first.

3rd state: Player Do stuff (get button down, new state mouse pick, new state check if null, etc.. whatever you need).

Next state (Ai1 turn): (Ai1 variable has int of 1), do all of the ai logic then
int add 1 to turns, compare int to the Ai1 variable if it equals 1 (which it will) go to next state (a wait state, other wise it will be too fast), then do the exact same thing for the other Ai's (Ai2, Ai3, etc..).

After the Last Ai goes have a another state that resets the turn to 0, when finished go back to the Second state (Check for turn).

I've used this recently and it works well :)
Have I said how much I love playmaker!!! This is one amazing tool