AGS 4.0 - Alpha 14 for public test

Started by Crimson Wizard, Thu 01/06/2023 14:00:59

Previous topic - Next topic

Crimson Wizard

Quote from: Baguettator on Sun 24/03/2024 21:27:40The scripts seem to be .crm files, but they are at the root of the game's folder (with othr scripts)

No, .crm files are compiled rooms. Room scripts must be called roomN.asc and located inside "Rooms".
From your post it seems like they are not there.

Do you have a previous version of the game backed up? Does it have roomN.asc files? If so, could you try upgrading once more from backup copy, and see if room scripts appear properly in ags4 version?

eri0o

In the Rooms directory, if I remember correctly, there is a directory with a number for each room and in each directory a XML for the room description, a script Room1.asc (or whatever is the room number)  a few PNG files for the masks and background.

The crm files in the project root are just the "built" binary rooms, and in ags4 you don't need to version them anymore because it should be possible to recover them from the source files in Rooms directory.

Edit: CW was faster. :)

Baguettator

Ahah, thanks a lot for your answers (and congrats to CW the man who answers faster than his shadow !)

I don't see any .asc file in the room folder, but there were .asc files for each of my rooms in the 3.6 version of my game. I could try to re-upgrade my game from a backup version, but it's exactly what I did before, so it should be the same result...

Perhaps I could try to copy/paste manually the .asc files from my back up directly into rooms folder in the upgraded version ?

I will try to reupgrade too and tell you if it worked (it's an other pc where I can't go often, but perhaps in the evening today)

Crimson Wizard

Quote from: Baguettator on Mon 25/03/2024 04:25:06Perhaps I could try to copy/paste manually the .asc files from my back up directly into rooms folder in the upgraded version ?

Yes, you could do that too.

Baguettator

Copy/paste the .asc files from the back up seems to work. but upgrading deletes the asc files... Could it be fixed ?

Crimson Wizard

Quote from: Baguettator on Mon 25/03/2024 08:42:08Copy/paste the .asc files from the back up seems to work. but upgrading deletes the asc files... Could it be fixed ?

I never experienced such problem when testing upgrading a project.
Which exact version of AGS 4 are you using? (this may be seen in Help->About)
Does this happen to any project you upgrade or only to a particular one?

room.asc is the only file that is moved to Rooms. *.crm files are not moved, and the rest is created anew. In theory this might mean that file copying or moving is not working for some reason. It may be worth investigating if this process is safe, in terms of checking wether copy operation is successful before removing old files.

Do you have any antivirus, or programs like Windows Defender active on your computer? If so, would it improve the situation if you disable them, or tell them to ignore your project folder before upgrading?

Alan v.Drake

#66
When I asked when it crashed, I meant the Editor, because it's possible something went wrong during upgrade and the upgraded project was never saved (you have to save manually in any case). If the project is recognized as "not upgraded" the Editor will retry again to upgrade from the CRM files, but this time there wont be the scripts, and this is how these problems arise.

We should probably force a save after an upgrade, or ask for confirmation before proceeding.

- Alan

Crimson Wizard

Quote from: Alan v.Drake on Mon 25/03/2024 11:00:06If the project is recognized as "not upgraded" the Editor will retry again to upgrade from the CRM files, but this time there wont be the scripts, and this is how these problems arise.

We should probably force a save after an upgrade, or ask for confirmation before proceeding.

I wrote a ticket about this problem in the past:
https://github.com/adventuregamestudio/ags/issues/1596

Not sure if it's the same case though, as this problem occurs only if you close the Editor without saving nor building (or running) the game after upgrade.

Baguettator

That's exactly what I did : I openned my game with AGS4.0, it converted the rooms, but I didn't save the project with AGS 4.0 the first time. So the .asc files were deleted at the second launch of AGS4.0 as Alan v.Drake just said. Sorry, it was my fault  :-[

I will try to upgrade fully my game soon, and will tell you if I encounter any bug !

Thanks a lot for helping !

Baguettator

Hey again, sorry for asking again, but will AGS 4.0 be able to manage PNG files in Dynamic Sprites ? It would be so great especially for transparent backgrounds...

Crimson Wizard

#70
Quote from: Baguettator on Thu 28/03/2024 11:58:47Hey again, sorry for asking again, but will AGS 4.0 be able to manage PNG files in Dynamic Sprites ? It would be so great especially for transparent backgrounds...

If you are referring to DynamicSprite.CreateFromFile, then I suppose it's possible to extend the supported formats, if we add a proper image-loading library to the engine (this was discussed some time ago).

But which "transparent backgrounds" are you speaking of, and why do you need dynamic sprites for these?

Baguettator

Well, using PNG files will be always easier, this way you don't need to save a BMP file in a "magic pink" background to "emulate" a transparent background. It would be a quality-of-life improvement I presume ?

EDIT : also, I'm always working with PNG files, never with BMP files. But perhaps I'm a lonely bad guy :)

Anyway, the proposal milestone of AGS 4 looks great ! Have you got any release date for a fully achieved version ?

Crimson Wizard

Quote from: Baguettator on Sun 21/04/2024 14:04:36Well, using PNG files will be always easier, this way you don't need to save a BMP file in a "magic pink" background to "emulate" a transparent background. It would be a quality-of-life improvement I presume ?

EDIT : also, I'm always working with PNG files, never with BMP files. But perhaps I'm a lonely bad guy :)

