• Advertisement
Sign in to follow this  

Writing inside a sprite

This topic is 3636 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

Hi, the newbie strikes back! ;) On my game now is time to write a radar (http://pidigi.blogspot.com if you like to see it: the blog is in italian but there are some videos and screenshots) There are two possible ways to do it: 1) writing a sprite for the radar background (the ellipse), and write a sprite for each dynamic component (i.e. a 2x2 square radar displaying each ship in target) 2) writing an unique sprite, and modifying it's texture dynamically. I think that the first option is better (confirm?), but the second is interesting, because i don't know how to create/modify a texture on-the-fly. It's interesting because i've also a second need: to make a method to write a text on the video. The default directx function is too much slow, i don't need to use vector fonts, and special effects, i need only to write a string into screen in 2D coordinates, using a bitmap font. But i need that this funcion will be light, so i can display a lot of strings without loose too much FPS. To do this i've to create a memory area, write on it the bitmap string and then pass it as texture for a sprite. Similar, to make a radar, i think i've to allocate an area, blit into it the background of radar (the ellipse), then drawing on it all the ships. Finally, use this area like texture for a sprite. Is correct? And what is the functions and approach to use? Thanks.

Share this post


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

  • Advertisement