Results 1 to 6 of 6

Thread: Graphics speed up?

  1. #1

    Thread Starter
    New Member savage110's Avatar
    Join Date
    May 2013
    Posts
    10

    Graphics speed up?

    So I have this program that uses alot of animated graphics, and it's very slow. My teacher mentioned something about a graphics speed up, but didn't know how to use it, or if it's something you make in the program or what. So just wondering if there really is something that speeds it up, and if it's something i could use in my program. Thanks!

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,380

    Re: Graphics speed up?

    Well visual basic isn't know for it's outstanding graphics, while it handles graphics, it's kinda poor quality. So Microsoft gives us a few options, the first is to turn the double-buffered property for your form to true. This should reduce some flickering you may get. The second is to us a managed(or unmanaged) graphics wrapper. I tend to use XNA and have a few tutorials in my signature, where Jacob Roman(find him in vb6, games, or chit-chat forum) tends to use DirectX. But what kind of animation are you doing? Is it based on a timer, backgroundworker, or is it a collection of GIF's?
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    New Member savage110's Avatar
    Join Date
    May 2013
    Posts
    10

    Re: Graphics speed up?

    I'm really not totally sure. I have a timer tick start and at every tick a new picture is put onto the formsurface and the old one is covered by the background color (actually this covering comes before i make the new one.) It also could potentially be a slow server, but I don't think that's totally it.

  4. #4
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,380

    Re: Graphics speed up?

    Well if it is being done primarily by a timer, turning double-buffered to true would reduce the flickering effect that I'm sure you're getting. But other than that, you'd have to adjust the interval of the timer. The slower the interval the 'smoother' the graphics appear but the slower the graphics appear, where as a faster interval will cause the graphics to appear less smooth, but the graphics come up quicker. It's sort of a catch-22, you just have to find what interval is ideal and that just takes trial and error.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  5. #5

    Thread Starter
    New Member savage110's Avatar
    Join Date
    May 2013
    Posts
    10

    Re: Graphics speed up?

    Could it also be that i have three separate timers all ticking at different intervals? Because when the program runs, it seems like they all are following the speed of the slowest one.

  6. #6
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,380

    Re: Graphics speed up?

    Quote Originally Posted by savage110 View Post
    Could it also be that i have three separate timers all ticking at different intervals? Because when the program runs, it seems like they all are following the speed of the slowest one.
    Yes. I want you to read this article paying special attention the first example's cons, it's in C# but the same principals apply. That's pretty much what's going on. If you're dealing with a graphics intense program, I suggest looking into XNA. You don't have to create a full blown XNA program, in fact you're able to stick with using a windows form application while also using XNA in that win forms app. Take a look at my example here and Shaggy Hiker's example here.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width