Suggestion

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
Kada2k7

Suggestion

Post by Kada2k7 »

Hello!

I recently got my hands on Ultima 7 (the black gate) and found out about Exult and was very excited. I never played Ultima back in the days, but I've heard so much praise about it and I wanted to give it a try. BUT! I couldn't play it longer than a minute before I started feeling "motion sickness". The static movement that player character makes with the entire screen/background jumping to the next position made me feel ill (physically). Perhaps I'm just not any hardcore gamer anymore, but I have a small suggestion......

Since you're able to hack into the program code writing this excellent piece of software (Exult I mean!), wouldn't it be possible to add an option for smoooooth movement of the character, and have the background scroll to the new position? Or, alternatively, keep the static movement but have the background scroll. I understand the static movement may be important for the game to function correctly, but the view shouldn't be affected by this, yeah?

Please consider this little feature for us weaker gamers! :)
Andrea B Previtera

Re: Suggestion

Post by Andrea B Previtera »

Exult coders correct me if I'm wrong, but for the little fiddling I've done with the source code - changing the scrolling would mean changing the very structure of the whole engine. It would impact practically everything, from movement to eggs, collisions, pathfinding and more.
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by SB-X »

Yes I seemed to recall you talking about this in #exult, having investigated it yourself, but I wasn't sure. Such a change will be harder than it looks.
I'm not an Exult coder though...
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by drcode »

I remember thinking the same thing when I first played Ultima7, but I got used to it. Eventually, it becomes part of the game's charm.:-)
Tobyn

Re: Suggestion

Post by Tobyn »

you could try setting Gameplay Options - Speed to max (10 frames per second IIRC), which goes for a much smoother scrolling experience, although the Avatar and companions will become frantic and look like on Speed or way too much Caffeine or whatever those drugs may be called... Anyway, I like the max frame setting and only play Exult that way.
E_Jim

Re: Suggestion

Post by E_Jim »

This could prove to be quite a programming feat, but would it be possible to "interpolate" between the proper game frames? I mean, is there an algorithm that can generate a smooth transition, adding generated frames between two static frames, and that does not drain the CPU while at it?

I'll look around to see if something like that exists...
Andrea B Previtera

Re: Suggestion

Post by Andrea B Previtera »

Interpolating between two frames results into the thing known as "morphing". For example: http://www.youtube.com/watch?v=nlEHCZBXo9k

Interpolating is useful in other scenarios (mostly 3d stuff)
Skutarth
Posts: 71
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by Skutarth »

I never really thought about it before, but couldn't smooth scrolling be achieved through post-processing effects?
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by Colourless »

Yes it could, but not too well. Diagonal movement of the viewpoint will cause problems because not all the tiles you'll need will have been rendered. Pure horizontal or vertical movement will be ok. However, there is a slight catch, the simplest way will only cause the screen scrolling to be smooth, it wouldn't cause the movement of objects to be smooth, that includes the avatar, it would be somewhat bad looking. If you want to do things that are more complicated, it will look sort of ok when transitioning between two frames but you'd likely get some nasty artefacts occuring.

The most important thing you want is smooth scrolling and smooth movement of the avatar and party members. Smooth movement of other objects would be nice, but it's not something that would be a priority at all to an implementation.

What I would think of doing is something like this. After every game tick (that controls party movment) occurs take a snapshot of the current state of the parts of the world that needs to be rendered and a generous border. When rendering, interpolate between the current snapshot and the previous snapshot using the time till the next snapshot is intended to occur as the factor. This will introduce some latency but that's the tradeoff you have for smooth scaling if you don't want to be doing prediction.

Some people don't like the latency involved with interpolation, but it's the most straight forward system to do it. It works very well in Pentagram.

If the snapshots don't occur at the interval of the party movement, then things will become choppy. But it's a case of how smooth do you want it to be. If the FPS rate is really low then the amount of latency introduced might be unbearable so it would be a thing of personal taste. If snapshots occur slower than party movements (by integer factors of the movement rate) then, while everything will be really smooth, the movement of all the objects on screen wont match what's actually occuring in the game.
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by Colourless »

