I'm learning DirectX and came to the point where I have to make a tile engine. The place I found the code was a bit out-dated, so I had to remake it more or less by myself.
The idea is a side-scroller, let's say it's an FPS game.
What is the best way to draw objects with which you will be colliding? Drawing them as sprites definitely doesn't work well:
It just scrolls them together with the screen.Code:sprite_handler->Draw( column_img, NULL, NULL, &position1, D3DCOLOR_XRGB(255,255,255));
Drawing them in the tilemap is probably a bad idea too - how would I detect collision?
And so I'm out of ideas. How should I do it?
This is only if you didn't understood what I'm talking about:
In mario there are columns and blocks that you cannot go trough, you must jump to pass them. So I am trying to draw these so they are kept in place when the tilemap scrolls.