[01:44:44] --- DominusExult is now known as Dominus
[12:43:29] <Dominus> Arrrr: imagewin is what you need to look at
[13:05:55] <Arrrr> Thank you Dominus. I'm interested in how the sorting is handled
[13:06:25] <Dominus> oh, you mean objects in the world?
[13:07:08] <Arrrr> Yes, sprites, terrain, walls, etc
[13:07:47] <Dominus> I think there lies madness....
[13:07:53] <Dominus> in obj/...
[13:09:17] <Dominus> to get your bearing, take a look at the bug https://sourceforge.net/p/exult/bugs/1925/ and the patch by me that hacks the sorting of the bodies/carpet
[13:09:41] <Dominus> but that's as much as *I* can help you.
[13:09:57] <Dominus> maybe wjp or Marzo are more up to that task :)
[13:10:57] <Arrrr> Why is so complicated?
[13:15:15] <Dominus> probably because Exult started out as a mapviewer and needed to figure out the original without having the code for it...
[13:53:11] <Arrrr> Is this part of the sorting? https://github.com/exult/exult/blob/master/objs/chunks.cc#L705
[14:43:16] <DominusExult> yes, like it says, when a new object "enters" the world
[14:44:24] --- DominusExult is now known as Dominus
[15:03:34] <Marzo_android> Arrrr: the code to order objects for rendering is a mess of hacks to attempt to mimic the original's behaviour
[15:04:07] <Marzo_android> Basically, we generate a partial ordering of objects
[15:05:17] <Marzo_android> Objects that overlap can be compared with that partial order, objects that don't overlap generally can't
[15:05:35] <Arrrr> Well, it works fine, but i'm surprised is that complicated, given how old the game is
[15:05:52] <Marzo_android> There are more things, but this is the basic idea
[15:06:18] <Marzo_android> The original prrobably ued something much simpler
[15:06:30] <Marzo_android> But the age of the game is a red hering
[15:07:06] <Marzo_android> U7 is a full 3D world in a specific perspective
[15:08:00] <Marzo_android> The ordering needs to account for X, Y, Z, width, depth and height of both objects, as well a transparency
[15:25:11] <Dominus> If we were to redo our engine we would probably do it much more elegant and efficient
[15:25:54] <Dominus> You can see that when you look at the code of Pentagram (Exult for U8 in a nutshell)
[15:26:46] <Dominus> We used our experience to build a much better engine
[15:27:12] <Dominus> ("We" - I'm only guilty by association ;))
[15:27:34] <Arrrr> Would you use a different pl if you had the chance?
[15:30:25] <Dominus> Different what?
[15:30:54] <Marzo_android> I would not code it in any other language
[15:31:05] <Marzo_android> At least for the main engine
[15:31:45] <Marzo_android> I have been thinking of using boost.python and have most of the GUI as python scripts
[15:32:19] <Marzo_android> That way, a mod could easily override elements of the GUI
[15:32:57] <Marzo_android> But that's about it
[15:33:13] <Dominus> ;)
[15:49:18] <Dominus> Marzo_android: if we write up what we need or expect in a GUI like this, we could apply for Summer of Code 2017 ;)
[15:58:39] <Arrrr> lol
[15:58:58] <Arrrr> So, you apply this algorithm to the sorting https://www.wikiwand.com/en/Topological_sorting
[16:03:23] <Marzo_android> Not really, but the result ends up being the same
[16:03:54] <Marzo_android> Because most objects are stationary, they are inserted in sorted order in a list
[16:04:31] <Marzo_android> And update the list when an object moves, is created or destroyed
[16:04:40] <Arrrr> mmm
[16:04:47] <Marzo_android> (Or changes frame)
[16:05:22] <Arrrr> Where is the defined this update (which i suppose is just remove-add)
[16:05:59] <Marzo_android> I would have to go looking for it; it has been a while since I looked at that part of the code
[16:06:39] <Arrrr> Ok dont worry, i'll look in actors
[16:07:11] <Marzo_android> I think there is a ffile called ordinfo.h or something which is rrelated to it
[16:07:30] <Marzo_android> (At work, and can't easily check in Exullt source)
[16:07:48] <Arrrr> I suppose is this https://github.com/exult/exult/blob/master/actors.cc#L843
[16:22:18] --- DominusExult is now known as Dominus