AGS 3.4.0.6 (Alpha) - Builder Patch

Started by Crimson Wizard, Sat 27/09/2014 17:25:18

Previous topic - Next topic

Crimson Wizard

#60
Quote from: abstauber on Thu 13/11/2014 07:12:57
Regarding the multi-platform abilities: I'm using the joystick plugin by Wyz, which isn't opensourced (yet?).
Are there any macros I can use to hide it from the linux build?
Linux version has stubs for this plugin (it registers functions that do nothing).
BTW, that reminds me...
Also, about automatic stubs generator (can't find the link).


Quote from: abstauber on Thu 13/11/2014 07:12:57edit: another minor thing: Since you are working on the compiler.. could you do something against the warnings.log please (Dynamic sprites were never deleted because I had no chance ) ?
Compiler has nothing to do with warnings.log, it is engine that writes it.
Plan was to move all these warning to common log file, written only by request (see explanation to 3.3.0 version).

abstauber

Ah okay, thanks for the info. Is there still a way to detect the current build version? It wouldn't make much sense to show joystick settings which doesn't do anything :)


Crimson Wizard

Quote from: abstauber on Thu 13/11/2014 10:44:48
Ah okay, thanks for the info. Is there still a way to detect the current build version? It wouldn't make much sense to show joystick settings which doesn't do anything :)

Hmm... I think you may use new API function Game.IsPluginLoaded(). It tells if plugin functionality is really present (in either linked or built-in way).
Code: ags

if (Game.IsPluginLoaded("agsjoy"))
{
}
else
{
}


If you do, this will be the first time this method actually becomes useable :)

abstauber

