### Tweening

Scripts and code that enhance the gameplay functionality of the engine.

#### Re: Tweening

buckmaster
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
It worked fine for simple GUI object movement - I made roll-out button panels that sit on the edges of the screen.
That's exactly what I was doing, and they didn't look smooth until I made those changes.

#### Re: Tweening

J0linar
Posts: 46
Joined: Thu Feb 05, 2015 8:50 pm
Thats cool, could be used for doors/windows/... evrything
would just need things like keylock/unlock and for windows a setting ifbroken = isopen and we could use potentially evry shape without the need of animating it. I can see the value of this, it could be used for cutscenes as well (that would need some more work and maybe a lookup at gmk cutscenes or verve on pointers how to combine this)

#### Re: Tweening

rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm

It worked fine for simple GUI object movement - I made roll-out button panels that sit on the edges of the screen.
That's exactly what I was doing, and they didn't look smooth until I made those changes.
Weird - I'll try to get a video posted...
https://github.com/RichardRanft/Project13
They're not silky smooth, but they are acceptable in my book. The bottom panel is not moving as far, so it looks pretty smooth, but the side panels are a little noticeable if you watch them closely.
And I forgot that I modified GameTSCtrl and added an onResize() callback. Anyway, should be okay as long as you don't resize the window....

#### Re: Tweening

buckmaster
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
Well, I wanted silky smooth, and I got it .

Having a window resize callback is a very good idea. I think @ Azaezel proposed it a while back. Not sure what happened to the idea.

#### Re: Tweening

Gibby
Posts: 72
Joined: Wed Feb 11, 2015 2:40 pm
Lukas:

I got this error trying to compile:

Code: Select all

16>c:\torque\363_vehiculo\engine\source\console\consoleobject.h(620): error C2259: 'Tween' : cannot instantiate abstract class 16> due to following members: 16> 'void ITickable::interpolateTick(F32)' : is abstract 16> c:\torque\363_vehiculo\engine\source\core\itickable.h(113) : see declaration of 'ITickable::interpolateTick' 16> 'void ITickable::processTick(void)' : is abstract 16> c:\torque\363_vehiculo\engine\source\core\itickable.h(117) : see declaration of 'ITickable::processTick' 16> c:\torque\363_vehiculo\engine\source\console\consoleobject.h(620) : while compiling class template member function 'ConsoleObject *ConcreteClassRep<T>::create(void) const' 16> with 16> [ 16> T=Tween 16> ] 16> c:\torque\363_vehiculo\my projects\vehiculo363\source\t3d\tween.h(61) : see reference to class template instantiation 'ConcreteClassRep<T>' being compiled 16> with 16> [ 16> T=Tween 16> ] 
did I need to change consoleObject?

#### Re: Tweening

LukasPJ
Posts: 379
Joined: Tue Feb 03, 2015 7:25 pm

Lukas:

I got this error trying to compile:

Code: Select all

16>c:\torque\363_vehiculo\engine\source\console\consoleobject.h(620): error C2259: 'Tween' : cannot instantiate abstract class 16> due to following members: 16> 'void ITickable::interpolateTick(F32)' : is abstract 16> c:\torque\363_vehiculo\engine\source\core\itickable.h(113) : see declaration of 'ITickable::interpolateTick' 16> 'void ITickable::processTick(void)' : is abstract 16> c:\torque\363_vehiculo\engine\source\core\itickable.h(117) : see declaration of 'ITickable::processTick' 16> c:\torque\363_vehiculo\engine\source\console\consoleobject.h(620) : while compiling class template member function 'ConsoleObject *ConcreteClassRep<T>::create(void) const' 16> with 16> [ 16> T=Tween 16> ] 16> c:\torque\363_vehiculo\my projects\vehiculo363\source\t3d\tween.h(61) : see reference to class template instantiation 'ConcreteClassRep<T>' being compiled 16> with 16> [ 16> T=Tween 16> ] 
did I need to change consoleObject?
Ohh right.. I may have edited the code a little prior to uploading... It's because I forgot that you have to implement all the ITickable functions. I.e. ProcessTick InterpolateTick and AdvanceTime. Where I only implemented one.. Just create empty implementations for ProcessTick and InterpolateTick.. I'll edit the code

#### Re: Tweening

Gibby
Posts: 72
Joined: Wed Feb 11, 2015 2:40 pm
@Lukas: Thanks!

#### Re: Tweening

cybore
Posts: 29
Joined: Fri Feb 13, 2015 10:18 am
Could this be used for moving platform objects? If so, is there any "known" problems with collisions?

#### Re: Tweening

buckmaster
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
Yes: they don't work.

#### Re: Tweening

Gibby
Posts: 72
Joined: Wed Feb 11, 2015 2:40 pm

#### Who is online

Users browsing this forum: No registered users and 1 guest