SunQuest
           C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old October 27th, 2002, 10:48 PM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: May 2001
Location: Ft Myers, FL
Posts: 4,097 kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 2 Weeks 5 Days 22 h 47 m 32 sec
Reputation Power: 532
Send a message via ICQ to kicken Send a message via AIM to kicken Send a message via MSN to kicken
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.

Reply With Quote
  #2  
Old October 28th, 2002, 02:36 AM
MJEggertson MJEggertson is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2002
Location: Seattle WA
Posts: 863 MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 8
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.

Reply With Quote
  #3  
Old October 28th, 2002, 11:52 PM
TechNoFear TechNoFear is offline
Offensive Member
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2002
Location: in the perfect world
Posts: 594 TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level)TechNoFear User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 14 h 6 m 15 sec
Reputation Power: 21
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

Reply With Quote
  #4  
Old October 29th, 2002, 08:31 PM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: May 2001
Location: Ft Myers, FL
Posts: 4,097 kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 2 Weeks 5 Days 22 h 47 m 32 sec
Reputation Power: 532
Send a message via ICQ to kicken Send a message via AIM to kicken Send a message via MSN to kicken
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Flickering w/ Win32 API and Painting


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway