Hey you're back!
Originally Posted by VB_Alien
i was thinking about how tile transitions work.
Is this a continuance of your Custom Control Image Property thread
and/or your Copying tiles from sheet thread
I didn't post in your custom control thread because I didn't want to discourage you,
but in this post
there is code, for Public Sub New(), to turn on doublebuffering:
Note: This also works on a panel control, which can act as a container control for using "layered on" picturebox graphics.
However, you can also just
load a picture straight from a file into a memory-based Bitmap object
(to basically have a backbuffer for the graphic) using:
' Load the picture into a Bitmap.
Dim bm As New Bitmap(file_name)
' Display the results.
picImage.Image = bm
picImage.SizeMode = PictureBoxSizeMode.AutoSize
The more "polite" way of doing this is here
Code for loading to an Image object (using that as a backbuffer),
and then DrawImageUnscaled painting to a panel control is also shown on this jo0ls post
jo0ls also posted some nice Surface class code on this social.msdn thread
Personally I think flipping backbuffered graphics directly onto the form,
(with DoubleBuffered property set to true),
is just as valid as using controls so long as a Multiple buffering
is set up correctly offscreen.
Do you ever have a chance to play around with the
that surfR2911 posted as the last post
in you tiles sheet thread?
There are a whole bunch of ways to do tile transitions:
1.) A "flip map" hop, with or without a tile map scrolling (1
2.) A 2D "shoots and ladders" type transition
3.) A teleporter pad (with round go-thru portal or flying pad, DungeonSeige-style)
4.) An alpha-blended transition stairway (like Diablo-style)
Speaking of which, if you look for the links to the old VB6 demo that
rpgnewbie did for alphablended transitioning of Diablo-style rpg graphics
most of the links are broken (because they used the old style thread urls).
Additionally rpgnewbie had trouble getting the whole thing up in one zip
because of the upload limitations (and frequent time-outs) of the forum back then,
so maybe I it's time to try and do a re-posting to restore the attachment to its whole condition.
It's a very humble demo, but it still has gotten over 1000 "views" for parts A & B combined,
meaning close to 600 people at least tried it out to date.
In terms of an alphablending demo, using rpg graphics, that is designed to show a transitioning:
"when you go inside a building or behind a pillar the game "fades out" the blocking wall/roof/pillar."
it's pretty much the best demo available,
even though it uses isometric tiling
(and of course for your purposes would need some VB.Net alphablending code
similar to what is going on now in posts #19
, & #25
of the Viewer thread).