Page 1 of 1

Rendering in U7

Posted: Mon May 20, 2013 2:07 pm
by SomeDude
Hello, i'm myself a curious programmer, and just wondered about how is rendering in exult done.

Re: Rendering in U7

Posted: Mon May 20, 2013 2:23 pm
by SomeDude
And by rendering i mean map rendering, every item and npc in the world.

Re: Rendering in U7

Posted: Tue May 21, 2013 7:37 pm
by drcode
The code is in gamerend.cc, I believe. First we render the flat tiles, then the various objects using a complicated algorithm that nobody understands.:-)

Re: Rendering in U7

Posted: Wed May 22, 2013 6:14 am
by SomeDude
Wow, thanks for the hints. Reading it now.

Re: Rendering in U7

Posted: Sat May 25, 2013 9:02 am
by Colourless
The most peculiar thing about how Exult renderers is all the objects are sorted as they are added into their 'chunk'. Exult doesn't do sorting when doing actual rendering. (Note I haven't checked the code in years, it may have changed, but I doubt it)

Re: Rendering in U7

Posted: Sat May 25, 2013 7:03 pm
by Dominus
funnily, thanks to Dale, I found a strange render bug.
When you place an object on an egg the object will get the same coordinates as the egg (x,y,z). Unfortunately if there is already an object in that spot with exact the same coordinates, the new placed object is sorted *beneath* the old object...
http://sourceforge.net/tracker/?func=de ... tid=102335

Re: Rendering in U7

Posted: Tue May 28, 2013 8:25 pm
by drcode
Yes, we pre-sort everything. I thought it would be too slow to do it during rendering.

What makes it so hard is that many objects occupy the same space, like paintings on walls.

Re: Rendering in U7

Posted: Mon Jun 17, 2013 9:49 am
by SomeDude
But at some time npcs will walk, so there must be more sortings mechanisms. Not counting with projectiles. Am i wrong?

Re: Rendering in U7

Posted: Mon Jun 17, 2013 8:43 pm
by drcode
At each frame, the NPC is removed from the list and then added back at the new spot.

Re: Rendering in U7

Posted: Sat Jun 22, 2013 10:11 am
by SomeDude
Ah, i see. Thanks for your explanations :D