Valhalla Legends Forums Archive | Visual Basic Programming | Layers

AuthorMessageTime
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 [u]Visual Basic 6[/u]?
January 3, 2006, 7:37 AM
TehUser
Rather than using the controls, you may want to use the BitBlt API.
January 3, 2006, 3:16 PM
Quarantine
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.
January 3, 2006, 3:36 PM
Ringo
[quote author=FrOzeN link=topic=13751.msg140227#msg140227 date=1136273820]
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 [u]Visual Basic 6[/u]?
[/quote]
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
January 3, 2006, 5:40 PM

Search