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 - vga256

#41
Quote from: eri0o on Fri 22/04/2022 10:38:44

About MojoAL it's better to not think of what it does and does not support, but if OpenAL supports it in some standard, and then notify the developer and figure how to support that if needed.

OK that makes a lot of sense, thanks! I'll save this wishlist item for Unity :)
#42
Quote from: eri0o on Fri 22/04/2022 02:58:04
Can you elaborate what are you trying to achieve with 3D positional audio?

Like, as an example, Alan's Draconian Ags4 fork has sound from views attached to characters corresponding to either the character position on screen, or character position relative to player character. Is it this a similar case or more playing a sound at a specific position?

AGS has AudioChannel.SetRoomLocation, so if it's more on the single API implementation, perhaps a similar API could be made, which would be more flexible but more disconnected from internal AGS game logic.

So to clarify - the OpenAL 3D sound implementation is not simple Right-Left panning. It employs a complex set of algorithms to emulate positional sound in a 3D space using a Head-related Transfer Function. This is effectively "surround sound" produced algorithmically in stereo, instead of via many channels (5.1/7.1). You can watch/listen to an HRTF demo here. It is a much more powerful effect than a standard stereo pan.

After doing some reading, it is not clear to me if mojoAL supports HRTF, or if that functionality is enabled through an extension like ALC_SOFT_HRTF.
#43
Quote from: Crimson Wizard on Fri 22/04/2022 00:15:12

3.6.0 has fully transition to SDL2 and is using mojoAL for audio playback, which is an OpenAL interface and SDL2-based implementation.
The parts of Allegro library are embedded into the engine code now; these are parts related to bitmap manipulation (pixel drawing) and utf-8 handling.

I don't think that's possible without changes in both engine and plugin API. Playback settings afaik are not exposed to plugin API in any way. Internally, in the engine playback does not have 3D settings. So even though the backend allows it, engine does not have this logic implemented anywhere.

AFAIK AGS supports sound stereo panning between left & right (see AudioChannel.Panning).

Gotcha! It sounds like this would be a very long term project if there was interest in it. In the interim I will do my best with the .Panning property - thanks.
#44
Context: I recently discovered that OpenAL (and via extensions?) supports Positional/3D audio. Although I spent some time browsing the ags github repo, I am not clear as to the progress made with the transition to SDL2 and OpenAL with 3.6.0. It *appears* from a glance that 3.6.0 is now using mojoAL for interfacing with OpenAL.

Question: Is it possible to write a plug-in for AGS that would enable some basic positional/3D audio functions that would allow run-time changes to audio during gameplay? I am working on a first-person adventure that would greatly benefit from this feature, and I'm willing to put in the wrench time to make it happen, if it is possible at all.
#45
Happy to test out new early 3.6.x builds for you as I am using it exclusively. (Or can just send you my current AGS project which is extremely GUI-heavy).
#46
Quote from: Crimson Wizard on Sat 16/04/2022 20:45:03
@vga256, here's the engine with a fix, please tell if it works:
https://www.dropbox.com/s/0lnc6banecf0nti/acwin--3.6.0-beta3-guifix.zip?dl=0

Yep, that fixed it. Thanks!
#47
Game is in 32-bit mode (sprites are imported in 32 bit mode as well), and behaviour is consistent across all renderers (OpenGL/D3D9/SDL2).
GUI Alpha rendering style: proper alpha blending
GUI controls clip their contents: false
Pixel-perfect click detection: true
Sprite alpha rendering style: proper alpha blending
When player interface is disabled, GUIs should: Display normally

I re-imported the affected background images just in case there was a problem with the sprite file, but this had no effect. Background displays properly in-Editor.

Update: I have https://vga256.com/ags/test-noguibg.zip created a demo project for your convenience here which has a white background PNG image used for the GUI.
#48
There appears to be a bug with b3, or a change in implementation that has rendered my BackgroundImages for GUIs to be completely transparent (or non-existent, not sure which). I can confirmed that all of my GUI windows have a proper BackgroundImage set. This was working fine with b2. Am I missing something obvious?

(FWIW - the Modem Dialer window uses a button with a background image as a background, not a GUI.BackgroundImage, which is why it appears correct)

Screenshot:
#49
Quote from: Eon_Star on Fri 15/04/2022 21:01:03
Hi, I mean maybe the under the hotspot options or region options (property window), there could be some functions to make a mirror from the hotspot. For example "İs hotspot a mirror? true / false" and "Which region number ?  Region number : 1". Of course inside the room the right hotspot and region should be selected.