Everyone seems to be working with PNGs today, and AGS allows to import PNGs into your game.
It's just that creating dynamic sprites from image files is not a very common thing, so extending image format support for this function was never addressed.

Baguettator

Well at least for me, creating Dynamic Sprites using PNG files could be very useful :)

Crimson Wizard

It's been a while since AGS 4 alpha had an update, in the meantime there have been a 3.6.1 release with 2 patches.

I've been thinking to release a AGS 4 update right now, but there's one issue after recent changes that has to be fixed before giving this version to public use. Hopefully this may be done on this week.

Baguettator

And what's about PNG files able to be used in DynamicSprite.CreateFromExistingFile ? Will it be available for AGS 3.6.X ? Or only AGS 4 ? Or none of them ?

Congrats for all the work on AGS program :)

Crimson Wizard

Quote from: Baguettator on Thu 02/05/2024 07:28:15And what's about PNG files able to be used in DynamicSprite.CreateFromExistingFile ? Will it be available for AGS 3.6.X ? Or only AGS 4 ? Or none of them ?

I cannot tell at this moment. I was not addressing this task yet.


Crimson Wizard

#78
Updated to Alpha 10
(Please use download links in the first post)

This update does not contain any major additions, was made primarily to sync fixes with the latest 3.6.1 release.
Contains updates and fixes from 3.6.1 up to Patch 2 (except ones related to backwards compatibility).

Other changes:

Editor:
- More panes in the Editor are DPI-aware (rescale well with the system font scaling).
- Editor tabs now display icons indicating their contents (may be disabled in Editor Preferences).
- Room panel tabs now display room names.
- Support reordering folders in Project Explorer with drag & drop.
- Support importing plain script files: ash, asc or both, - besides script modules (*.scm).
- Added "Controls transparency" slider to GUI edit pane.
- Fixed few problems occuring when importing old rooms into the new editor.
- Fixed some of the new files could be left after old room upgrade in case of a failure.
- Fixed import, palette remap and compilation of 8-bit room backgrounds in 8-bit games.
- Fixed double warning message when trying to close the Editor while a game test is running.

Script API:
- Added Character.MoveStraight() complementing WalkStraight().
- Added String.Join(), String.Split() and String.Trim() functions.
- Added System.GetEngineInteger() and System.GetEngineString() for returning diagnostic information about engine's runtime state. Possible arguments are defined by EngineValueID enum.

Engine:
- Overlay.X and Y properties of textual screen overlays, such as blocking speech, now treat assigned values correctly as screen coordinates and return values set by user consistently. They also return the assigned values without any offsets for textual overlays created using a TextWindow (having extra borders and padding).
- Added "--no-plugins" command-line argument that denies loading any plugins; also added respective config option.
- Fixed taking screenshots not working properly (regression in AGS 4.0).



The two new functions System.GetEngineInteger(EngineValueID value, int index = 0) and System.GetEngineString(EngineValueID value, int index = 0) may now be used to get some values that describe engine's state, rather than game's state.
Here's the list of currently supported parameters:

Code: ags
// Engine value constant name pattern:
// ENGINE_VALUE_<I,II,S,SI>_NAME, where
//   I - integer, II - indexed integer, S - string, SI - indexed string.

  ENGINE_VALUE_UNDEFINED = 0,              // formality...
  ENGINE_VALUE_SI_VALUENAME,             // get engine value's own name, by its index
  ENGINE_VALUE_S_ENGINE_NAME,          //
  ENGINE_VALUE_S_ENGINE_VERSION,    // N.N.N.N (with an optional custom tag)
  ENGINE_VALUE_S_ENGINE_VERSION_FULL,    // full, with bitness, endianess and any tag list
  ENGINE_VALUE_S_DISPLAY_MODE_STR, // string contains display mode information ( width x height x color depth, etc)
  ENGINE_VALUE_S_GFXRENDERER,
  ENGINE_VALUE_S_GFXFILTER,
  ENGINE_VALUE_I_SPRCACHE_MAXNORMAL,  // user-defined sprite cache size limit
  ENGINE_VALUE_I_SPRCACHE_NORMAL,        // current sprite cache size
  ENGINE_VALUE_I_SPRCACHE_LOCKED,       // size of "locked" sprites (prevented from disposal)
  ENGINE_VALUE_I_SPRCACHE_EXTERNAL,   // size of "external" sprites not automatically disposed (basically - DynamicSprites)
  ENGINE_VALUE_I_TEXCACHE_MAXNORMAL,  // user-defined texture cache size limit
  ENGINE_VALUE_I_TEXCACHE_NORMAL,    // current texture cache size
  ENGINE_VALUE_I_FPS_MAX,     // max allowed FPS (set as GameSpeed, or with --fps command line arg)
  ENGINE_VALUE_I_FPS,    // actual average FPS
  ENGINE_VALUE_LAST                      // in case user wants to iterate them

Example of use:

Code: ags
function repeatedly_execute_always()
{
    int current = System.GetEngineInteger(ENGINE_VALUE_I_SPRCACHE_NORMAL);
    int max = System.GetEngineInteger(ENGINE_VALUE_I_SPRCACHE_MAXNORMAL);
    lblSpriteCacheLoad.Text = String.Format("Sprites: %d / %d KB (%d%%)",
           current, max, current * 100 / max);
}

eri0o

I think the tabs icons depends on it being enabled in the Editor preferences and I think it defaults on not being enabled - not sure on this last part.

SMF spam blocked by CleanTalk