HOW IT WORKS?

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
nad

HOW IT WORKS?

Post by nad »

Can anyone tell me how the tile engine in exult works?
I'd like to know how we make to draw the tiles in the correct order, for instance a column must be drawn over the avatar is this one is behind.

Or colum tiles must be over floor tiles...
What is the algorithm used?
Some kind of z buffer?


thanks a lot for your help!
man

yes

Post by man »

you are right!
i'd like to know too!

Please answer this post asap!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: yes

Post by wjp »

Funny... two posts from the same IP range on the same topic within 4 minutes of eachother written in the same style. What a coincidence... *cough*


Anyway, to summarize: we're not using a z-buffer, but we're sorting the shapes based on a very complex shape compare function.
nad

only a joke

Post by nad »

yes i am confuse...;-)
Just a joke and to (sorry) help people think it is a VERY interesting subject ;-) ;-) ;-)

next time i'll change of computer...no i'll won't do that again...
And sorry for my style but i am french and i 'am trying to do my best to communicate in the shakespeare's language ;-)

Can you tell me a bit more about this sort function, what's the name of the source file please...

thank you
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: only a joke

Post by wjp »

> Just a joke and to (sorry) help people think it is a VERY interesting subject ;-) ;-) ;-)

We already think exult is a VERY interesting subject :-)

> And sorry for my style but i am french

There's nothing wrong with your english. I was just pointing out that the writing style was the same in the two messages. :-)


> Can you tell me a bit more about this sort function, what's the name of the source file please...

It's in objs/objs.cc. The function is Game_object::lt
nad

thanks!

Post by nad »

yes exult is a very interesting project...
I am an ultima 7 fan and I hate u8...beurrrrrk

I am making a rpg too with sdl and fmod for music.
i am looking for the faster tiles rendering algorithm...

Where do you come from?
USA?
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: thanks!

Post by wjp »

I'm from the Netherlands.
nad

yo

Post by nad »

thanks for your help!

i 've found the order function you've told me...

This function seems to compare two objects...
Do you apply it to every objets in the scene to be drawn?
It means you'll have to make a lot of comparisons if you compare objects two by two , no?
nad

hou hou

Post by nad »

he wjp from this magnific country netherlands, where are you?
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: hou hou

Post by drcode »

Generally, only objects within a chunk (16x16 tiles) are compared with each other, or sometimes with objects in an adjacent chunk. Also, objects don't need to be compared if they're images don't overlap, since it then doesn't matter which is drawn first.
Locked