Jump to content
  • Advertisement
Sign in to follow this  
imsangha

Drawing a sprite on a texture

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

Here is my situation... I am writing a 2D tile-based RPG game, only using the Sprite class from MDX(C#.) Each tile is 16x16 in size, and I think it is a waste of process if i have to draw 225(15 tiles x 15 tiles) tiles for every single frame. So I am trying to print the entire tile map into one huge surface while loading a map, and just copy-and-paste a portion of the surface to a device. I know a texture is not a canvas, but since the Sprite class only takes a "texture" as a source, I guess I'll have to draw on a texture. What is the best way to accomplish this? sprite.draw( a texture, rectangle, vector, vector, color ); [ ][ ][ ] | | [ ][ ][ ] -> | | [ ][ ][ ] | |

Share this post


Link to post
Share on other sites
Advertisement
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!