[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Adonthell-devel] Rendering, for the 1000st time
From: |
jasper van der jeugt |
Subject: |
Re: [Adonthell-devel] Rendering, for the 1000st time |
Date: |
Sat, 3 Jan 2009 13:57:16 +0100 |
Hello,
I haven't quite been involved in Adonthell development, but here is the main
algorithm I use in my RPG engine for drawing:
- For each object keep a list of colliding objects that are below or behind
this object. (Speed this up by only calculating this list when an object moves.)
- All drawable objects have a label "drawn". Start by setting all these labels
to "false".
- Now, for all entities in the map:
* If this entity's label "drawn" is true, skip.
* For all objects in the list, draw.
* Set "drawn" to true.
That did the trick for me (and seemed to work for large objects, too), hope
this helps.
PS. This way, tiles are considered entities as well.
Jasper
--
jasper van der jeugt <address@hidden>