movement in a tactical game - need advice

Game Editor comments and discussion.

movement in a tactical game - need advice

Postby yttermayn » Fri Dec 07, 2007 5:16 am

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?
yttermayn
 
Posts: 48
Joined: Sun Nov 25, 2007 4:10 pm
Score: 2 Give a positive score

Re: movement in a tactical game - need advice

Postby G.o.D » Fri Dec 07, 2007 8:45 am

you could position actors on any spot where you want the figures be positioned and then make them fully transparent and read their coordinates
Image
User avatar
G.o.D
 
Posts: 7
Joined: Sat Jun 23, 2007 6:55 pm
Location: Kingdom of Bavaria
Score: 1 Give a positive score

Re: movement in a tactical game - need advice

Postby mrgame » Fri Dec 07, 2007 6:53 pm

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.
Attachments
55.PNG
5 by 5 square with center point
55.PNG (888 Bytes) Viewed 1642 times
mrgame
 
Posts: 118
Joined: Sun Oct 21, 2007 8:09 pm
Location: my computer
Score: 3 Give a positive score

Re: movement in a tactical game - need advice

Postby yttermayn » Sat Dec 08, 2007 12:55 am

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.
yttermayn
 
Posts: 48
Joined: Sun Nov 25, 2007 4:10 pm
Score: 2 Give a positive score

Re: movement in a tactical game - need advice

Postby Fuzzy » Sat Dec 08, 2007 1:44 am

will the game have one path, like monopoly, or will it split? With this answer I will have some suggestions for you.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: movement in a tactical game - need advice

Postby mrgame » Sat Dec 08, 2007 12:20 pm

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.
Attachments
bordgame.zip
tatic game
(79.35 KiB) Downloaded 100 times
mrgame
 
Posts: 118
Joined: Sun Oct 21, 2007 8:09 pm
Location: my computer
Score: 3 Give a positive score

Re: movement in a tactical game - need advice

Postby yttermayn » Sat Dec 08, 2007 7:10 pm

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.
yttermayn
 
Posts: 48
Joined: Sun Nov 25, 2007 4:10 pm
Score: 2 Give a positive score

Re: movement in a tactical game - need advice

Postby Fuzzy » Sun Dec 09, 2007 1:00 am

That looks like lots of fun!
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: movement in a tactical game - need advice

Postby mrgame » Sun Dec 09, 2007 1:14 am

if ya look at my demo it basicly dose that :)
mrgame
 
Posts: 118
Joined: Sun Oct 21, 2007 8:09 pm
Location: my computer
Score: 3 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron