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

#3221
program pointer is +3330 is at the character rendering. Two things come to mind:

1) make sure you did not assign a view with missing loops/frames to whatever character is present in the room.
2) do you use dynamic sprites in the character frames, and then delete them?
#3222
Do you actually have this file on disk in your project's folder?

In case you don't, TwoClickHandler.ash is perhaps a part of the BASS template, which may be freely downloaded from here:
https://github.com/adventuregamestudio/ags-template-source/tree/master/BASS

Unless you modified it for your game of course, in which case only backups may help.
#3223
Quote from: fernewelten on Sun 23/01/2022 16:53:59
However, first tests seem to show that works properly in AGS 4, probably because AGS4 is SDL based.

For the raw drawing we're still using allegro 4 library (we kept parts of it in 3.6.0/ags4). It could be a problem with the engine logic. I recall changing something in DrawImage/DrawSurface in 3.6.0, maybe that fixed this problem by occasion.
#3224
There are two major (years old) issues here:
1) there's a issue of AGS not having alpha in color API. The DrawingColor is even packed for 16-bit format, so you cannot set any 32-bit color but only certain range of these.
2) this may be clarfied, but I 99% believe that the raw drawing operations cannot account for the alpha channel, and would never blend the source pixels with the destination, but only plain copy over, thus replacing the alpha value.

So, yes, intermediate images seem to be the only way now, unless the raw drawing is overhauled in the engine.
#3225
Ah! :facepalm: I just realized that forgot to explain. The reason i ask is that:

1. The speech is a blocking action; repeatedly_execute does not run during blocking actions. repeatedly_execute_always does. So that matters.

2. Display() command is special in AGS, it's "super-blocking", because even repeatedly_execute_always does not run during it. That's of course a design oversight, but I think it was made so because engine uses Display() for special messages too that are supposed to completely freeze the game. Because of that, you won't be able to call Mouse.Click in script while Display is on screen.
The only solution to this I am aware of is to not use Display, but instead make your custom overlay or GUI for such messages.
What remains of course are these special messages that I mentioned. The only fix for them would be when the engine itself would handle gamepad.

OR, if plugin would also handle these events and called "SimulateClick" automatically, not forcing you to do that in script.
#3226
Only few days later, I must post an update fixing another annoying bug found just now.

Updated to Alpha 16
(use download links in the first post)

IMPORTANT: If you were using 3.6.0 before, then you may receive a warning about your project spritefile containing "leftover" data which will be cleaned up now. That is normal, kind of (see below). That does not delete any actual sprites from the game project itself, only fixes the compiled "acsprset.spr"


Editor:
- Fixed sprites were never deleted from spritefile, only had their references deleted from the project (NOTE: this bug exists at least since Alpha 9).
- Editor now cleanups spritefile on game load, identifying any data not referenced by the project and marking it for deletion.

Engine:
- Updated SDL_Sound lib to recent version, this is purely internal change but it's unknown if this will lead to anything noteable in particular.



#3227
I once played a game where all the narration was voiced - played when describing what you see, what you take, and so on, and frankly it was driving me mad. Partially because it was done in a pompous theatrical manner.
#3228
Quote from: Baguettator on Thu 20/01/2022 12:58:34
It seems that the 3.6 can be considered as a beta version, now ?

Almost, I guess; i'd like to wait until we have Android and/or Web build available from the Editor (eri0o is working on that afaik).

Quote from: Baguettator on Thu 20/01/2022 12:58:34
Any way to have the "GUI Controls clip their content" option available individually ? Or is it for all GUI Controls ?

It is for all GUI in game.
Personally I believe that it should be a normal default, as it is in any common GUI frameworks, as far as I am aware. But the option exists for backward compatibility, e.g. if you import an older project where you'd like to keep existing looks.

