• Welcome to Valhalla Legends Archive.
 

Layers

Started by FrOzeN, January 03, 2006, 01:37 AM

Previous topic - Next topic

FrOzeN

I'm working on a simple game in VB6.

I know how to draw the terrain and stuff, though say as a character moves across it I want it to redraw the terrain below them. I fiqured having some form of layers would work nicely.

My idea would be to get a Image Control (for it's transparency) and then have it as a control array. Then as characters/objects get created it dynamically creates a new control which can have it's .Left/.Top properties used to move it around the specified area.

Would this be the most practical way of doing it in Visual Basic 6?
~ FrOzeN

TehUser

Rather than using the controls, you may want to use the BitBlt API.

Warrior

I'd use something like DirectDraw as well since it optimized for 2D, and if you want to obtain the 3D look in a 2D game I'd use isometric tiling for your map.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Ringo

Quote from: FrOzeN on January 03, 2006, 01:37 AM
I'm working on a simple game in VB6.

I know how to draw the terrain and stuff, though say as a character moves across it I want it to redraw the terrain below them. I fiqured having some form of layers would work nicely.

My idea would be to get a Image Control (for it's transparency) and then have it as a control array. Then as characters/objects get created it dynamically creates a new control which can have it's .Left/.Top properties used to move it around the specified area.

Would this be the most practical way of doing it in Visual Basic 6?
It would be better to learn about masking than it would to use the image controll :)
I'd use BitBlt (as stated by tehuser) to get the part of the background you want to draw it to, then BitBlt the transparent image to that, then BitBlt it back to the background.
You might also want to look into transparentBlt()

hope this helps