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 / rts - selection rings

Author
Message
ShadowCentaur 2
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Free Country USA
Posted: 14th May 2005 08:01
tipically, in an rts, a selected unit has some sort of green circle at its feet going around it to tell you have it selected. right now, in the rts im making, i have a textured,ghosted 3d plain which is hidden and shown when the object changes its selection status. is this the best way to do it? or is there some better way to signify selected units?

Truth suffers from too much analysis.
-Ancient Fremen Saying
hyrichter
21
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 14th May 2005 14:39
In programming, you'll find there's really no "right" way to do things. There are many ways to accomplish the same purpose. A textured and ghosted plain sounds like a great idea for your unit selection ring. It's simple and doesn't cut down your FPS.

Jake Blues
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location: United States
Posted: 14th May 2005 14:42
You could also make, in a 3D Modelling Program, a 3D circle, whatever color you want. Save it and load it up into DB. Position and size it however you want.

The ghosted plain idea works fine though.

Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 14th May 2005 23:17
Quote: "In programming, you'll find there's really no "right" way to do things."


What about the best way to do things?

ShadowCentaur 2 - By what your saying now, I get the idea that you have a hidden plain underneath every unit. That would be slow, it would be better if your program creates the object when you select a unit

please reply
ShadowCentaur 2
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Free Country USA
Posted: 18th May 2005 14:02
ya, right now i have a hidden plain beneath each unit. hidden objects slow the program down? i thought that because they were not drawn they didn't take up much memory... how much does (a max of 100) hidden plains take up?

Truth suffers from too much analysis.
-Ancient Fremen Saying
Vinnie alt
20
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 19th May 2005 00:21
Link102 is right even hidden things will slow the program down, this is probably not much of an issue for you right now, but if you in the future increase the number of units this can have an impact on performance.
I think that the best way is to create a new plane under the unit when a unit is selected and then delete it when it is deselected.
However i must admit that it could be trickier when selecting multiple units than your current method, but not by much!
Also in my opinion this method is a lot neater than having 100 hidden plains.

-There are 10 types of people in this world, those who understand binary and those who don't.

-Wheres the "ANY" key?
BadMonkey91
21
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 19th May 2005 01:31
eh just put make a sprite when the danm things selected
this aint exactly professional grade stuff here

ShadowCentaur 2
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Free Country USA
Posted: 19th May 2005 09:46
just to say, i dont want this to be one of those massive scale RTS's where you controll hundreds or thousands of units at a time. i want 30 to be a huge force. small scale and more tactical... have to think about where you put guys and move them, not just overwhelm your enemy with a flood of soldiers. sorry, tangent. im just saying, if i never have more than 100, how much speed difference will it make? a plain is only two polys. a pretty low grade model has like 500.
@ badmonkey
sprites are slower in db than plains in db anyway, and they look really bad just pasted on top of stuff...

Truth suffers from too much analysis.
-Ancient Fremen Saying

Login to post a reply

Server time is: 2025-05-23 04:20:37
Your offset time is: 2025-05-23 04:20:37