Sep 27th, 2006, 01:07 PM
Background in a game
I'm tryin to code a lil game and i wanna know how can i do the background.I mean background must move as u move.Like mario ? I'm using vb.net
btw sry for the bad english =)
Sep 28th, 2006, 01:15 AM
Re: Background in a game
A basic way of doing it is making the entire background out of tiles (like a normal tile engine), obviously, width must be greater than height. Then, in your sidescrolling game, your camera will store the width and height of the tiles the background uses. You store a camera X value (and a camera Y value, if you plan on having the character jump higher than your screen), then use BitBlt to draw onto the viewing area (Form or PictureBox DC). What you should search for on the internet is "SideScrolling", as this is what you're after.
Visual Studio 6, Visual Studio.NET 2005, MASM
Click Here to Expand Forum to Full Width
Survey posted by VBForums.