And inside the region properities we may choose, if there is a walk sound for the specified region number, like "Walk sound : True/ False", "Character Name : cEgo" "Walk sound number: 1". Something like that. A different sound for each region, when character walk on those regions.

Thanks for considering.

This seems like functionality that not be added in-engine, but via scripting. Recommendation: Add a Custom Property (-> Room -> Properties ... -> Edit Schema -> R-Click and Add New Property) called "IsMirror" or "Mirror" of Boolean type. Add a checkmark for Hotspots. Then this can be checked/set in your Room script via hHotspotWhatever.GetProperty("Mirror") and SetProperty("Mirror"). The same can be done for Walk sounds in specified Walkable Areas.
#50
Works great. Thanks for the quick fix CW.
#51
Found a new bug in 3.6.0b2 - labels no longer "pass through" clicks to GUI elements below (lower z-order), even though their "Enabled" and "Clickable" properties are set to false (you also get the same behaviour when Enabled is true). Demo project here. Drag away the label from the button to make the button function again. Drag label back over top of button to block clicks.
#52
Quote from: Laura Hunt on Sun 10/04/2022 10:12:16
Conversely, as I was watching Scavenger's recording of the ceremony, someone with a HUGE avatar walked by (https://www.youtube.com/watch?v=GkINHuHDKa4 at the 1:18:50 mark) but that did not happen in my client. Maybe it has to do with the zoom function?

:grin: LOL. Can confirm that was me at 1:18:50. I was definitely not that size on my own screen.
#53
Can confirm the macOS version works like a charm. Great job.
#54
Excellent news. Thanks CW, eri0o and team!
#55
@DualNames -

If a Mac client is still desired, please PM me with a compiled build at the nearest opportunity. The compiled binary for the macOS version will need the Clipboard plugin disabled before building.
#56
Great to see a beta out - with all the new features, this was enough to push me over the edge into upgrading my project!

I'm seeing an autocomplete bug with this version, but since I did not use any earlier versions of 3.6.0 I can't say where/when it might have emerged.

Behaviour:
Autocomplete does not continue working past the first word in a variable under ... unknown conditions.
Example:
Code: ags

/// reactor pressure and temp constraints
float ReactorMaxPressure = 1000.0; // a made-up number in kpa
float ReactorMinPressure = 1.0;
float ReactorMaxTemp = 1500.0; // a made-up number in *C
float ReactorMinTemp = 1.0; // in *C
float AmbientTemperature = 25.0; // SATP in *C
float AmbientPressure = 100.0; // SATP in kPa


Code: ags

function PlantSystemsToggleSysOps()
{
  Reactor...
}


When "Reactor" is entered, the autocomplete dropdown box correctly pops up and preselects ReactorMaxPressure. However, if I continue typing the variable name, "ReactorM..." the autocomplete box deselects ReactorMaxPressure and will not autocomplete with any variable name when I hit tab.

Workaround:
Code: ags

function PlantSystemsToggleSysOps()
{
    int anyTempVariable;
    Reactor...
}


With the above code, the simple insertion of any new variable causes the autocomplete to work as expected for "ReactorM..." words.

Possible Cause (?):
I tested this behaviour throughout my script, and determined that this function definition causes autocomplete to fail:
Code: ags

int NormalizeFlowRateWithinRange(int flowRate)
{
  for (int i = 0; i < MAX_ANIM_SPEED_GROUPS; i++)
  {
    if (flowRate <= animationSpeedRanges[i])
      return animationSpeedRanges[i];
  }
}


In *any* function below that piece of code, autocomplete will no longer properly autocomplete the word "ReactorM". Any function above this function autocompletes properly. I cannot see anything obvious about the above function that would cause a problem with autocomplete. Even commenting-out the entire function does not help.

Let me know if I can provide any more detail. It's a strange bug.
#57
Excellent! I'm still in the process of rewriting it for my code styling. Will keep you posted.
#58
Haha wow @eri0o! Looks like you wrote almost the exact same implementation as me, and you solved a few of my problems with Views along the way! I'll give this a shot and provide an update in a bit.
#59
As the title suggests - I'm looking for a recommended workaround that would allow me to choose the starting frame for a Button animation. The start frame option was added to Object and Character a few years ago, but Button fell by the wayside.

Because there is no function overloading allowed, what I'm asking for in the topic isn't possible in AGS. It seems that rewriting the entire Animate function, and replicating (in a new module) what Button.Animate does may be necessary. Can someone recommend a workaround that falls short of rewriting the entire Button.Animate implementation?
#60
Awesome, thanks. Will get to work on the engine ports.
SMF spam blocked by CleanTalk