Sign in to follow this  
jakussano

C++ directx map

Recommended Posts

I want to make a map like in " the settlers: rise of an empire". I don't want to make interface or levels or something like this;( not yet ) just a map to put trees flowers something simple. Can someone tell me where to start? For example: I can render objects with D3D but how do i track all of that objects? ( the map the terrain the flowers ). This is only one of the questions. I know how to draw a scene how to take input. I think i cand make one step forward: to do map, to put items. Hope you will write!

Share this post


Link to post
Share on other sites
A really easy way to do it is to create a 2D array (grid) that will hold all your objects. In each array cell you can specify what kind of object to render.

This isn't very flexible though, because if you want to place more than two items in one spot then you'll need to create a different structure. You could extend this idea and have a 2D array containing an std::list of objects at each cell.

Share this post


Link to post
Share on other sites
mmakrzem i will take your ideea and change it a bit :) like this:

i make an entity manager: to have a list with all objects added/ removed/ changed;

and a seperate world manager: to load the map;


Do you think it will work?

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