Page 1 of 1

movement in a tactical game - need advice

PostPosted: Fri Dec 07, 2007 5:16 am
by yttermayn
I'm trying to make a strategy game - I'm converting Zombie Plague (do a google search) from a miniatures board game into a video game. I am trying to figure out the best way to have them move around the board. The board is a grid like a checker board. I am trying to figure out the simplest way to move the characters to the center of each square. I can't count on the board squares being drawn perfect, so simply incrementing the character's x or y positions by a set amount will result in the character getting further and further away from the centers of each successive square. I'm kicking around the idea of having an actor at the center of each square to somehow mark the positions the characters are to move to. I just don't know how to get the characters to go to the appropriate marker actor. Anybody have any suggestions?

Re: movement in a tactical game - need advice

PostPosted: Fri Dec 07, 2007 8:45 am
by G.o.D
you could position actors on any spot where you want the figures be positioned and then make them fully transparent and read their coordinates

Re: movement in a tactical game - need advice

PostPosted: Fri Dec 07, 2007 6:53 pm
by mrgame
now if you look at game editor.
each little square is 20 apart.
so if you put down x = x + 20; it will go 1 little square along.
so prnt scrn the game editor thing and pick how many squares u want ur defult bord square.

say you pick a 5-5 square size. make a board out of it and place ur player in the centre of a square
make the keydown event of ur movement
x = x + 100;
y = y + 100; etc
if you cant figure out how to make ur actor dead in the middle make a picture 1 pixel size. (paints pencil)
and make that ur player and place that in dead centre its easy with that. then have another actor with ur picture u want and make him parent.

or when you have make ur actor dead centre it may work to then change the animation from the 1 pixel square back to ur player animation but this may not work.

Re: movement in a tactical game - need advice

PostPosted: Sat Dec 08, 2007 12:55 am
by yttermayn
Thanks for your replies, guys. I resolved the problem by using the squares to measure the map image dimensions roughly, then resized the map image to fit the closest multiple of grid squares perfectly. Since the map images grid graphic was drawn on it mathematically rather than by hand, this method worked. It took a little tweeking to get the size perfect, but not as much as I had feared it would. Thanks for the idea with using the grid squares, Mrgame. I didn't do what you were thinking exactly, but the idea inspired the easiest solution for me. You get a cookie. :-) Thank you also G.o.D., It hadn't occured to me that you could read the actors positions. I'm still not sure how the character's script would reference the correct actor though. I'm guessing it would have to have some code to figure out where the nearest actor is, which delves into writing the AI for the characters. I'm not that far along yet, but I'm sure that reading actors positions will come into play.

Re: movement in a tactical game - need advice

PostPosted: Sat Dec 08, 2007 1:44 am
by Fuzzy
will the game have one path, like monopoly, or will it split? With this answer I will have some suggestions for you.

Re: movement in a tactical game - need advice

PostPosted: Sat Dec 08, 2007 12:20 pm
by mrgame
soz if i wasnt clear. but glad you got it. here is an example of what i was trying to exsplain
if anyone wants to use it for the basis start feel free. just pm me if you are :)
it's basicly a chess bord where u can move around on it.

Re: movement in a tactical game - need advice

PostPosted: Sat Dec 08, 2007 7:10 pm
by yttermayn
Fuzzy wrote:will the game have one path, like monopoly, or will it split? With this answer I will have some suggestions for you.


This game: http://www.fortressfigures.com/zombieplague/

Download the PDF, and you will get a better idea. Are you familiar with warhammer like games? Using miniatures on a tactical battlefield map? Zombie Plague is a simpler game with the same kind of basic idea. Not a typical Hasbro board game.

Re: movement in a tactical game - need advice

PostPosted: Sun Dec 09, 2007 1:00 am
by Fuzzy
That looks like lots of fun!

Re: movement in a tactical game - need advice

PostPosted: Sun Dec 09, 2007 1:14 am
by mrgame
if ya look at my demo it basicly dose that :)