[E] Add optional easing to smooth scrolling

Post about what you like and dislike on AAO and suggest new features and improvements.

Modérateur: EN - Forum Moderators

Règles du forum

[E] Add optional easing to smooth scrolling 

Message par ThePaSch » Dim Sep 04, 2016 7:06 pm

Smooth scrolling is currently a linear transition curve, which is applicable to the AAI games and multi-sided investigation locations in the original games; however, in the original games, courtroom scrolling had a rather steep easing curve with high acceleration and deceleration. How technically involved would it be to allow the user to set their own easing values OR alternatively provide a dropdown for applying predetermined easing values to the scroll?
Dernière édition par ThePaSch le Lun Sep 05, 2016 12:15 am, édité 2 fois.
Image
Avatar de l’utilisateur
ThePaSch
Moderator
 
Message(s) : 1221
Inscription : Dim Juin 13, 2010 5:56 pm
Localisation : Germany
Genre: Masculin
Langues parlées: English, German (native)

Re: [E] Add optional easing to smooth scrolling 

Message par Enthalpy » Dim Sep 04, 2016 8:04 pm

There are two separate questions here: how hard it would be to do such a thing in general, and how hard it would be to incorporate that into the infrastructure that AAO has now.

Right now, AAO uses this image. It sets the position in the viewport and then uses the transition css keyword to move from left to right. The fact that we use the transition css keyword limits us to certain kinds of ways to move the image around. What you want can be accomplished through something called a Bézier curve. While this can certainly be done, Bézier curves are hard enough to work with that I think it would be better to select from a preset. So the answer to the first question: fairly straightforward.

Adding this to AAO is trickier. Currently, if you ask each frame what its transition is, it would tell you "true" or "false". Under this proposal, it isn't that simple! A frame could tell you, "false," "linear" (like it is now), "Bézier curve" (like it would have to be for your proposal), or maybe other options! We would need to rethink what kinds of transitions AAO will allow and how a frame will store those. Not an easy thing!

Unas is in the middle of writing an architecture change to AAO, which will allow us to add new fields to frames and similar AAO objects. I'll look at this more closely when he's finished his change, as the new architecture will determine how easily this new change can happen. If you want the technical details on this architecture change and have some background knowledge of JavaScript, see here.
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson

Current AAO Development Priority: Issue #124+: Psyche Lock Back Conversation
Avatar de l’utilisateur
Enthalpy
Community Manager
 
Message(s) : 4164
Inscription : Mer Jan 04, 2012 4:40 am
Genre: Masculin
Langues parlées: English, limited Spanish

Re: [E] Add optional easing to smooth scrolling 

Message par ThePaSch » Dim Sep 04, 2016 8:29 pm

I understand; thanks for the quick response! I was aware that doing this in general wouldn't be a complicated matter, but was more curious whether the current model that AAO is based on would (easily) support such a change. The switch to a new architecture certainly sounds exciting. I do know Javascript, so I was curious as to what this change would look like, but the repo you linked to seems to be locked/private. Is it supposed to be?
Image
Avatar de l’utilisateur
ThePaSch
Moderator
 
Message(s) : 1221
Inscription : Dim Juin 13, 2010 5:56 pm
Localisation : Germany
Genre: Masculin
Langues parlées: English, German (native)

Re: [E] Add optional easing to smooth scrolling 

Message par Enthalpy » Dim Sep 04, 2016 8:59 pm

I can view it, and I'm not aware of any restrictions on it. Are you logged in with a BitBucket account?

Now that I'm looking over the code again, I realize that I made a major mistake: the place_transition field of frame objects is not stored as true or false, but as 0 or 1 - integers. That allows us to add a 2, which is exactly what you'd need for this feature. We don't have to worry about the architecture change at all!

The first step would be to add new place_transition values by amending trialdata_constants.php. You'll have to change the screen editor so that smooth scrolling options are no longer a checkbox but a simple select, change the functions that assume that the only place_transition values are 1, and then add a new transitioning type in top_screen_engine.css that has a Bézier curve to your liking.

