Sign in to follow this  

Writing inside a sprite

Recommended Posts

Hi, the newbie strikes back! ;) On my game now is time to write a radar ( 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this