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.

DarkBASIC Discussion / Tip for RTS makers...

Author
Message
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 5th May 2003 20:19 Edited at: 6th May 2003 22:11
I've discovered that you don't actually need to have a routine for working out 3D from 2D.

If you have an overhead, or nearly overhead, slightly angled view of the terrain then it works perfectly well to position the mouse where the object is, rather than the object where the mouse is.

Here is a demo (DBC only, although it can be adapted for DBPro easily)...

Why the hell'd you ask me for crying out loud!?!

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 6th May 2003 21:32
The code snippet didn't work, but it's in the source box ok .

Comments anyone?

Why the hell'd you ask me for crying out loud!?!

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 6th May 2003 21:41 Edited at: 6th May 2003 21:46
its for placing buildings right??? its good code what it needs is
if mouseclick() place the building at that position so the mouse can't control it any more.

like this

ARE YOU A 3D MODELER??? IF SO WE NEED YOU!!!
EMAIL [email protected] to work on the new Star Strike project!!!
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 6th May 2003 21:52
wait a sec this is good heres soem code that allows you to place endless cubes/buildings there

i like this alot!!!

ARE YOU A 3D MODELER??? IF SO WE NEED YOU!!!
EMAIL [email protected] to work on the new Star Strike project!!!
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 6th May 2003 22:10
Yeah, thats one thing it could be used for. Otherwise it could be used for scrolling across and editing a matrix in a level editor or for moving a unit to a certain place on the map, etc...

I did make it so you could place objects, but I just posted up the basic code as I thought you could write your own extentions of it (which YOU did!). I just didn't want anyone to think that it was specifically for one thing, and I don't need to write games for people.

Glad you think it's of some use!

Why the hell'd you ask me for crying out loud!?!

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
cusoi
22
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: Netherlands
Posted: 7th May 2003 00:11
In my map editor for Packageman 3d(http://home.wanadoo.nl/emailmark/packed.zip you can also place objects. It works fine too and you can edit the matrix.

Pentium IV 2.4 GHZ 256 MB Ram Geforce 4 TI 4200 128 MB
Visit my site: www.cuso.tk
Red general
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 7th May 2003 13:24
I've recently made a basic rts with a very accurate 3D mouselick. It also has a menu system based on the Magic Windows System (see program announcements or the newsletters for details on this system). The code works in DBC and should work in DBPro with patch four. At the moment I also have a new example code for this forum where you can add in new units and have them behave like all the other units, I will also paste this up when I find it again.

I hope this code will help anone who needs a basis for their RTS. My own RTS called "Dark Chi" should have a demo up when I get a new web server.

Hope this code is useful
RED GENERAL

My computer melts regulary - perhaps it likes being fondue

Login to post a reply

Server time is: 2025-05-18 15:18:46
Your offset time is: 2025-05-18 15:18:46