Solved

Efficient Dirty-Rect Sprite Updating System

Posted on 1998-06-02
2
301 Views
Last Modified: 2013-12-03
I'm looking for a relatively straightforward method for updating multiple sprites to the screen, using a fullscreen mix buffer. It should take a list of dirty rects, combine them into a minimal region made up of a few rects, draw the sprites with clipping to the mix buffer (that part is easy) then copy it all to the screen. I'm interested in any algorithms to calculate the minimal bounding region as a small number of rects which can be blitted individually. C/C++ code preferred. Any thoughts about keeping the animation flicker free would be useful, too. Thank you!
0
Comment
Question by:ratty
2 Comments
 

Author Comment

by:ratty
ID: 1406372
Edited text of question
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1406373
You need to build a graph, where each vertex of the graph is a dirty rectangle. There is a connection between two vertices if the two rectangles intersect.

Once you have this ground work, it is easy to massage this to your needs.

For example, if you want to minimize on the number of blits, then you want to find clusters of vertices in the graph (i.e. minimize the distance between the verticies).
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question