Author Topic: Built-in plugins/stubs?  (Read 5361 times)

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Built-in plugins/stubs?
« Reply #20 on: 28 Sep 2014, 20:26 »
Right, sorry. The full plugin can still be run without Steam (although doing nothing) on compatible OSes (Windows and some versions of Linux), but if you're specifically publishing a non-Steam version it's still recommended that you use the stub instead of the full plugin. This allows the end-user to rebuild the stub for their system if the prebuilt stub (the one you would include in your distribution) does not run (e.g., versions of Linux using different core libraries, other unsupported OSes).

Radiant

  • Mittens Knight
  • AGS Baker
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    • I can help with story design
    • Radiant worked on one or more games that won an AGS Award!
    •  
    • Radiant worked on one or more games that was nominated for an AGS Award!
Re: Built-in plugins/stubs?
« Reply #21 on: 28 Sep 2014, 21:39 »
Yes, but then you're assuming that players have sufficient programming skill to be able to recompile a stub from source code; I'm not sure if I'd be willing to make that assumption.

Re: Built-in plugins/stubs?
« Reply #22 on: 28 Sep 2014, 22:04 »
Yes, but then you're assuming that players have sufficient programming skill to be able to recompile a stub from source code; I'm not sure if I'd be willing to make that assumption.
If players don't have programming skill to build and install a program from source, they probably do not use non-standard Linux.

Besides, unlike Windows, on most Linux distributives you should only run 2-3 commands from console. I believe that an installation script and/or basic readme will be sufficient.
« Last Edit: 28 Sep 2014, 22:09 by Crimson Wizard »

Re: Built-in plugins/stubs?
« Reply #23 on: 19 Dec 2014, 12:18 »
I made it work:
https://github.com/ivan-mogilko/ags-refactoring/tree/improve-scapimap

Explanation:
Spoiler: ShowHide

Quote
The stub loading routine parses the symbol definition *.stub file and registers API stubs if no plugin library was found. This allows to substitute any missing plugin with dummy symbols.

Stub file format defines the text file consisting of any number of lines. Every line declares a stub function and its return value; the return value may be either numeric value or 'nil' that defines either null-pointer or 'void', depending on how the function is used by script interpreter.
If no value is provided, 'nil' is used by default.

    function_name [numeric_literal | nil]

Numeric value is first tested as integer, then as float, therefore to force floating-point type of value one should always include the decimal separator, e.g. write "1." or "1.0" instead of just "1".


Working example:
Spoiler: ShowHide

Code: Text
  1. JoystickName nil
  2. JoystickCount 0
  3. Joystick::Open^1 nil
  4. Joystick::Close^0 nil
  5. Joystick::Valid^0 0
  6. Joystick::IsButtonDown^1 0
  7. Joystick::Click^1 nil
  8.  


Can anyone suggest a game/plugin for a test?

Re: Built-in plugins/stubs?
« Reply #24 on: 28 Jan 2015, 00:00 »
Cool! One of the games that one could test with is Barn Runner 5, chapter 1. It uses Kweepa's AGS_OtherRoom.dll and Scorpiorus' ags_parallax.dll both of which are not ported as far as I know.

Re: Built-in plugins/stubs?
« Reply #25 on: 17 Feb 2015, 15:24 »
Cool! One of the games that one could test with is Barn Runner 5, chapter 1. It uses Kweepa's AGS_OtherRoom.dll and Scorpiorus' ags_parallax.dll both of which are not ported as far as I know.
Sorry, I forgot to answer.

While it is technically possible, I do not think that it is a right thing to stub OtherRoom and parallax plugins, because this will disable their functionality. The game will load up, but gameplay may be completely broken.

The plugin stubs are meant for plugins that add optional effects, like rain/snow, Steam achievements, joystick controls, etc.