How Wadjet Eye updated AGS to release commercial games on iOS

Started by JanetC, Thu 28/05/2015 16:56:18

Previous topic - Next topic

Monsieur OUXX

Quote from: JanetC on Wed 11/05/2016 20:40:34
I use a plugin to allow me to fake a keypress when a GUI button is pressed.
I don't understand why that would be required.
 

JanetC

Quote from: Monsieur OUXX on Thu 12/05/2016 14:55:07
Quote from: JanetC on Wed 11/05/2016 20:40:34
I use a plugin to allow me to fake a keypress when a GUI button is pressed.
I don't understand why that would be required.

It's required for our games, maybe not for your games. Wadjet Eye games have a lot of puzzles where you need to type something into an in-game computer. Such as the scene in the Shivah where you must log into Rabbi Stone's computer to search for certain terms. So we need a keyboard system.

Snarky

I think M. Ouxx was wondering why you couldn't fake the keypress internally, rather than rely on a plugin. It's essentially just a question of appending a character to a string when a button in pressed, and that seems like it should be pretty straightforward.

JanetC

Quote from: Snarky on Tue 17/05/2016 20:30:24
I think M. Ouxx was wondering why you couldn't fake the keypress internally, rather than rely on a plugin. It's essentially just a question of appending a character to a string when a button in pressed, and that seems like it should be pretty straightforward.

By "internally" do you mean "in script" or "in the engine"?

I used the plugin to allow you to activate the keypress from within the script. So when you tap on a GUI element, it calls the FakeKeyPress() function to fake a keypress, and this allows me to simulate a keypress without significant recoding of existing games.

Snarky

Quote from: JanetC on Fri 03/06/2016 17:48:53
By "internally" do you mean "in script" or "in the engine"?

Both, I guess? I seem to remember that there's a built-in function for just this in the latest betas, but meanwhile it should be doable in AGS script:

The two possible results I can think of for a keypress is that either a textbox is edited, or the on_key_press() function is triggered. Am I overlooking anything else?

It shouldn't be difficult to trigger these same effects in a script (though if you have room-specific on_key_press() functions, that might require some slight refactoring of the code). It's a little fiddly to determine whether any textbox is active and absorbing keypresses, but using the guis[] and GUI.Controls[] arrays along with GUI.Visible, GUIControl.AsTextBox, GUIControl.Visible and GUIControl.Enabled it's possible to do so.

Quotethis allows me to simulate a keypress without significant recoding of existing games.

I assume this is really the answer. Still, I'm pretty sure it would be possible to make an AGS script module that would do essentially the same as your plugin while requiring minimal changes to existing code, if that should ever become useful.

JanetC

It would be useful to be able to do it in script only, if just to simplify things. But I couldn't find any functions that send a keypress to the engine.

milkanannan


bx83

This is probably a stupid question - but which URL directs me to the latest copy of the iOS libraries?
https://github.com/JanetGilbert/ags/tree/main/iOS/buildlibs
https://github.com/adventuregamestudio/ags/tree/master/iOS

Would seem to the second one, but it's hard to know which one is more modern.

Which one works for an iPhone 7/8?
Which one *doesn't* require a jailbroken phone?

Crimson Wizard

Quote from: bx83 on Sun 12/11/2017 09:58:32
This is probably a stupid question - but which URL directs me to the latest copy of the iOS libraries?
https://github.com/JanetGilbert/ags/tree/main/iOS/buildlibs
https://github.com/adventuregamestudio/ags/tree/master/iOS

Would seem to the second one, but it's hard to know which one is more modern.

Regarding official repository, do not use master's top, because it contains in-development state. Look for stable release tags, such as 3.4.0.16 and release-3.4.0 branch (latest stable release).
I cannot answer other questions though.

bx83


JanetC

Quote from: bx83 on Sun 12/11/2017 09:58:32
This is probably a stupid question - but which URL directs me to the latest copy of the iOS libraries?
https://github.com/JanetGilbert/ags/tree/main/iOS/buildlibs
https://github.com/adventuregamestudio/ags/tree/master/iOS

Would seem to the second one, but it's hard to know which one is more modern.

Which one works for an iPhone 7/8?
Which one *doesn't* require a jailbroken phone?

My most recent version of the code is the following branch:

https://github.com/JanetGilbert/ags/tree/ios-technobabylon

Used for releasing our most recent iOS game, Technobabylon. I recommend using this if you want to release a game.

I don't know what state
https://github.com/adventuregamestudio/ags/tree/master/iOS
currently is in, whether it can be compiled for App store or not.

rmonic79

Hi Janet and thanks for your help, I took a Mac  two days ago so I'm really a noob to Xcode. I'm trying to fill your code with my executable that I renamed ac2game.dat and put all compiled  in technobabilon/game folder, the vox and speech error is solved but it continues to tell me that he cannot find any ac2game.dat, its strange, any hint?

Crimson Wizard

Quote from: rmonic79 on Sat 28/07/2018 16:16:24
Hi Janet and thanks for your help, I took a Mac  two days ago so I'm really a noob to Xcode. I'm trying to fill your code with my executable that I renamed ac2game.dat and put all compiled  in technobabilon/game folder, the vox and speech error is solved but it continues to tell me that he cannot find any ac2game.dat, its strange, any hint?

What version of AGS was your game created with? Janet's ios branch seem to refer to 3.4.0.

Also, unless this is something specific to iOS port (which I am not aware of), you do not have to rename game file to ac2game.dat, this is very old instruction from the times of 3.3.0. In theory it should work with gamename.exe and gamename.ags files too.

rmonic79

now i'm on 3.4.0 and the ide returns an error about ac2game.dat not found.

eri0o

github.com/sonneveld/agscommunity/blob/sdl2-port/

can you try the above repository and branch? It's still WIP but I found it easier to use. Requires game to be on 3.4.1.13

Edit: oops, now I read iOS instead of macOS. Don't know if the above works on iOS, never tried.

rmonic79

this is a screenshot made today with xcode 8.3, the same with 9, ac2game.dat is in folder,



i don't pretend the game to run, but why this error? :)

EDIT:

At least the simulator starts now, for whom have the same problem, i don't understand why , deleting under build phase in project settings "bundle resources" let the simulator starts and the game crash :)

rmonic79

I'm on xcode 9 now and new errors come  "use of undeclared identifier assert" and "invalid use of non-static data member assert string.h"

Crimson Wizard

Quote from: rmonic79 on Thu 09/08/2018 19:16:28
I'm on xcode 9 now and new errors come  "use of undeclared identifier assert" and "invalid use of non-static data member assert string.h"

These are compilation errors? "assert" is a method, how come it's not declared...
Can you tell which source code you are using again?

rmonic79

i'm trying this this one from janet branch https://github.com/JanetGilbert/ags/tree/ios-technobabylon
but in xcode 8.3 there's no error only in 9, i think that many things changed, i'm taking alook to all file script

rmonic79

It works!!! But my game was made with P3 how can I procede? suggestion pls :grin:


SMF spam blocked by CleanTalk