Jump to content
  • Advertisement
Sign in to follow this  
_Callidus

Supreme Commander Strategic Icons : How would you build them?

This topic is 2855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dear All,

how would you efficiently implement strategic icons on units, just as in Supreme Commander?

Here is an example of what I mean:
http://share.yourfingertips.ch/supreme_commander.jpg

In SC, once the camera is zoomed out a given distance, units are no longer rendered with their model but replaced with a strategic icon.

My naive approach to this would be to use the modelview matrix, projection matrix, and viewport to calculate the screeen position of every unit. I would then set up a renderpass with orthogonal projection that draws the icons at the corresponding positions.

Is this really feasible for hundreds of units, or do you have better ideas?

Thank you very much,
Callidus

Share this post


Link to post
Share on other sites
Advertisement
Is multiplying 1000 vectors with a single matrix feasible? Trivial task for a computer. Is rendering a bunch of small textures no more than 32x32 pixels (basically particle rendering) feasible? Sure. I think you actually hit the most efficient method. If you're worried about speed you can always insert the points (that are projected to the screen) into a grid and batch units of the same type together into one icon with a number next to it.

You can also use that method for selecting units too as you probably already know. (The rectangle you draw to select just selects the screen space unit positions). If you are in fact making an RTS, I'm just guessing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!