Author Topic: MODULE: Smooth Scrolling & Parallax v1.7.1  (Read 55018 times)

Re: MODULE: Smooth Scrolling & Parallax v1.7.1
« Reply #180 on: 24 Mar 2019, 17:31 »
Hi Ali! I'm porting (Chicky's) Guard Duty to Linux and Mac, and I noticed that I cannot seem to get targetCharacter to work in Linux. The exact same code works fine in Mac and Windows, but for some reason Linux seems to be completely ignoring targetCharacter?

Curiously, we have reported Linux-related bug many years ago: https://www.adventuregamestudio.co.uk/forums/index.php?topic=33142.msg636472912#msg636472912
but it was supposed to be fixed.

Try searching for "eOSLinux" in the script.

On the other hand, this may be a new engine's bug too.


Ali

  • What will become of the baron?
    • Ali worked on a game that won an AGS Award!
    •  
    • Ali worked on a game that was nominated for an AGS Award!
Re: MODULE: Smooth Scrolling & Parallax v1.7.1
« Reply #181 on: 24 Mar 2019, 17:41 »
Yes, originally the module would cause a fatal crash on Linux, so it was disabled by default. But, as you can see, that line is now commented out. Frankly I have no idea what the problem is. The module doesn't do anything fancy in terms of scrolling. It just decides where to setviewport based on the co-ordinates of a particular character. So I can't see why that wouldn't work on Linux.

I'm afraid I don't have a Linux OS here to test it on. But I would try to narrow down the cause of the problem. Does setting *targetCharacter in the script succeed (i.e. the pointer is changed to cCharacter2, but the screen doesn't move)? Or does it fail for some reason and the pointer stays set to cCharacter1?

For instance, if you modify game_start in the module to:

Code: Adventure Game Studio
  1. function game_start(){
  2.   if (cEgo.Room == TEST ROOM)  targetCharacter = cCharacter2;
  3.   else targetCharacter = player;
  4.  
  5.   system.vsync=true;
  6. }
  7. (Pseudocode)
  8.  

And run the room, does it follow the other character instead?

Re: MODULE: Smooth Scrolling & Parallax v1.7.1
« Reply #182 on: 24 Mar 2019, 22:21 »
Pretty embarrassing that I didn't catch the     if (System.OperatingSystem != eOSLinux) line in the script XD
This must have been an old script that somehow didn't get updated to the commented version? I don't know how it happened, but nonetheless .. it's now commented out :D

Thank you - I've commented out the line and its matching closing brace, and will recompile with both. I'll update this thread when I see the outcome.
« Last Edit: 24 Mar 2019, 22:23 by vga256 »

Re: MODULE: Smooth Scrolling & Parallax v1.7.1
« Reply #183 on: 25 Mar 2019, 00:34 »
Recompiled and it's running perfectly in Linux now. Thanks again! :D