Page 1 of 1

How the z ordering is handled in Exult/Ultima 7?

Posted: Wed Jun 19, 2019 4:55 pm
by punknad
Hello,

I was wondering how Exult engine displays the U7 world?
I've read somewhere that there is 16 height levels?

https://gamedev.stackexchange.com/quest ... oors-in-2d

Can you please explain what the logic behind is?
Where in Exult source code can I find it?


Thanks a lot for your work on Exult, I'm following you guys since 2001 :)

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Thu Jun 20, 2019 3:32 pm
by Knight Captain
The description at the link is pretty accurate.

Both the original game and Exult save files have the 16 height levels limit. Marzo was considering raising in the save files since the engine itself can do higher heights.

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Fri Jun 21, 2019 4:09 pm
by punknad
Hello KC,

when you say 16 heights, do you mean 16 floors or do you mean 16 stairs between each floor? This is what confused me.
I notice that you can create your own "path" to join from one floor to the other, whether using existing stairs or stacking some items.

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Sat Jun 22, 2019 3:34 pm
by Knight Captain
Steps rather than floors. Each adult human in the game is 4 high.

There are a few stacking-stairs puzzles, using crates or stones to get up the same height.

If you have the game and Exult Studio installed you can open the map editor and see how things can be moved up/down by double-clicking on them.

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Sat Jun 22, 2019 8:29 pm
by punknad
Thanks a lot, KC. I'll try Exult Studio as you suggest.

Last question: do you know which source file has the code that displays U7 world in Exult?
I'm a bit lost in all the files in Exult github :)

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Mon Jun 24, 2019 4:51 pm
by Knight Captain
There's probably multiple files involved.

Perhaps Dominus could point you in the right direction here?

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Tue Jun 25, 2019 7:25 pm
by punknad
We need your help, sir @dominus :)

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Tue Jun 25, 2019 8:06 pm
by Dominus
Can't help, don't know ;)

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Wed Jun 26, 2019 6:43 pm
by punknad
At least, I've tried :)
Do you know if anyone else is knowledgeable on that part, please?

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Wed Jun 26, 2019 7:54 pm
by Dominus
several but they've all gone silent. You just need to work yourself through the source code

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Wed Jun 26, 2019 8:18 pm
by punknad
time flies :)
I'll do, my homework then.

Thanks Dominus and KC

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Mon Jul 01, 2019 6:39 pm
by drcode
I wrote a lot of it, but have also forgotten most. :-)

But U7 (and exult) keeps track of the world in 3D, but the coordinates are in tiles, which I think are 8x8 pixels. The maximum z-dimension is 16, but I believe we extended that in Exult.

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Mon Jul 01, 2019 6:55 pm
by Dominus
Somehow it cannot save above z16

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Tue Jul 02, 2019 9:06 am
by Knight Captain
It's a limitation of the Exult save format. Marzo had it on his feature request board.

I made a tower house out of Usecode and was so bummed when I reloaded. Everything above 15 fell by 16.

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Tue Aug 13, 2019 7:48 am
by Colourless
Generally exult should be able to handle higher. Its the on disk format where the limitations come in as it largely matches how the original games stored the data as few bits as possible. It's also possible the usecode of the original games might get confused if "lift" values are out of range too I can't think of any particular examples but its just a thought that it might happen

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Tue Aug 20, 2019 6:54 am
by HumanBeing

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Thu Aug 22, 2019 3:52 am
by Scythifuge
The ability to stack more objects would be a godsend. I am still hoping that Exult can handle it, one day.

I am imagining workarounds for pyramid temples and mountains, though it is a frustrating limitation.

Re: How the z ordering is handled in Exult/Ultima 7?

Posted: Thu Sep 05, 2019 1:49 pm
by Knight Captain
Not to mention the order things are stacked in is a little buggy. For example if I put a chair too close to a desk the desk will clip the chair.

Couldst Marzo provideth an update?