2D Engine, non tiled scrolling.

Started by
-1 comments, last by Stefaniii 20 years, 5 months ago
Here is my plan for the 2D game Im building: Levels are stored in multiple ''layers''. The first layer is just a pictured background for static things that never move (sky, ground etc). The second layer is a bitmask that paints passable and impassable terrain. The third layer is logical game objects (enemies, player spawn, powerups, damage areas etc etc). Now levels are obviously very large, so I can''t load 20 screens of background into the video card memory all at once. My idea is to split up the level into a series of 1024x768 blocks and to only store 3 blocks in video memory at any one time. Ie I would store the block the player is currently in, the next block and the previous block. When a player leaves one block and enters another, the engine will have to load an entire new block into video memory. Will this cause a significant delay? Ie how long would it take to copy 1024x768 32bit pixels from system memory into a texture in video memory? Can anyone see any other flaws with my engine design? I should also add that it would be implemented using textured quads. Actually I have total newbie question as well. Will windows manage graphics memory for me anyway? Can I just go ahead and load up all the textures I want and have directx and windows automatically shuffle things between system and video memory?

This topic is closed to new replies.

Advertisement