Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / 3D object and terrain coordinates selector using mouse

Author
Message
Kiaurutis
13
Years of Service
User Offline
Joined: 19th Jan 2011
Location: Lithuania
Posted: 26th Jan 2011 13:44
This is some starting code for RTS.

I wasted lots of time searching for simple mouse input functions, and now program works. U can select objects and click on terrain to get point coordinates. Code has lots of comments, but if u don't understand smth just ask.

Hope this helps for many nabs to make a start, like myself

P.S. next step is to make pathfinder for controlling objects. If i manage to make it, will add source code too

Attachments

Login to view attachments
Kiaurutis
13
Years of Service
User Offline
Joined: 19th Jan 2011
Location: Lithuania
Posted: 2nd Feb 2011 13:30
soz, but pathfinding looks too big and hard thing atm for me, so i may add it some day later
i have just updated program to these features:

*Load map
*Select objects
*Move camera
*Move objects to point on map
*Follow enemies and friendly differently
*Smooth rotation and speed until reach target
*Added 2 sprites and text over them

here is the code(with even more comments):



and u can download full project with media as well

Join The dark Side! We have cookies

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-29 00:25:43
Your offset time is: 2024-09-29 00:25:43