/me looks around and whistles nonchalantly and then casually mentions something along the lines of want smooth scrolling... download the next snapshot...
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by marzo »

download the next snapshot...
There seems to be a few kinks in it. For one, it breaks projectile weapons (e.g., shape 857); I haven't tested other forms or attack.
[edit]: clarification: only when used by the avatar. Also, it breaks all forms of attack by the avatar.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
TdI

Re: Suggestion

Post by TdI »

>something along the lines of want smooth scrolling

Sweet. Obviously, this still needs quite abit of work. Beside what Marzo mentioned, the screen sometimes "yerks" back when running with the long arrow and your companions now look as if they're in some kind of over caffeinated hyperactive state, but otherwise its smooth as a baby's ass.

Er... thats a german figure of speech. I'm not sure you say that in english.
TdI

Re: Suggestion

Post by TdI »

I'm not sure if I like the way it looks. Maybe it just needs some time getting used to, but right now it seems as if the Avatar is walking on ice.
Thankfully you also put in the option to turn it off... for the purists.
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by Colourless »

I'll fix the stuff up at some point. I'll also add in some options to add 'partial' smooth scrolling so it's wont seem quite like the avatar is walking on ice.
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by Colourless »

I've committed a few changes. Made it so smooth scrolling is no longe just an on/off switch. It's now a percentage value that will control how much time is spent smoothly scrolling during a move and how much time is spent 'still'. I set the default now to 75%.

Combat problems should now be fixed.

I'll focus on improving party movement in a day or so as well as fixing up a few issues with movement.
MustardCat

Re: Suggestion

Post by MustardCat »

Wow just tried it, very nice.
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by drcode »

Hey, how'd you do that so quickly? I thought it would be a big project.

The Avatar's movement looks like Michael Jackson's "moon-walking":-) Even if you fix it, it might be amusing to have it turn on when he's walking on snow in SI.
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by Colourless »

How did I do it so 'quickly'? Well a few reasons. In my post above you can see that I decided that probably only needed for avatar and party. If everything was interpolated then, yeah it would be a big task, but as I mainly focused on getting the scrolling smooth then it is a lot simpler, and really can just be considered a hack. I actually started implementing it once before so I already had a good idea where to start. And of course it's not quite finished yet. I want to get the parties movement smooth too.

As for the avatar looking like he's moon-walking. It's mostly just because there are so few frames of animation. With only a 2 step walk, it looks like the avatar is mostly sliding across the ground rather than walking. I have a few ideas how to improve it.
Tobyn

Re: Suggestion

Post by Tobyn »

very impressive, keep up the efforts, although due to performance I'll probably stick with my 10 FPS-"experience" (which I dared to call "much smoother" because 10-FPS-walking at highest speed with cursor at edge of screen really *is* - and not only compared to 2-FPS-walking with cursor somewhere near the Avatar ;)

But say, do you also experience crashes whenever the Orb of the Moons is used now? I left a message in the bug tracker, but now I found out a bit more: only crashes with second (evening) snapshot of 2007-11-06, in the first (morning) one the Orb works correctly and doesn't crash the game, whereas the minor blue moongate issue dates back at least to 2007-10-30 (the oldest snapshot I have kept).
Skutarth
Posts: 71
Joined: Thu May 14, 2020 1:34 pm

Re: Suggestion

Post by Skutarth »

Very impressive. At 100%, it feels like the SNES version (bleh) when you use the arrow keys.
You should, however, move the option to the video options instead of gameplay.

It would be awesome if everything could be interpolated like this.
Yeah, I already know it's unlikely due to the rendering code, but it may happen one day.
Regardless if that ever happens, or if it's even improved anymore at all, you've already solved the original issue: reducing motion sickness for affected players.
Mission accomplished.
Locked