In theory it is possible to have per-control option too, not much things have to be added by the way, as such option already exists, but is only used by the Button with image (known as ClipImage property).
The reason I did not do that right away is because I believe that would complicate game desig; such beavior already introduces separate idea of control's visual dimension different from the one defined by the X,Y,Width,Height.
There may be few situations where a user may want to have a text going outside a button, for example, but I think that may be solved by having both button and label combined.
In any case, I'd rather wait and see if there are any issues with the current option, as we may always add per-control option if there's no way around that.
#3229
You are missing a closing bracket for condition:
Code: ags

  if (player.HasInventory(iNoodles) // here // { 


should be
Code: ags

  if (player.HasInventory(iNoodles)) {
#3230
Quote from: eri0o on Thu 20/01/2022 10:20:05
Hey, do you know if it's feasible or not to make it save only when it's different from the original static value?

Because empty string is also a valid value it cannot be used to determine this when restoring a save. So this has to be set as a flag and saved as some flags field.

Alternatively, this may be saved as a custom property with some kind of "internal name" which otherwise cannot be reproduced. As custom properties are maps, they are only applied if the keys exist.
#3231
Quote from: deadsuperhero on Thu 20/01/2022 09:20:28
Quote from: Crimson Wizard on Wed 19/01/2022 20:59:26
Can you clarify, where exactly do you call that code from?

Hey, no problem! This is what I'm currently doing for handling clicks normally:

I meant, could you tell where do you call the code that you posted above, the one with Mouse.Click?

For example, are you calling it from repeatedly_execute, or repeatedly_execute_always, or other place?
#3232
Yes, also for Hotspots.

This is one of the things that are always getting postponed because of low priority, and then forgotten about.
There's already a ticket opened for this: https://github.com/adventuregamestudio/ags/issues/979
I will assign to 3.6.0, because supposedly this may be easy.


For the reference, this will increase the memory use and size of the game saves, regardless of whether the names are going to be changed at runtime or not.
My estimate of a serious case is:
let's say a name is (rather long) 20 characters on average, there are max 40 objects in the room (currently), and a large game may have, say, 100 rooms.
that gives 20 * 40 * 100 = 80000 (or 80 KB) of used memory. 160 KB if also all 40 hotspots in all rooms have names.
#3233
Quote from: Rik_Vargard on Wed 19/01/2022 21:30:40
For what I know you can't mix "regular scripts" and "dialog scripts" in Dialogs to "option-ON/OFF" an option (based on the "How To Use AGS" tutorials)

You actually can, these tutorials are either mistaken or outdated.

Taking the code newwaveburritos posted above, the mixed code would look like:
Code: ags

  if (player.HasInventory(iNoodles){
option-on 3
  }


notice how "option-on" has no indent, while "if" and brackets have spaces before them.
#3234
Quote from: deadsuperhero on Wed 19/01/2022 09:35:41
So...the Wheel menu buttons work fine when left clicking...but! When a message comes up on the screen, this simulated left click is incapable of dismissing them. It also can't seem to skip speech.

Can you clarify, where exactly do you call that code from? What do you refer to as a "message", is this a message from Display() function?

Quote from: eri0o on Wed 19/01/2022 20:43:15
If you need to click, use this plugin function ClickMouse instead. Mouse.Click goes through a different click pipeline through the engine.

I checked what the plugin does, and it calls engine->SimulateMouseClick(), which in turn calls PluginSimulateMouseClick:
https://github.com/adventuregamestudio/ags/blob/master/Engine/plugin/agsplugin.cpp#L779
The script's Mouse.Click also calls PluginSimulateMouseClick:
https://github.com/adventuregamestudio/ags/blob/master/Engine/ac/mouse.cpp#L573

These should be identical in result. What matters is what circumstances you are calling them (e.g. on which event or callback).
#3235
Quote from: Pajama Sam on Wed 19/01/2022 15:23:49
how would you add the characters constant position to the log wouldnt it have to be still or it would fill up the log.

I meant, if you only need this information when character begins to move, then this information may be added to the log message that tells about character starting to walk. It will not be displayed every game frame. This is an option.

If you need to see this information every time coordinate changes, then of course it should not be printed into the log.
#3236
Quote from: Pajama Sam on Wed 19/01/2022 14:55:53
Could you also include a list off to the side having all the objects and characters and their coordinates

It's going to be a whole separate feature:
1) gather all this information inside the engine and pass it to the debugger (editor);
2) parse in the editor, and arrange as the list or table;
3) display this list somewhere.

I think it's doable though. The question is mostly which data to pass and how to organize visually in a nice way.
This has to allow for expansion, because as soon as it shows coordinates people will ask for other things too.


Otoh, if it's only about knowing where the character walked from when it starts walking, this may be just added to the existing log message.
#3237
I just tried 3.6.0, and Printscreen does not skip the speech anymore. Don't remember if it's done on purpose or not, would need to double check.

Does it work for you?


PS
In general, when such requests are made, I usually say that it's a bigger problem than 1 key. Ideally there should be a way to tell which keys exactly do what, and which don't. Although, in case if "printscreen" this may be an exception, because it's a special key.
#3238
Personally I feel like these icons should be locked to certain position, like they often do on status bars.

Example: the clock icon at the left, and sound icon aligned at the right, so that it would always be on same relative spot.

But I guess one needs to work with the editor for a while to see how it is.

NOTE: the icons are included in the latest release of 3.6.0 alpha
(https://www.adventuregamestudio.co.uk/forums/index.php?topic=58976.0)
#3239
Updated to Alpha 15
(use download links in the first post)

Contains all the changes from 3.5.1 Patch 7.

PLEASE NOTE: For the technical reasons Editor now requires .NET Framework 4.6 to run (was 4.5).


Editor:
- Added "GUI controls clip their contents" option to the General Settings. Enabled by default in the new projects, this clips texts to the control's rectangle.
- Added zoom controls for the Cursor, Inventory Item and View panes.
- On the View pane the frames having set delay and linked sound will be now indicated with icons.
- Fixed potential exception that may occur when trying to save a modified spritefile (regression since 3.6.0.13).

Engine:
- Added "--sdl-log" command line option for setting up SDL2 library output verbosity. The engine log config now has a new "sdl" group meant for SDL2 messages.
- Fixed potential crash on startup which happens if no audio device was found.
- Fixed number of problems with OGV Theora playback (stuttering and freezing video).
- Corrections to switching graphic mode between windowed and fullscreen.

Android:
- Fix single game launcher not starting (regression since 3.6.0.13).
- AGS Player now searches for the games using proper detection (ported fix from 3.5.1 where it was applied to an older version of the game launcher).
- In AGS Player added "Browse" button to the game folder selection, which opens default system file picker.
- AGS Player now searches for games recursively, in all the subfolders.
- Fixed AGS Player crashing if no android.cfg was present in the games dir.

WinSetup:
- Fixed "Fullscreen as borderless window" checkbox was not actually working.
#3240
Quote from: Dave Gilbert on Tue 18/01/2022 15:12:23
Hello! I upgraded from 3.6.0.12 (alpha 13) to 3.6.0.13 (alpha 14). My game loads, compiles, and runs just fine. However, when I added some sprites to sprite editor, I got this error on saving:

So, ^ this is a bug found in the latest 3.6.0 build, it was reported just recently, and I will be releasing an update soon.

It happens whenever you are changing sprites in your game and then try to save.
SMF spam blocked by CleanTalk