|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
||||
|
||||
|
Flickering w/ Win32 API and Painting
I've been making simple game type things lately to help figure out how to use the windows API and they work ok for the most part, but my breakout game that I made flickers alot and I'm wondering if anyone here may have some ideas as to how to prevent it, or reduce the amount.
The script is pretty long, so I just put it on my site at http://kicken.mine.nu:8008/extras/cpp/breakout/ Everything needed to run it should be there. I'm using Borland's free C++ compiler to build the programs. Havn't got MSVC++. Thanks. |
|
#2
|
|||
|
|||
|
Don't have time to look at the code: there's way too much there. Usually, you check to see if the object needs painting, and only paint if you need to. That is, if you're going to be painting the same thing that's already there, don't do it.
|
|
#3
|
|||
|
|||
|
Too busy to read ALL your code (and it took more than 30 sec to load the page).
Are you using a framebuffer? Finishing all drawing before calling a paint? using GetUpdateRect() before calling BeginPaint()? Returning TRUE to WM_ERASEBKGD msg's if your controls are flickering?
__________________
The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions. Frank Zappa |
|
#4
|
||||
|
||||
|
I'll check it out.
Well, sorry for the long load times, running that site of my local connection which is pretty slow. Also I know there is a lot of code and that's fine that you didn't look through it all (wasn't really expecting anyone to, just though i'd provide it).
I'm still learning the terms of the trade so not sure what a 'Frame buffer' is, but I'll look into it. I'll look into those functions and messages also. Thanks for your help and ideas. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Flickering w/ Win32 API and Painting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|