Author Topic: AGS engine Linux port  (Read 84202 times)

Radiant

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Linux port
« Reply #620 on: 16 Jul 2017, 15:59 »
EDIT: I just noticed that we already have agsjoy stubs in the engine. Now I recall that there was an opened issue about some stubs missing.
If I had a full list of functions, I could add them.

Here you go:

bool IsJoyBtnDown (int button);
bool JoystickRescan ();
bool Unplugged ();
bool Valid ();
int GetAxis (int axis);
int JoystickCount ();
static bool IsOpen (int ID);
static Joystick* Open (int ID);
static void Click (MouseButton button);
String GetName ();
String JoystickName (int ID);
void Close ();
void DisableEvents ();
void EnableEvents (int scope = 0);
void Update ();
« Last Edit: 16 Jul 2017, 16:02 by Radiant »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Linux port
« Reply #621 on: 11 Aug 2017, 00:30 »
Radiant, I downloaded latest version of agsjoy plugin, and it does not have "IsJoyBtnDown" function, only Joystick.IsButtonDown. Is it a function from some older version?

Radiant

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Linux port
« Reply #622 on: 11 Aug 2017, 07:38 »
That's possible, I was not aware there had been an update to this one. My version is labeled 1.2.0.0, by Ferry "Wiz" Timmers 2010, file size 90112 bytes. But this thread here also reads 1.2.0.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Linux port
« Reply #623 on: 11 Aug 2017, 07:44 »
Could you upload your version somewhere?

Radiant

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Linux port
« Reply #624 on: 11 Aug 2017, 07:48 »
Here you go: http://crystalshard.net/test/agsjoy.dll
Where did you get your version, if it wasn't from that thread?

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Linux port
« Reply #625 on: 11 Aug 2017, 14:48 »
Where did you get your version, if it wasn't from that thread?
It was from that thread, I clicked on Download v1.2.0 link.

Radiant

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Linux port
« Reply #626 on: 11 Aug 2017, 15:23 »
Ok. Well let's go with that one, I'll sort things out on my end :) Thank you for your help.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Linux port
« Reply #627 on: 11 Aug 2017, 15:34 »
There actually IS "IsJoyBtnDown" function in your version of plugin. I believe I should add it too in case that was used in any released game.

Radiant

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Linux port
« Reply #628 on: 11 Aug 2017, 15:51 »
It is, yes (e.g. Vector Vendetta).

Re: AGS engine Linux port
« Reply #629 on: 09 Sep 2017, 00:14 »
Hey! I have a small problem on MY COMPUTER but I don't know how to solve. I built the Linux engine in Ubuntu 16.04 and if I try running a game with it, it's excruciatingly slow. So I test and run my own game using Wine. I have Steam in this computer too. I play the Wadjet Eye games and they all work well. When I tried running Until I Have You from Steam it ran as bad as my own built Linux Engine, so I guess there is something more to it. I don't have much installed on this Ubuntu computer since I mostly use it only for developing my game in Adventure Game Studio (with Wine).

My computer config is: i7-7500U CPU @ 2.70GHz, Video is Intel HD Graphics 620 - Kabylake GT2, 16GB RAM, 512GB SSD. Also it's not heating or anything and I can run some fairly heavy stuff on this notebook.
My kernel (cat /proc/version): Linux version 4.10.0-33-generic (buildd@lgw01-22) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #37~16.04.1-Ubuntu SMP Fri Aug 11 14:07:24 UTC 2017


I am posting this in case someone have any idea what's wrong, if I have some wrong library installed...

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Linux port
« Reply #630 on: 09 Sep 2017, 01:55 »
Hey! I have a small problem on MY COMPUTER but I don't know how to solve. I built the Linux engine in Ubuntu 16.04 and if I try running a game with it, it's excruciatingly slow. So I test and run my own game using Wine. I have Steam in this computer too. I play the Wadjet Eye games and they all work well. When I tried running Until I Have You from Steam it ran as bad as my own built Linux Engine, so I guess there is something more to it. I don't have much installed on this Ubuntu computer since I mostly use it only for developing my game in Adventure Game Studio (with Wine).

Linux port has only software renderer available at the moment, which runs slow, especially if game scales to larger display resolution. That would be my first guess. On Wine you have Direct3D and OpenGL (if you are using AGS 3.4.1).

The solution would be to make OpenGL renderer work on Linux, which may be trivial, except someone needs to make such change (this also requires a knowledge of what headers/libraries to add to the engine).

Re: AGS engine Linux port
« Reply #631 on: 25 Sep 2017, 20:24 »
I have similar problem. In fullscreen games are running very slow with AGS engine 3.3 or 3.4.0 or 3.4.1 on my laptop. It is absolutely unplayable because it takes few minutes to even get over the first logo in the game. The screens are showing (drawing) slowly from top to down.

Games run fine in windowed mode or when I run them fullscreen with officially packed ags from GOG or when I run them on my desktop PC (different hardware). My graphic card in laptop is nvidia 840m = Nvidia Optimus card. It is interesting that using Wayland games runs also fine in fullscreen but keyboard doesn't work in game.
« Last Edit: 25 Sep 2017, 20:39 by sigmich »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Linux port
« Reply #632 on: 25 Sep 2017, 20:37 »
Games run fine in windowed mode or when I run them fullscreen with officially packed ags from GOG

