Rendering in U7
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Rendering in U7
Hello, i'm myself a curious programmer, and just wondered about how is rendering in exult done.
Re: Rendering in U7
And by rendering i mean map rendering, every item and npc in the world.
Re: Rendering in U7
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.
-
- Site Admin
- Posts: 731
- Joined: Thu May 14, 2020 1:34 pm
Re: Rendering in U7
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
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
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
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Re: Rendering in U7
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.
What makes it so hard is that many objects occupy the same space, like paintings on walls.
Re: Rendering in U7
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
At each frame, the NPC is removed from the list and then added back at the new spot.