Linux Port and Lua Plugin

Started by Calin Leafshade, Sat 18/05/2013 05:17:18

Previous topic - Next topic

Calin Leafshade

The Lua Plugin doesnt seem to work with the linux version. I've compiled it from the git and I get the following:

â”Å'â”â,¬[steve][archlaptop][~/evilhouse/Compiled]
â””â”â,¬Ã¢â€â,¬Ã¢â€¢Â¼ ags evilhouse.exe 
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: Game data file: /home/steve/evilhouse/Compiled/evilhouse.exe

AGS: Initializing TTF renderer
AGS: Initializing mouse
AGS: Checking memory
ci_find_file: cannot change to directory: Compiled
ci_find_file: cannot change to directory: Compiled
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: Built library path: ./libagslua.so
AGS: dlopen returned: ./libagslua.so: cannot open shared object file: No such file or directory
AGS: Built library path: /home/steve/evilhouse/Compiled/libagslua.so
AGS: dlopen returned: /home/steve/evilhouse/Compiled/libagslua.so: cannot open shared object file: No such file or directory
AGS: Plugin loading failed, trying built-in plugins...
AGS: No built-in plugin found. Plugin loading failed!
AGS: No placeholder functions for the plugin found. The game might fail to load.
An internal error has occurred. Please note down the following information.
If the problem persists, post the details on the AGS Technical Forum.
(ACI version 3.3.0.1132)

Error: load room: unable to deserialize prop schema
AGS: ***** ENGINE HAS SHUTDOWN


I am using a x64 version of Arch Linux.

JJS

Well, there are several problems.

1. The error messages indicate that the engine cannot find the plugin at all. The libagslua.so library must be either in the games directory or in the same directory as the ags binary.

2. There was a problem with the library exports not being externally visible, it should be fixed with the latest commit that I just pushed.

3. Now the big one: The plugin might work on 64 bit systems in theory. But because the scripts are compiled to lua bytecode, which is platform dependant, the game will not load. You will get some error message from the plugin that indicates a corrupted script file. The byte code is compatible across all 32 bit little endian systems though (e.g. it works on and ARM Android device).
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Crimson Wizard

Like JJS said, and this -
Error: load room: unable to deserialize prop schema

This is because the missing plugins did not read their data (obviously), and following deserialization screwed up.

BTW, this also gives me a hint that the plugin deserialization should be tested somehow and proper message displayed, this one does not reveal actual problem.

Calin Leafshade

Ok well it seems that the Arch Linux AUR package i was using doesn't clone the repo recursively and so the Lua plugin wasn't even in the source tree.

I rectified this and it wont compile due to some missing libraries which I don't quite understand.

However, the larger issue is that it wont work on 64bit systems. Is this fixable? I mean presumably the plugin could save the source and compile it at runtime?

JJS

I don't know anything about the ARCH package system, so the makefile is probably not correct when setting include paths. Dependencies should be libz and liblua-5.1, but I only tried compiling on Debian-style systems.

The scripts could probably be compiled at runtime, but from what I've read the library for serialization of the data (for savegames) just dumps out the raw state of the lua interpreter. So I suppose that savegames will not be cross-platform compatible. But I don't really have a big insight into it.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

SMF spam blocked by CleanTalk