Tweening

Scripts and code that enhance the gameplay functionality of the engine.
25 posts Page 2 of 3
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Thu Feb 19, 2015 11:08 pm
rlranft wrote: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.
J0linar
Posts: 46
Joined: Thu Feb 05, 2015 8:50 pm
by J0linar » Thu Feb 19, 2015 11:23 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)
rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm
 
by rlranft » Fri Feb 20, 2015 12:41 am
buckmaster wrote:
rlranft wrote: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....
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Fri Feb 20, 2015 2:03 am
Well, I wanted silky smooth, and I got it ;).

Having a window resize callback is a very good idea. I think @
User avatar
Azaezel
proposed it a while back. Not sure what happened to the idea.
Gibby
Posts: 72
Joined: Wed Feb 11, 2015 2:40 pm
by Gibby » Sat Feb 28, 2015 8:00 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?
LukasPJ
Site Admin
Posts: 348
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Sun Mar 01, 2015 1:43 am
Gibby wrote: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 :P
Gibby
Posts: 72
Joined: Wed Feb 11, 2015 2:40 pm
by Gibby » Sun Mar 01, 2015 4:35 am
@Lukas: Thanks!
cybore
Posts: 16
Joined: Fri Feb 13, 2015 10:18 am
by cybore » Wed Mar 04, 2015 2:06 am
Could this be used for moving platform objects? If so, is there any "known" problems with collisions?
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Wed Mar 04, 2015 9:39 am
Yes: they don't work. :P
Gibby
Posts: 72
Joined: Wed Feb 11, 2015 2:40 pm
by Gibby » Wed Mar 04, 2015 3:46 pm
25 posts Page 2 of 3

Who is online

Users browsing this forum: No registered users and 2 guests