Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Crimson Wizard

#1801
It's worth mentioning, referring to the conversation on Discord, that mouse.Mode turned out to be 0 in this function. This means that the problem is not in cLara_AnyClick, but in how mouse.Mode is set elsewhere.
#1802
There's an option to set Font and size for the script editor, in File -> Preferences -> Advanced tab.

Also, Editor supports "Color Themes", they may be got here:
https://github.com/adventuregamestudio/ags-themes

Darker themes sometimes may be easier to work with.
#1803
Yes, this is looking nice :).

Is frog going to be an animated object?

#1804
Quote from: Baguettator on Fri 24/11/2023 21:37:07Why upgrading to AGS 4 would be not so easy ? My game is large, but uses very "simple" things like Dynamic Sprites, some Draw functions, many custom structs to store datas in memory, and a lot of GUIs. When upgrading, which things need to be reworked?

I cannot tell for certain, every project is different, but there are three things to keep in mind:
1) AGS 4 is still "alpha", it is useable, but not so many people are actively using it compared to 3.* versions, therefore some bugs may be kept unnoticed until now.
2) AGS 4 has a large number of old functions removed. If you were using those, you'll have to rework parts of your game script.
3) If you choose to use the new script compiler, this compiler is stricter than the old one, and does not let certain syntax that it considers incorrect. So you might have to adjust your script again, or live with getting compiler's warnings.

Quote from: Baguettator on Fri 24/11/2023 21:37:07And what are the "in AGS 4 you could do more" things ?

The AGS 4 forum thread notes the new features:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-4-0-early-alpha-for-public-test/
Also, specifically the additions for the script syntax are mentioned here:
https://github.com/adventuregamestudio/ags/wiki/New-compiler%27s-end-user-cheat-sheet
#1805
Quote from: Baguettator on Fri 24/11/2023 19:25:36All of their data is stored in .txt files, but I want to sort maps at a moment and accept those the player can play and those the player can't.

Ah, I'm sorry, I now see why do you need this.

Because in AGS 3 you cannot have Strings in managed structs, and only managed structs in dynamic arrays, the existing solutions are:
1) Have each parameter in a separate dynamic array.
2) Create a dynamic array of Strings, and store all the preloaded data in a single string, for example, separating values with commas or another sign.
3) Use "Dictionary" type, as eri0o suggested.
https://adventuregamestudio.github.io/ags-manual/Dictionary.html
To elaborate a little, with Dictionary you may store data using dynamic "keys" like "mapN.propertyX".
Code: ags
Dictionary *dict = Dictionary.Create();
...
dict.Set(  String.Format("map%d.titlecode", map_num), titlecode );
dict.Set(  String.Format("map%d.titleFR", map_num), titleFR);
dict.Set(  String.Format("map%d.titleEN", map_num), titleEN);
...
String titlecode = dict.Get( String.Format("map%d.titlecode", map_num) );
There's still a problem that everything in Dictionary is a string, so you will have to invent how to convert numeric and other values.


In AGS 4 you could do more, but if you already have a complete game that may not be easy to upgrade.
#1806
Keeping the script syntax problem separate, is there an actual point in having all Maps in memory at once?

The usual solution is to store map data in files, and load only 1 map at a time. This way you only need 1 Map struct object in script.


Regarding the scripting issue, I might suggest trying AGS 4 which has more scripting abilities:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-4-0-early-alpha-for-public-test/

But even with more script features, I still strongly recommend to find optimal ways of storing data, and only create things that are needed right now.
#1807
@Baguettator this may be done by creating a new array, copying old elements, and then assigning a new array to the pointer variable.

But I am bit puzzled with your example, because afaik regular structs cannot be stored in dynamic arrays, only managed structs can be. While Strings cannot be stored in managed structs in 3.6.* versions. So I am not certain what is your real use case.

EDIT: oh, judging by your thread in Tech Support, it appears that i misunderstood your intentions.
This problem is not about resizing existing array, but about having dynamic structs of regular structs, or structs containing strings.

In any case, I suggest looking into AGS 4 version, which has a new script compiler with a number of new features supported. The AGS 4 forum thread has a link to the new syntax cheat-sheet. Perhaps you will find a solution to your case there. If not, then please open a new suggestion for AGS 4 version. We try to not plan any big features for AGS 3 anymore.

EDIT: here's an active list of suggestions for the AGS 4 script:
https://github.com/adventuregamestudio/ags/issues?q=is%3Aopen+is%3Aissue+label%3A%22ags+4%22+label%3A%22context%3A+script+compiler%22+label%3A%22type%3A+enhancement%22
#1808
Quote from: Baguettator on Tue 21/11/2023 18:59:32I'm going to test it, but surely it works as you tested it before me with my project ;)

Well, I only tested the startup, did not play your game further, so could miss something.
#1809
The Beta 13 update was re-uploaded, with a File.Open script command fixed. Please download again (links are in the first post).
#1810
Quote from: cat on Mon 20/11/2023 20:26:51As for improving the situation: what about providing the last two betas as download in a spoiler tag (just like "For Editor", but "Previous Betas"), so people can easily downgrade to a version before the bug so they can continue working while the bug is fixed? This could reduce stress to make a quick re-release.

All the previous Beta updates are available for download on our github releases page:
https://github.com/adventuregamestudio/ags/releases

But yes, I can add a link to previous beta to the first post too.
#1811
Alright, so I broke File.Open command in script. I've been changing things there and forgot to test, it fell out from my head.

I must fix this and re release the update.

But what can be possibly done to improve this situation? I constantly miss to test things. There have not been a single update where I did not have to quickly fix something. Maybe we can recruit testers?

EDIT: I wish we had some kind of automatic testing system running games and game scripts. Alot of problems could be prevented early.
#1812
Quote from: Baguettator on Mon 20/11/2023 18:18:37Hi there ! Just launched my game previously made with 3.6.1.6, with the latest build 3.6.1.13, and I got a crash immediately. There is my error message :

An exception 0xC0000005 occured in ACWIN.EXE at EIP=0x0046522A. program pointer is -42, engine version 3.6.1.12, gtags (1,1).

Do you mean that you run a compiled game with the new engine, or that you recompiled an older project with the new editor?
Is there anywhere I can download your compiled game to see what happens there?

If not, then I'd need to know what is in "game_start" function(s) in your game in order to reproduce the problem.
#1813
Quote from: cat on Mon 20/11/2023 16:55:33Should I split out the posts about this topic here and move them to a different board/thread to keep this here clean?

I don't think it's a big deal, so either is fine with me.

EDIT: if I recall right, changing mask resolution will convert existing one(s). It should be safe to convert to a higher res (1:2 -> 1:1), but opposite conversion is lossy (you will loose certain pixels and that cannot be automatically undone).
#1814
Quote from: cat on Mon 20/11/2023 16:42:56
Quote from: Crimson Wizard on Sun 19/11/2023 22:50:50Can you check the Room properties and tell what is the value of MaskResolution?

It is 1:2 - I didn't even know this setting existed! Should I change it to 1:1?

It's been historically hardcoded as 1:2 for high resolution games (anything above 320x200), but since some recent version (3.5.0 or 3.5.1) the default is now 1:1 everywhere and this property was added for backwards compatibility, and in case someone needs this for any reason.

There is another global property in General Settings (Rooms -> Default mask resolution) that sais what this value should be by default in newly created rooms.

Quote from: cat on Mon 20/11/2023 16:42:56What is the benefit of different resolutions?

Saving bit of memory on masks in very large rooms + maybe emulating less precise walking and click detection on hotspots; although to be fair I can hardly imagine the real use case.
#1815
Updated to Beta 13
(Please use download links in the first post)

Changes in this update:

Editor:
- In Room Editor the hint with coordinates is now also displayed when moving Objects or Characters with keyboard.
- For Android build target Editor now supports a directory to place plugins in.
- For Android build target disabled compression of `.ags` and `.vox` assets, as that seriously slows down engine streaming resources (sprites etc).
- When building a game for Android and Linux the Editor will now be more tolerant to missing plugins and only issue a warning instead of stopping with error.
- For Color Themes: implemented character literal, braces match and braces error settings.
- Fixed Editor failing to start if user preferences file is corrupted (this is a second fix, complementing one done in AGS 3.5.1).
- Fixed General Settings and Default Setup not working correctly right after importing a pre-3.* game project.
- Fixed in Dialog panel certain editing commands (Copy, Paste, Undo etc) would affect the script even if cursor is set to the option's text.
- Fixed Dialog properties displaying internal values not meant to be seen by a user.
- Fixed selecting parent GUI after its control did not display GUI's own properties in the Properties Grid.
- Fixed Editor generating deprecated settings in the default config file.

