|
-
May 13th, 2013, 03:13 PM
#21
Re: Falling Game
Probably not, unless you start running into performance issues. There are many possible ways to do any part of that, some are a bit more efficient than others. Try whatever feels good to you, and if that proves to be too slow, then you can change it. I'd suggest altering the timer interval, first, as that will tend to have the best visual result. If you get enough pictureboxes, and they are falling fast enough, then the display might appear to stutter, in which case it is time to try something else.
One thing you might consider is that each control has a .Tag property that you can use for whatever you want. Suppose you put an integer into the .Tag property for each of your PB controls. Then, when the timer ticks, you might do something like this:
PB.Top += CInt(PB.Tag) * someFactor
The larger the integer in PB.Tag, the faster the PB will move down the screen. someFactor can start out at 1 for the first level, then become 1.1, 1.2, etc, for each subsequent level, and the PB will appear to move faster and faster as someFactor increases. However, this is changing the rate of change of the PB rather than changing the timer interval, so it could get ugly fast. Decreasing the interval rather than increasing someFactor would have the same result, but a smoother motion.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|