Advertisement

How to move a unit?

Started by June 15, 2001 01:09 PM
-1 comments, last by Zackie62 23 years, 7 months ago
I work on a real time strategy game and i have one problem during the development.Maybe some guys out there can help me. I use Visual C++6 and Directx sdk 7.Of course I am using direct draw for the graphics.The map is divided in a two dimensional array ( [20] [20] ) and is based on tiles with the size of 32*32 pixels.At the moment the screen is black, there is only a grid,that means that there are no obstacles for the unit.The start point of my unit is (0|0),top left handcorner.I have to say that my unit has only one frame at this time,that means that there are no animations to handle during moving.But it is already possible to move the unit up, down,left and right by hitting the cursor keys of my keyboard. Now i want to move my unit from the start point to the target point, by clicking with the mouse on the desired target point.For example from point (0|0) to (10|0).I want to have it similiar to the games C&C and Warcraft II.If you can help me to solve my problem you can post a replie in this thread or send me message to Zackie62@gmx.de! Thank you very much for your help! Bye, Zackie62 P.S. Sorry for my bad "English" it is not my native language

This topic is closed to new replies.

Advertisement