Code: ags

            _
           /(|
          (  :
         __\  \  _____
       (____)  `|
      (____)|   |
       (____).__|
        (___)__.|_____

:D

monkey0506

In the mean time you could check System.OS, though that would break if a real replacement were used in place of the stub.

Gord10

I can't run Linux built games in Ubuntu 14.04 LTS :(

ahmet@ubuntu:/media/ahmet/AHMETKELES/Linux$ ls
data  DemoGame
ahmet@ubuntu:/media/ahmet/AHMETKELES/Linux$ sudo sh DemoGame
DemoGame: 14: DemoGame: /media/ahmet/AHMETKELES/Linux/data/ags32: Permission denied

ahmet@ubuntu:/media/ahmet/AHMETKELES/Linux$ cd data
ahmet@ubuntu:/media/ahmet/AHMETKELES/Linux/data$ ./ags32
bash: ./ags32: Permission denied
ahmet@ubuntu:/media/ahmet/AHMETKELES/Linux/data$ sudo ./ags32
sudo: ./ags32: command not found
ahmet@ubuntu:/media/ahmet/AHMETKELES/Linux/data$ sh ags32
ags32: 1: ags32: Syntax error: "(" unexpected


Trying to run ags32 from the file manager, I get "Ooops! Unable to locate the program" error.

Additionally; I can't compile games for Windows when I'm in Windows 7. "Cannot create hard link! Source file does not exist"


Games are art!
My horror game, Self

monkey0506

I tested the compiled files this outputs on Linux Mint 17 and it ran fine for me. What permissions does it show for the file?

I'm looking into the hard link code as well. :-X

Gord10

Changing Allow executing file as program of ags32 made me advance to the next error:

AGS: Initializing game data
AGS: Game data file could not be found

ERROR: Unable to find game data files

It apparently runs ags32; calling ags32 from terminal gives me the same result for the Linux-compiled game.
Games are art!
My horror game, Self

monkey0506

#68
I made a test build with possible fixes for both the hard linking errors and the Linux engines not running.

https://bitbucket.org/monkey0506/ags/downloads/3.4.0.2-test.rar

Could you please try this out and see if it resolves anything?

I forgot that the "mklink" program requires being run as an administrator. From what I read on Stack Overflow, I think this should raise a UAC prompt to elevate the task if not running as an administrator.

As for the Linux script, I've attempted to set it as executable for everyone instead of just the user group.

With the error that it can't find the game data files, could you confirm that you have "ac2game.dta" in the same directory as "ags32"? If you're having hard linking issues then it's possible it didn't link that file properly, but you could also try copying Compiled/YOURGAMENAME.000 to Compiled/Linux/data/ac2game.dta (shouldn't be necessary once the hard linking issues are sorted out).

Edit: The missing resource files in the Windows file was actually my fault. I failed to recognize that the folder name was included when using a filemask in Utilities.GetDirectoryFileList.

Gord10

I tried it with two different projects (Demo Game and an Empty Game with a background and music). Strangely, it gives different results for them two.

An EmptyGame.exe is produced under Linux/data. No exe files for Demo Game's Linux folders. Running EmptyGame in Linux runs the game (after setting permissions of ags32 and EmptyGame for executing), but no visual is seen. Screen is pitch black. Deleting exe file gives me "Unable to find game data files" error, even though ac2game.dta exists in the folder of ags32. Copy+pasting EmptyGame.000 there didn't change anything. It doesn't run without EmptyGame.exe.

For DemoGame, I couldn't have it run work in anyway. It seems to be in need of an exe, which didn't get produced.


Games are art!
My horror game, Self

monkey0506

#70
That doesn't match what I'm getting at all. I'll test it on a different computer this afternoon.

Edit: It occurred to me that the problem may lie in the fact that I never did anything to ensure that the EXE was deleted when upgrading to 3.4.0.2. This would explain the erroneous EXE, but I'm looking into the other issues.

abstauber

hmm... I just realized, that I'm using joystick.click to start dialog topics, since there is no mouse.click. So Linux has to wait, until I've learned C++ and add that function to the engine :)

Crimson Wizard

Quote from: abstauber on Tue 18/11/2014 08:42:46
hmm... I just realized, that I'm using joystick.click to start dialog topics, since there is no mouse.click. So Linux has to wait, until I've learned C++ and add that function to the engine :)
Alright, I'll add it. :)


Crimson Wizard

Actually, you need a variant of ProcessClick, that works on GUI, right?
Fully simulating mouse click might be not that easy in AGS, because of how scripts work.

abstauber

In the first place I just need a way to start dialog topic by keyboard.
Here's an example - I'm recreating an oldschool JRPG talk gui, which is controlled by the keyboard:


To move the marker and to select the topic I'm doing something like this:
Code: ags
  
  if (isUpKeyDown && !IsKeyPressed(controls.Up) {
    keyboard_cnt--;
    if (keyboard_cnt <0) keyboard_cnt = kbd_last_option;
    CDG.active_opt_id = kbd_options[keyboard_cnt].id;
    Mouse.SetPosition(0, mouse.y);
    Joystick.Click(eMouseLeft);
}

Since the dialog topic surface isn't refreshable, I'm moving the hidden mouse out of the way and abuse the joystick plugin to refresh it.

To start the topic I'm placing the hidden cursor on the topic and click again with the joystick.
Code: ags
  
  if (IsSelectKeyDown && !IsKeyPressed(interact_key)) {
    if (CDG.active_opt_id >0) {
      Mouse.SetPosition(kbd_options[keyboard_cnt].xpos, kbd_options[keyboard_cnt].ypos);
      Joystick.Click(eMouseLeft);
    }
  }


So the easy way out would be Mouse.click, although the better approach might be the suggestion I've added to the tracker a few month ago.

Crimson Wizard

Oh. A big script update is due then...

I found how plugins simulate clicks. Looks like script can use same technique too.

abstauber

It would be gorgeous, if that would work.
Dialog scripting hasn't seen much love after custom dialog rendering was introduced ;)

Blackthorne

As far as dialogue scripting goes, it'd be nice to tie "DisplayTopBar" to characters.  Often with NPCs without a portrait in Sierra Style Games, I use this.


Bt
-----------------------------------
"Enjoy Every Sandwich" - Warren Zevon

http://www.infamous-quests.com

Crimson Wizard

#79
Quote from: Blackthorne on Tue 18/11/2014 14:22:55
As far as dialogue scripting goes, it'd be nice to tie "DisplayTopBar" to characters.  Often with NPCs without a portrait in Sierra Style Games, I use this.
This may be related to custom speech style and/or individual speech style idea.
Can you make an issue in tracker?

SMF spam blocked by CleanTalk