Solved

Efficient Dirty-Rect Sprite Updating System

Posted on 1998-06-02
2
302 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Event ID 10010 3 77
SQL to ElasticSearch Query 1 777
What is MicroStrategy.NET? 2 83
Starting to use Git with Visual  Studio Online 1 25
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 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