Jump to content
  • Advertisement

Archived

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

OoMMMoO

simple newbie directX questions

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

hey Im a directX newbie and have a couple of questions about it. 1. are surfaces like layers? because when programming games in dos I made different layers one was the bg layer the next was the sprite layer and then two forground layers ect.. 2. how do I make bitmaps scroll like in a sidescrolling game? k cant think of any more off the top of my head. OoMMMoO

Share this post


Link to post
Share on other sites
Advertisement
1. Surfaces are linear areas of memory for image data. Yes they can be used layers layers.

2. Start reading tutorials on building a tile based graphics engine, i think you may find some on gamedev. Basically to do this, the level is made up of pieces of an image (all the same size) that are tiled up against each other. When the player moves so do the tiles, then clipping (cutting off the pieces of the tiles that don''t need to be shown) is performed and calculations are done to see if the next row or column of tiles need to be drawn.

There is also a simpler way, you can load the level onto a large surface in system memory (surfaces larger then the resolution are usually not permitted in video memory) and blt the portion of it (the size of the screen) needed to be shown. However, this method is usually much slower than using tiles.

+AA_970+

Share this post


Link to post
Share on other sites

  • 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!