[OLD-1] AGS engine Linux port

Started by BigMc, Sun 03/06/2012 19:04:20

Previous topic - Next topic

Crimson Wizard

#160
Quote from: Sslaxx on Tue 29/01/2013 23:32:48
What was the issue?
A silly typo rather than actual mistake. Wrong function was called by script command.
There was a huge rewrite of script functions in december/january related to making 64-bit builds work safer, which was mainly a tedious routine, and I made few mistakes in the process.

BigMc

Ok, I created a script to create a bundle of ags, libraries and all the licenses. The script can be found in the repository at debian/ags+libraries.sh. The resulting bundle is this:

http://people.debian.org/~thansen/ags+libraries_20130130.tar.xz

As Crimson Wizard said, you should probably wait for that one bug to be fixed before releasing a game with this. But please test it! I only tested on Debian.

scottchiefbaker

That is exactly what I want! Both 32 and 64bit versions, and a launcher that picks for you! I did run in to some issues on my Fedora 17 machine:

#1) The binary doesn't seem to find my GeminiRue.ags file, and neither does the launcher. If I run data/ags64 GeminiRue.ags it launches just fine. Did the game detection code change?
#2) I get no sound. Not sure why. The ags I compiled on this machine works fine. I'm assuming it has something to do with the libraries?
#3) Does this include the save game fix Crimson Wizard mentioned?

BigMc

#163
1) and 2): For sound the launcher must be used, because otherwise ALLEGRO_MODULES is not set. I didn't have time yet to make sure that path names are handled correctly in odd cases. Did you maybe put this into a path containing spaces or other unusual characters?

3) No, it's the master branch.

EDIT: Oh, I see, you didn't read the README. You must put the game into "data".

scottchiefbaker

Aha! Well if I RTFM then everything works fine!

It works great with my Shivah demo. Let me throw something else at it. Thanks for putting this all together.

scottchiefbaker

I just setup a github account and sent a "pull request" (I think). To add the strip option to the Makefile. Can someone tell me if I did it correctly?

scottchiefbaker

Quote from: BigMc on Wed 30/01/2013 01:44:25
EDIT: Oh, I see, you didn't read the README. You must put the game into "data".

After RTFM I packaged up my Shivah demo using your engine and posted it here. Looks like it works pretty well. Want to take it out for a spin on your various distros?

http://www.perturb.org/tmp/shivah-demo-2013-01-30.tar.gz

Problem

The demo works fine for me on Debian Wheezy 64 bit.  :)
Now the only thing that's missing is a linux equivalent to winsetup.exe, so you don't have to find and edit acsetup.cfg to switch between fullscreen and windowed mode. A basic setup tool would be a good idea if you want to distribute a commercial game this way.

scottchiefbaker

Quote from: Problem on Wed 30/01/2013 21:47:06
Now the only thing that's missing is a linux equivalent to winsetup.exe, so you don't have to find and edit acsetup.cfg to switch between fullscreen and windowed mode. A basic setup tool would be a good idea if you want to distribute a commercial game this way.

That's on my list of things to do. I'll probably whip up a quick perl script that writes our your acsetup.cfg for you. I want to use dialog, but most boxes probably don't have that installed. It'd only be 2 questions:

1) Window/Fullscreen
2) GFX Filter

We probably don't NEED one, if we ship sane defaults.

BigMc

There already is one included with the old Linux ports:

http://www.adventuregamestudio.co.uk/forums/index.php?topic=37968.0

(I just checked and the download links work again.)

But it seems the source code is missing. Maybe ask Electroshokker.

scottchiefbaker

Quote from: Problem on Wed 30/01/2013 21:47:06
The demo works fine for me on Debian Wheezy 64 bit.  :)
Now the only thing that's missing is a linux equivalent to winsetup.exe, so you don't have to find and edit acsetup.cfg to switch between fullscreen and windowed mode. A basic setup tool would be a good idea if you want to distribute a commercial game this way.

If you run ./shivah --help it will give you the help output of ags, which includes the -windowed and -fullscreen options. Even if you don't know how to edit the config, the binary gives you the options now. Did we decide to switch to --windowed and --fullscreen to be more Linux-y?

scottchiefbaker

Quote from: BigMc on Mon 28/01/2013 23:20:30
EDIT: But you should better not change that, because it's used to check if a game is compatible with the engine.
You can always change the help text in Engine/main/main.cpp.

I'm no C++ guru but I think I hacked together BUILD_STR as a make option. Can someone with git access see if my pull requests are correct? I haven't used git until yesterday. All the projects I've worked on in the past have been SVN. Git is new to me.

