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

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
punknad

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

Post 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 :)
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

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

Post 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.
punknad

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

Post 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.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

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

Post 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.
punknad

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

Post 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 :)
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

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

Post by Knight Captain »

There's probably multiple files involved.

Perhaps Dominus could point you in the right direction here?
punknad

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

Post by punknad »

We need your help, sir @dominus :)
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

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

Post by Dominus »

Can't help, don't know ;)
--
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!
punknad

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

Post by punknad »

At least, I've tried :)
Do you know if anyone else is knowledgeable on that part, please?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

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

Post by Dominus »

several but they've all gone silent. You just need to work yourself through the source code
--
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!
punknad

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

Post by punknad »

time flies :)
I'll do, my homework then.

Thanks Dominus and KC
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

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

Post 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.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

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

Post by Dominus »

Somehow it cannot save above z16
--
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!
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

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

Post 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.
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

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

Post 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
HumanBeing

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

Post by HumanBeing »

Scythifuge
Posts: 384
Joined: Thu May 14, 2020 1:34 pm

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

Post 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.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

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

Post 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?
Locked