upgrading templates to AGS 4

Started by Monsieur OUXX, Sun 07/07/2024 18:50:14

Previous topic - Next topic

Monsieur OUXX

Hello,

I haven't visited the forums in a million years and I have a lot of catching up to do.
I've been looking at AGS 4 (which is amazing btw, it resolves 99.9% of my grudges with the AGS scripting language -- remove the "export" keyword and headerfiles, and we'll be at 101% :-D ).
- I've downloaded the early version and I saw that all the standard templates are here (BASS, Sierra, etc.).
- I've also read that AGS 4 breaks compatibility with AGS 3.x.

Which brings me to my question : Have the scripts of the templates been updated?

For example in the Sierra template I see the KeyboardMovement 1.04 module. Is that module written in AGS 4 fashion or is it still AGS 2.x or 3.x script that just happens to work in AGS 4?
(Note: I've been trying to search the forums myself but the search feature is extraordinarily slow today... I had only one search out of 7 attempts coming to completion. Therefore I'm blind)

I'm asking because I remember that some 3.x template scripts had to do some backflips to work around the limitations of "struct", keeping track of indices -- instead of just putting structs inside structs (was it Tumbleweed? Can't remember. I think tween does that too).

So anyways no that it is the summer holiday I could put a bit of effort into dusting off the most important scripts. If you have suggestions feel free to let me know.
 

Monsieur OUXX

By the way I strongly suggest to introduce a way of clearly marking anything that's AGS 4 compatible. Maybe there should be a forum rule enforced by moderators in the the Modules subforum: write the AGS version in the title of the thread or something.
 

Crimson Wizard

Quote from: Monsieur OUXX on Sun 07/07/2024 18:50:14Which brings me to my question : Have the scripts of the templates been updated?

No, the templates were not updated, but they should be. Nobody bothered yet. I think it's a matter of fixing few deprecated things in script. They also must be ensured to work with the new compiler (it's called "Use extended compiler" in General Settings), and new compiler must also be set as default in all the templates.

If you like, you may do this yourself and make a PR. I think we just need to make a "ags4" branch in the template sources and compiled templates repository.

Quote from: Monsieur OUXX on Sun 07/07/2024 18:50:14I'm asking because I remember that some 3.x template scripts had to do some backflips to work around the limitations of "struct", keeping track of indices -- instead of just putting structs inside structs (was it Tumbleweed? Can't remember. I think tween does that too).

So, at minimal the templates must compile, that has to be step one. But of course they may be updated further to take advantage of the new script syntax.

eri0o

To check if the templates compile I can roll some CI there like the one in the auto test repository

Monsieur OUXX

#4
I'm wondering what the best way would be to push my work into git.
The repo for the templates only contains .agt files. Which means two things :
1) I need to create the .agt from my updated template game for each commit
2) the reviewers will have to look into the .agt, which is not super convenient for the diff and all that.

Any idea? @eri0o since you're on fire you should create a pipeline that turns a game into a .agt and we should store the templates as game projects ;) (just kidding)

EDIT: What I could do is, inside the Templates folder, create a subfolder for each game -- freshly created from the 3.x template. Then, do my edits (and therefore commits too) in those subfolders.
For example I could create a "BASS template" subfolder, containing a game freshly created from the BASS 3.x template. Then, do my edits and commits there (those can then be easily read by the reviewers). Then, the final or close-to-final commit would be for the creation of the .agt file.
 

Crimson Wizard

#5
Quote from: Monsieur OUXX on Mon 15/07/2024 19:48:28I'm wondering what the best way would be to push my work into git.
The repo for the templates only contains .agt files. Which means two things :

You are looking at the wrong repo.

Here are template sources:
https://github.com/adventuregamestudio/ags-template-source

Quote from: Monsieur OUXX on Mon 15/07/2024 19:48:28Any idea? @eri0o since you're on fire you should create a pipeline that turns a game into a .agt and we should store the templates as game projects ;) (just kidding)

This is actually a scheduled task:
https://github.com/adventuregamestudio/ags-template-source/issues/27

But for now we update *.agt files by hand, when preparing a new release and there were changes made to sources.

Monsieur OUXX

 

Monsieur OUXX

#7
Pull request for the BASS template : https://github.com/adventuregamestudio/ags-template-source/pull/61
(apologies for the deleted pull requests before this one, I'm rusty on my forking)

Pull request for the Sierra template : https://github.com/adventuregamestudio/ags-template-source/pull/60
Pull request for the Verbcoin template : https://github.com/adventuregamestudio/ags-template-source/pull/63
Thumbleweed update : waiting for abstauber to create an ags 4 branch in his repo
 

Monsieur OUXX

About Tumbleweed : It is a submodule pointing to Abstauber ( on Github: dkrey ) 's repo.
Unfortunately it has no ags4 branch and I cannot create that branch in his repo, only in my fork of his.
I'll send him a PM hoping that he reads his messages.
 

SMF spam blocked by CleanTalk