If you're interested in developing this feature, then feel free to start developing it! Now that AAO is open-source, you can find the developmental version of AAO here, and feel free to make sure of the developer's forum.
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson

Current AAO Development Priority: Issue #124+: Psyche Lock Back Conversation
Avatar de l’utilisateur
Enthalpy
Community Manager
 
Message(s) : 4164
Inscription : Mer Jan 04, 2012 4:40 am
Genre: Masculin
Langues parlées: English, limited Spanish

Re: [E] Add optional easing to smooth scrolling 

Message par ThePaSch » Dim Sep 04, 2016 9:38 pm

Enthalpy a écrit :I can view it, and I'm not aware of any restrictions on it. Are you logged in with a BitBucket account?


I am, but it's telling me my access is denied. Could it have something to do with the fact that it's a branch of the repo on the UnasZole account instead of the public AAO repo on the AceAttorneyOnline team?

As for your realization - that's pretty great news! Thanks for the quick explanation on where to find everything relevant. I'll certainly see if I can make it work on my own. Cheers!
Image
Avatar de l’utilisateur
ThePaSch
Moderator
 
Message(s) : 1221
Inscription : Dim Juin 13, 2010 5:56 pm
Localisation : Germany
Genre: Masculin
Langues parlées: English, German (native)

Re: [E] Add optional easing to smooth scrolling 

Message par Enthalpy » Dim Sep 04, 2016 9:41 pm

That could be it. I have read permissions there, but you may not. I think your best bet is to write a message in the AAO Developer's forum asking to be given permissions.

Good luck!
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson

Current AAO Development Priority: Issue #124+: Psyche Lock Back Conversation
Avatar de l’utilisateur
Enthalpy
Community Manager
 
Message(s) : 4164
Inscription : Mer Jan 04, 2012 4:40 am
Genre: Masculin
Langues parlées: English, limited Spanish

Re: [E] Add optional easing to smooth scrolling 

Message par ThePaSch » Lun Sep 05, 2016 12:06 am

You were right - implementing this wasn't a big hassle at all (though navigating through the codebase and figuring out what triggers what with which parameters at what place in order to find out where to change things was a bit tedious, lol). After making sure everything works, I've now created a pull request with a working version of the feature. Hoping it can get approved quickly. :p

Thanks for your pointers!
Image
Avatar de l’utilisateur
ThePaSch
Moderator
 
Message(s) : 1221
Inscription : Dim Juin 13, 2010 5:56 pm
Localisation : Germany
Genre: Masculin
Langues parlées: English, German (native)

Re: [E] Add optional easing to smooth scrolling 

Message par Enthalpy » Lun Sep 05, 2016 1:04 am

ThePaSch a écrit :(though navigating through the codebase and figuring out what triggers what with which parameters at what place in order to find out where to change things was a bit tedious, lol)


grep is love. grep is life.

In all seriousness, nice! It may be a while before Unas accepts it and even longer before it goes live. I wish I had a firm time for you on any of those, but those depend on Unas. In any event, I'll read it tomorrow to see how it looks.
[D]isordered speech is not so much injury to the lips that give it forth, as to the disproportion and incoherence of things in themselves, so negligently expressed. ~ Ben Jonson

Current AAO Development Priority: Issue #124+: Psyche Lock Back Conversation
Avatar de l’utilisateur
Enthalpy
Community Manager
 
Message(s) : 4164
Inscription : Mer Jan 04, 2012 4:40 am
Genre: Masculin
Langues parlées: English, limited Spanish

Re: [E] Add optional easing to smooth scrolling 

Message par ThePaSch » Lun Sep 05, 2016 1:13 am

Enthalpy a écrit :grep is love. grep is life.


Eh, N++'s directory search worked just fine. It was certainly a godsend. :mrgreen:
Image
Avatar de l’utilisateur
ThePaSch
Moderator
 
Message(s) : 1221
Inscription : Dim Juin 13, 2010 5:56 pm
Localisation : Germany
Genre: Masculin
Langues parlées: English, German (native)


Retour vers Comments and Ideas

Qui est en ligne ?

Utilisateur(s) parcourant ce forum : Aucun utilisateur inscrit et 1 invité