Crimson Wizard

#172
Be VERY careful when changing existing command line options, Editor may use these to run games. If you change in one place, make sure you scan ALL the code and make appropriate changes.

Regarding version string. I do not know what were CJ's rule to change it. Maybe ask tzachs?
So far we were very shy and did not modify it. I think this should be done, eventually. Since the code is now pretty different, with all those ports, compatibility/portability fixes, as well as huge file splitting and refactoring, I suggest changing one of the major numbers (like to 3.3). The last number could be changed after certain number of commits (or any significant change)? Well, at least any public release which has differences in how engine work should have a new minor number IMO.

scottchiefbaker

Quote from: Crimson Wizard on Thu 31/01/2013 07:33:40
Be VERY careful when changing existing command line options, Editor may use these to run games. If you change in one place, make sure you scan ALL the code and make appropriate changes.

My understanding was that they were JUST added last week. The Editor should not rely on these flags for anything.

Crimson Wizard

Quote from: scottchiefbaker on Thu 31/01/2013 16:32:29
Quote from: Crimson Wizard on Thu 31/01/2013 07:33:40
Be VERY careful when changing existing command line options, Editor may use these to run games. If you change in one place, make sure you scan ALL the code and make appropriate changes.

My understanding was that they were JUST added last week. The Editor should not rely on these flags for anything.

-windowed and -fullscreen commands exist since CJ's version of AGS. And - I just checked- they are used by the Editor.

scottchiefbaker

Are we ready to release an official version 0.9 of the Linux engine? BigMc can you create another version of your package that includes the binary and the libs?

scottchiefbaker

Couple quick questions:

#1) What are the default windowed/fullscreen/gfxfilter settings if no acsetup.cfg is found? I'm thinking a sane default is "-fullscreen and StdScale4" i.e. Fullscreen + stretch?
#2) Is there any real case where you want fullscreen but NOT stretch? I hate doing -fullscreen and the game loads and it's 320x200 with black border around the whole game. I'm thinking maybe we want to default to "stretch to fit" if the user selects fullscreen?
#3) Do we need a StdScale5 or maybe even StdScale6? A 1080P display is 1920x1080p. If you scale up a 320x200 game 4x (the current highest) you only get 1280x800. I'm thinking we want a full 1080P option?

Crimson Wizard

#177
Quote from: scottchiefbaker on Fri 01/02/2013 01:45:33
#1) What are the default windowed/fullscreen/gfxfilter settings if no acsetup.cfg is found? I'm thinking a sane default is "-fullscreen and StdScale4" i.e. Fullscreen + stretch?
Factual implementation, it is Fullscreen + Software Filter (No Scale). I doubt x4 scale is sane default, because the game may have large resolution. 800x600 with x4 scale will be 3200x2400.

Quote from: scottchiefbaker on Fri 01/02/2013 01:45:33
#3) Do we need a StdScale5 or maybe even StdScale6? A 1080P display is 1920x1080p. If you scale up a 320x200 game 4x (the current highest) you only get 1280x800. I'm thinking we want a full 1080P option?
I am not an expert in this area, but from quick glance in the code I see that there's no such filter objects as "x2" or "x3", instead there's a single Scaling Filter class, which takes "multiplier" as parameter. I think few simple experiments could show if this may be 5, 6, or more.
E: actually, there are Hqx2 and Hqx3 filters.

BigMc

Quote from: scottchiefbaker on Fri 01/02/2013 01:04:29
Are we ready to release an official version 0.9 of the Linux engine?

It is upon Crimson Wizard and JJS to decide when AGS gets a new version number. I don't think it is a good idea to diverge from that for single platforms. I also don't think it will happen while a savegame compatibility breaking change is right ahead.

Quote from: scottchiefbaker on Fri 01/02/2013 01:04:29
BigMc can you create another version of your package that includes the binary and the libs?

Why should I do that right now? There was not a single change to the code since the last one.

Crimson Wizard

Quote from: BigMc on Fri 01/02/2013 09:40:45I also don't think it will happen while a savegame compatibility breaking change is right ahead.
It's in "develop" branch. That branch currently contains only changes to (de)serialization routine. I tested that on number of games and it looks working. If it does not break anything, they could be merged to master right away.
Right now I am working on a simple savegame conversion utility that will help fix savegames for Gemini Rue (again) - that's the only game I know that may be affected by these changes.

SMF spam blocked by CleanTalk