How would you do a grid movement for a board game?
Printable View
How would you do a grid movement for a board game?
It would be useful to have a global value and rename it to Grid Size, then set it to the size of the grid. Also you can use MMF2's grid features to help with design.
The movement depends on what you want. If you want it to snap to each tile, or move smoothly from tile to tile, that's different code. What do you want? :)
I thought of a board game based on a book series about a year ago but I was too lazy to make it. I'm thinking snap to each tile, the tiles are next to eachother there's a little space in between each. And you don't control where your player goes. You pick a card and the player will lose health, or go forward a few spaces, etc. depending on what's on the card.
OK, cool. So, it's literally like a board game. Neat! It's pretty simple really, you just need some detectors for changing directions on corners and such, and you can move it by setting its position relative to it'self.
EG: If Direction is facing down, set Y position to Y Position + Grid Size
When it overlaps a detector, and only one action on event loop, you can check it's direction and detirmine which way it needs to turn on the corner. EG if it is a top right corner, it may need to turn down or turn left.
You will also maybe want to hav delay between each snap of the movement. This can be done with some counters to count down the number of spaces left, and some use of the Restrict Actions for blah blah amount of time condition.
If you need help with specific things feel free to ask :)
so...... basicly when you're on the space it starts a new set of actions depending on what space you're on and those actions depend on the card?
That's what you said, isn't it? ;)
Have you looked into using Easy Grid? I am finding it to be helpful with grid movements I am working on. Also I am using MoveIt to get the sprites to move smoothly from space to space.
Well I want to make sure you think it will work first. Also, how would you have the card picked at random? I can't find anything like that in any of the tutorials or in the help files.
There are two extensions for this; Random Pool and Random Multipool. You should check them out ;)
Or just Random()
Anyways, why not try the "Advanced Game Board Object"?
Are you serious? That would literally make cards at random. What if there are only a ertian number of each card, like real board games?Quote:
Originally Posted by RickyRombo
Then you'd have two numbers representing the same card..?
Don't spazz.
RickyRombo, what if you had a setup like this:
1 Special Power card
10 move forward 1 cards
5 move forward 3 cards
5 move backward 2 cards
4 move forward 12 cards
4 switch places with another player cards
ect..
The game would be ruined if you just spouted random cards.
are you sure random pool and random multipool are on mmf2 standard? I haven't seen them.
They aren't a default extension (one that comes with MMF2 when you install it and update it) you have to download them yourself. You can get the random multipool object from the Released Extensions forum. The Random Pool object might be way back on some earlier pages, but it is simpler to use.