Jump to content
  • Advertisement
Sign in to follow this  
ElvirB

2D Game Tiling

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

Well, I have been playing around with DirectX for a little bit, mostly playing with sprite and DXFont manipulation. Recently I had an itch to try and create a 2D strategy game, something similar to Warcraft (the first one), which was in DOS. I have gotten some painful things out of the way, such as creating DX classes and sprite manager, etc. My question is what would be best way to go about tiling textures onto "something" to display and move the map on the screen. The reason I said something is because there a many choices to choose, which also confuses me. So first question: What would be the best way to tile texture? Onto a sprite then move the sprite around? Also would it be wise to create a primitive object which had texture tiles on it then move the camera around to simulate map movement? I am in favor of using the world transition camera to move and simulate map movement but I was wondering how to implement that? Would rendering to a offscreen surface be wise? My simplistic map structure looks as such:
class CMap
{
private:
	IDirect3DSurface9* mMap;
	LPDIRECT3DTEXTURE9 mTexture;

public:
	CMap();
	bool initMap(*stuff here*);
	void drawMap(*stuff here*);
	void cleanUp();
};

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!