• Advertisement

Archived

This topic is now archived and is closed to further replies.

Drawing walls in SDL for a 2d tile engine?

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

How would i go about drawing some simple walls in SDl for my 2d based tile engine?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
what?

Share this post


Link to post
Share on other sites
As in draw in the z axis i guess so i can draw some simple wall tiles in SDL.

Share this post


Link to post
Share on other sites
If I understand correctly...

Do a regular tile engine, and for each tile mark wether you can pass through it or not. You can make "walls" (or anything else you want) impassable. Then you just have to use a texture for a wall. The only thing you have to be careful of is when coding the character movement across the map; make sure to check of the tile the character is moving to is passable. If not then do not move the character.

Share this post


Link to post
Share on other sites
But the problem is i need actual walls, not textures that look like walls.

Share this post


Link to post
Share on other sites
SDL is a 2D API. You said Z-Axis...hence you want a 3D API, look into OpenGL. And there are tiles that can look like walls.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by com
But the problem is i need actual walls, not textures that look like walls.


Actuall walls only exist in the real world If you see a wall in a game it is a texture that looks like a wall...

So, see the above poster

Share this post


Link to post
Share on other sites
quote:
Original post by com
But the problem is i need actual walls, not textures that look like walls.
Drywall, concrete or padded?

Share this post


Link to post
Share on other sites

  • Advertisement