Engine:
- Fixed String.Substring() (regression in 3.6.1).
- Fixed File.Open() in case of an absolute path (regression in 3.6.1).
- Fixed pushed textual button not redrawn after mouse up (regression in 3.6.1).
- Fixed crash in Software renderer when drawing a flipped frame (regression in 3.6.1).

Engine Plugin API:
- Added IAGSStream interface, IAGSEngine.OpenFileStream() and GetFileStreamByHandle().
  Besides the obvious uses, this is critically needed for the games packaged into APK for Android, because plugins do not have a easy access to the game files in such case.
- Remade IAGSEngine.ResolveFilePath() (was introduced in 3.6.1 earlier), don't return allocated array of chars, instead accept an output buffer and its length as arguments.

Android:
- Fixed engine not being able to find game data when it is in APK.
#1816
Quote from: heltenjon on Mon 20/11/2023 07:43:24
Quote from: gabriel19681_1 on Mon 20/11/2023 00:02:25The Goonies, You can find it here to download:

The Fan Game: The Goonies
Thanks, Gabriel. However, this download is "repackaged for the Pandora". Does anyone know how to reverse this process, if possible?

Turns out PND is a ZIP archive, so open it using a zip archiver. I succeeded with 7-zip, for example.

IMO zip programs is generally first thing to try with the game packages, because it's a widespread standard of packaging things today.

Inside the package there's literally a windows exe for some reason (but I guess person did not know how to get a raw game data file after compiling with AGS).
#1817
Quote from: cat on Sun 19/11/2023 21:51:44Not at all. I click on the hotspot, the player walks to 2630, 710 (instead of 2631, 710) using the GotThere module (which uses player.Walk inside). While still standing there, I click the hotspot again, the character will not move and trigger the action. No matter how often I click. I change the desired point to 2630, 710 -> the player walks there and executes the action, no matter where I started.

Can you check the Room properties and tell what is the value of MaskResolution?
#1818
Quote from: cat on Sun 19/11/2023 21:21:06The walkable area is a rectangle, going from about 74, 702 to 3747, 719. No matter how often I tried, the character would not walk exactly to 2631, 710. 2631, 710 did work. Same for 1161, 710 vs 1160, 710.

Is this related to the starting coordinates or not at all?

Could you print Character.DestinationX/Y properties somewhere and see what they are after you issue a Walk command?
this might tell if this is a problem with pathfinding or walking.
#1819
Quote from: CaptainD on Sun 19/11/2023 20:48:15Error running function "repeatedly_execute": Error (line 331): Script appears to be hung (a while loop ran 150001 times). The problem may be in a calling function; check the call stack.

The line number corresponds to the middle of static function HintsHighlighter::CalculateHintsForRoom().

This is fixed by adding a "noloopcheck" to the function's definition:

Code: ags
static function noloopcheck HintsHighlighter::CalculateHintsForRoom()
#1820
Quote from: cat on Sun 19/11/2023 21:00:18Now the question: Is this a known thing that the player will not reach certain points within a walkable area? Is this related to my room size or scrolling? Is this something with even vs. odd numbers (the other hotspot also didn't work with odd number but did with even)

It has been a known thing that it sometimes characters do this: because of imperfect diagonal walking direction character could end up few pixels off and did not adjust the final position, avoiding making it look like a "jump".

But in the recent Beta (starting with v3.6.1.9, i think) there's a fix that is supposed to make character end up on a accurate destination, so long as there's a path to it. So, I am not sure if this is expected anymore.

Could you post a walkable mask (image that may be imported into AGS) and a pair of starting/ending coordinates that cause a mistake for us to test?
SMF spam blocked by CleanTalk