Could you elaborate, what "officially packed ags from GOG" is?

Re: AGS engine Linux port
« Reply #633 on: 25 Sep 2017, 21:16 »
Games run fine in windowed mode or when I run them fullscreen with officially packed ags from GOG

Could you elaborate, what "officially packed ags from GOG" is?

GOG.com sells Wadjet Eye games. I've bought all of them. Some of them have official linux versions which install game. I suppose there is bundled ags in every game installation. For example if I run A Golden Wake it runs fine fullscreen:

./A_Golden_Wake.bin.x86_64
AGS: Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-20xx others
ACI version 3.3.0.1132

AGS: ***** ENGINE STARTUP
AGS: Reading config file
AGS: Initializing allegro
AGS: Setting up window
AGS: Initializing game data
AGS: Initializing TTF renderer
AGS: Initializing mouse
AGS: Checking memory
AGS: Initializing speech vox
Speech sample file found and initialized.
AGS: Initializing audio vox
Audio vox found and initialized.
AGS: Initializing keyboard
AGS: Install timer
Checking sound inits.
AGS: Initialize sound drivers
AGS: Install exit handler
AGS: Initialize path finder library
AGS: Initialize gfx
AGS: Load game data
AGS: A Golden Wake
AGS: Checking for disk space
AGS: Initializing MOD/XM player
AGS: Initializing screen settings
AGS: Init gfx filters
AGS: Init gfx driver
AGS: Switching to graphics mode
AGS: Widescreen side borders: disabled in Setup
AGS: Attempt to switch gfx mode to 320 x 200 (32-bit)
AGS: Succeeded. Using gfx mode 320 x 200 (32-bit)
AGS: Preparing graphics mode screen
AGS: Initializing colour conversion
AGS: Check for preload image
AGS: Initialize sprites
AGS: Set up screen
AGS: Initialize game settings
AGS: Prepare to start game
AGS: Checking replay status
AGS: Engine initialization complete
AGS: Starting game
AGS: Loading room 83
AGS: Room change requested to room 82
AGS: Unloading room 83
AGS: Loading room 82
AGS: Room change requested to room 0
AGS: Unloading room 82
AGS: Loading room 0
AGS: ***** ENGINE HAS SHUTDOWN

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Linux port
« Reply #634 on: 25 Sep 2017, 21:18 »
So, you are saying that these packed by GoG run fine for you, but when you build engine yourself it runs slow? I was wondering what could be the difference.
Unfortunately, I am not an expert in Linux, but maybe someone could do an investigation.
« Last Edit: 25 Sep 2017, 21:20 by Crimson Wizard »

Re: AGS engine Linux port
« Reply #635 on: 25 Sep 2017, 21:24 »
So, you are saying that these packed by GoG run fine for you, but when you build engine yourself it runs slow? I was wondering what could be the difference.

Yes, exactly. And when I build the same version of engine myself on the same system (Debian Stretch 64bit) but on different hardware (nvidia gtx 1050 vs nvidia optimus 840m) it also runs fine fullscreen.

Re: AGS engine Linux port
« Reply #636 on: 26 Sep 2017, 02:45 »
Hey, which processor? I have similar performance issues on Until I Have Vou using KabyLake, but it works on my Sandy Bridge and Ivy Bridge laptops. Everything with Ubuntu 16.04 .

Re: AGS engine Linux port
« Reply #637 on: 26 Sep 2017, 20:42 »
Hey, which processor? I have similar performance issues on Until I Have Vou using KabyLake, but it works on my Sandy Bridge and Ivy Bridge laptops. Everything with Ubuntu 16.04 .

I haven't Kabylake CPU.

There is:
in Laptop PC - i5-5200U (Broadwell)
in Desktop PC - Q6600 (Kentsfield)

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
  • Dave Gilbert worked on a game that was nominated for an AGS Award!Dave Gilbert worked on a game that won an AGS Award!
Re: AGS engine Linux port
« Reply #638 on: 27 Sep 2017, 20:32 »
I know GOG wraps the games in WINE, which isn't something I really know much about. Which is why it's available exclusively on GOG.

Re: AGS engine Linux port
« Reply #639 on: 30 Sep 2017, 20:38 »
I know GOG wraps the games in WINE, which isn't something I really know much about. Which is why it's available exclusively on GOG.

Are you sure about it? It doesn't seem to me to be Wine wrapped. Same games with linux support are also available on Steam.

I was using Wine playing Technobabylon before I've found that it runs great using ags engine natively for linux. I experienced some issues using wine but it was playable. Using native ags engine for linux was perfect as well as installed packages from GOG. So I presume GOG is running native linux ags. I also don't see any running wine process in htop or another process manager playing GOG installment.

I suppose that issue I have now is hardware related using hybrid nvidia card on debian with bumblebee. Maybe I'm wrong. But on my another desktop PC native linux ags runs any ags game without any problem.

Anyway thanks for the great games! ;-)