Jibble

Author Topic: MODULE: rellax 0.1.4  (Read 7742 times)

Re: MODULE: rellax 0.1.4
« Reply #40 on: 15 Jan 2022, 09:58 »
I see, thanks for replying!

Could I alter these values manually in the module code, or will I break something? From what I gather, I might need to change the 0.04 value in line 272, as well as the 40x40 box in lines 307 and 308:

Code: Adventure Game Studio
  1.   _cam_window_w = 40;
  2.   _cam_window_h = 40;

Is this correct? Anything else I might want to tweak? :)

Ah it can also be the still ticks. Can you make your game 60fps instead of 40fps? It should take half a second on a 60fps game, I can also expose the still ticks, these were made for when a character falls it falls downwards, it only matters if the movement is done without leaving the box borders.

The game is already set to 60 (it might look like it has a lower fps because the gif is captured at 33 fps).
« Last Edit: 15 Jan 2022, 10:00 by Laura Hunt »

Re: MODULE: rellax 0.1.4
« Reply #41 on: 15 Jan 2022, 12:32 »
So I managed to find a workaround by commenting out these lines in order to set the still ticks to a fixed value of 30:

Code: Adventure Game Studio
  1. void doSmoothCameraTracking(){
  2.   //if(_prev_c_x == _TargetCharacter.x && _prev_c_y == _TargetCharacter.y)
  3.     //_count_still_ticks++;
  4.   //else
  5.     _count_still_ticks = 30;

By doing this, now the camera follows the character as soon as it moves, instead of waiting until it stands still, so yay I guess :-D (disclaimer: as mentioned above, the game runs at 60 fps but the gif was captured at 33 fps, so it doesn't look as smooth here as it does in-game).



I've tried with different values below 30 and also with 31 (as from what I can see, all values greater than 30 yield the same result) and 30 seems to be the smoothest. However, although the camera scroll in itself is smooth, the character's movement still looks a little bit jerky. Is there any other parameter I could tweak further in order to improve this?

« Last Edit: 15 Jan 2022, 12:41 by Laura Hunt »

eri0o

Re: MODULE: rellax 0.1.4
« Reply #42 on: 15 Jan 2022, 13:04 »
The only way I found to truly unjerk the movement is to not use movement linked with animation. In my games I only use it in rooms where the camera doesn't move, and every other rooms I don't. The usage of still ticks and the box alleviates it but only works if the character still moves reasonably fast.

Set your playable Character MovementLinkedToAnimation (anti-glide) to off and see how well it works. If the room has lots of scrolling the gliding is not very perceptible.

You can of course edit the code of the module, I want to update it so it's possible to change these values without doing so, because then it should be easier to everyone. :)

Re: MODULE: rellax 0.1.4
« Reply #43 on: 16 Jan 2022, 08:18 »
Set your playable Character MovementLinkedToAnimation (anti-glide) to off and see how well it works. If the room has lots of scrolling the gliding is not very perceptible.

It does look better! The only issue is that unlinking movement and animation means I don't quite have the same fine degree of control over the character's movement speed, but for now it's a good solution :)