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 - Monsieur OUXX

#901
OK I'll share my thoughts.
I'd say that the number of channels is really the first thing that comes to mind (see example of channels-heavy use in other thread).
#902
I have read your post, but I am currently in a level of exhaustion that you can't imagine (extremely long days of work in front of a computer screen, followed by hours of AGS "work" until late in the evening).
Thanks for your answers.

AFAIK Game.AudioClipCount is not in the autocomplete in 3.3.4, and since I read about it too in a thread where it was still hypothetical, I got lost between what's real and what's just a wish.
Thanks for answering, though. That's helping a lot. Thanks thanks thanks.

#903
so I'm experimenting with a little sound engine inside AGS and I'm not sure what I can do or not do.

- listing and iterating on the game's AudioClips? There's this but apparently it was never integrated in the main source branch? I think that's the most important thing.
On a side note, helios introduced a way to check which channel plays a given AudioClip, but Ithink it's kind of brokensince the same AudioClip can be played on several channels.
- listing and iterating on the game's AudioChannels? At least, knowing which are free or which are in use. (that's the least important of my requests though)
- listing and iterating on the game's AudioTypes? That I could do manually at game startup if I could iterate on the game's AudioClips. That would allow me to automaticlaly check that the right types have been set on the many, many sounds.
#904
Quote from: Crimson Wizard on Thu 24/11/2016 12:27:31
everything as explicitly as I could.
I know, that was my way of saying that I'm dumb.



Quote
We could find out, I guess.
that'd be really cool. Maybe check if hardware sound is enabled or something before allowing more channels. I have no idea what's the average number of channels used in "modern" gaming systems and/or sound hardware.
#905
OK, then I didn't understand all the implications of CW's post.
This is a big issue for me. If I play 2 ambient sounds in the room, multiplied by two to cross-fade them, plus one channel (or two!) for the footsteps for each character, that's already 6+ channels used. They're running out quickly...

Is the limit of 8 channels an artifical limit easily removed, or...?
#906
That's what I've been doing from the beginning and the results are not right.
I thought maybe I was doing something wrong in my code but Ithink I've found a bug.

If the scripter plays several clips in a row, then the AudioChannel pointer returned by the earlier AudioClip.Play are still valid, but their .PlayingClip got overwritten by the newer .Play calls

This simple script shows it. With as few as 6 sounds of type "Sound" playing, the one playing last is then found in the first AudioChannel.

Unless you tell me that it's expected behaviour that the channel is still valid but its content can be overwritten???

Code: ags

AudioChannel* channels[20];
int nbChannels=0;

//because I'm paranoid I'm checking if pointers to AudioClip* can return several false positives
String nameClip(AudioClip* c)
{
    String result = "";
    if (c==aSnow_tempest)
        result=String.Format("%s aSnow_tempest",result);
    if (c==aAmbiant_cave1)
        result=String.Format("%s aAmbiant_cave1",result);    
    if (c==aAmbiant_cave2)
        result=String.Format("%s aAmbiant_cave2",result);
    return result;
}

String listChannels()
{
    String result="";
    int i=0;
    while (i<nbChannels)
    {
        result=String.Format("%s channel\[%d]=%s[ ",result, i, nameClip(channels[i].PlayingClip));
        i++;
    }
    return result;
}

void game_start()
{
    FadeIn(64);
    channels[nbChannels] = aSnow_tempest.Play(1, eRepeat); nbChannels++;
    channels[nbChannels] = aSnow_tempest.Play(1, eRepeat); nbChannels++;
    channels[nbChannels] = aAmbiant_cave1.Play(1, eRepeat); nbChannels++;
    channels[nbChannels] = aAmbiant_cave1.Play(1, eRepeat); nbChannels++;
    channels[nbChannels] = aAmbiant_cave2.Play(1, eRepeat); nbChannels++;
    channels[nbChannels] = aAmbiant_cave2.Play(1, eRepeat); nbChannels++;
    
    Display(listChannels());
    
}




#907
I've been spending over 5 hours of intense logging and debugging on this, I swear I'm 110% sure that in the end there will just be an inversion between two channel names somewhere. I'll be so gutted.
#908
Consider this simplified code :
(I'm not sure it's enought o reproduce my issue)
Code: ags

// let aClip1 and aClip2 be AudioClips
AudioChannel* a1a = aClip1.Play(1, eRepeat);
AudioChannel* a1b = aClip1.Play(1, eRepeat);

AudioChannel* a2a = aClip2.Play(1, eRepeat);
AudioChannel* a2b = aClip2.Play(1, eRepeat);


//Then in repeatedly_execute_always
bool a1aPlays1 = a1a.Playingclip == aClip1;
bool a1aPlays2 = a1a.Playingclip == aClip2;
bool a1bPlays1 = a1b.Playingclip == aClip1;
bool a1bPlays2 = a1b.Playingclip == aClip2;

bool a2aPlays1 = a2a.Playingclip == aClip1;
bool a2aPlays2 = a2a.Playingclip == aClip2;
bool a2bPlays1 = a2b.Playingclip == aClip1;
bool a2bPlays2 = a2b.Playingclip == aClip2;

Display("[%d, %d, %d, %d]", a1aPlays1, a1aPlays2, a1bPlays1,a1bPlays2 );
Display("[%d, %d, %d, %d]", a2aPlays1, a2aPlays2, a2bPlays1,a2bPlays2 );



Very naturally you'd expect the display to be :
[1,0,1,0]
[0,1,0,1]

...And yet in some cases I get :
[1,0,0,1]
[0,1,1,0]


In other words, half the AudioChannels appear to be magically playing the wrong clip. Not only that, but there's a pattern : the AucioClips seems to "swap" AudioChannels (aClip1 in the channel supposed to run aClip2, and vice versa).

I'm extremely confused but I've been searching for hours now and I can't explain the mystery.

I'm not claiming this is a bug, but maybe experienced people could give me a lead?

EDIT: OH, OH, WAIT. Is a Clip that's repeating itself getting a new AudioChannel each time it restarts???
#909
Quote from: Crimson Wizard on Tue 22/11/2016 22:26:40
If you were at 3.3.5 or later I'd suggest trying to put your test code into "late_repeatedly_execute_always", which is called after game updates.
In other case, probably just adding safety check (as you did there) may help.
Although in any way this seems to be a bug, which needs to be fixed.

Thanks for the aknowledgement.
About the stuttering: forget my nonsense ;)
#910
Ponderabilia
#911
Critics' Lounge / Re: Walk Cycle Animator
Tue 22/11/2016 17:59:44
static animation: if you make the hair go up and down, I suggest you also make the arms bend up and down (more cartoony)
walking animaiton: like Cassie said: make the chest of constant height, but make it move up and down.
#912
General Discussion / Re: What is race?
Tue 22/11/2016 14:16:21
Quote from: Atelier on Mon 21/11/2016 12:49:11
The non-existence of a word in another language is not proof that something doesn't exist;
No, but the fact that the scientists also say it is evidence.
Let it go, man. Races are not a thing.

Quote
Races exist in my language, in every language, therefore you're wrong
No, people, that's not true. Yes, the word exists, but in 95% of languages, this word is used only by racists, and cannot be used to describe humans (except by loonies) since the end of WWII.
Only in English (and maybe a tiny minority of languages) is it used for everyday use, as a generic word for "ethnic group".
#913
AGS 3.3.4

I've got this module that repeatedly loops a sound, starting from the middle of the sound :

Code: ags

AudioChannel* c;
void fooPlay(this AudioClip*)
{
  c = this.Play(1, eRepeat); //we play the sound on a first channel...
  if (c!=null) 
      c.Seek(c.LengthMs/2); //c.LengthMs is never 0; there's an actual sound

}


Then, in repeatedly_execute_always, I perform calculations based on the position.
Please note that I never change the position myself -- I never do .Seek apart from the first one, above. I use these calculations to adjust the volume.

Code: ags


function repeatedly_execute_always()
{
      //float pos = IntToFloat(c.PositionMs) / IntToFloat(c.LengthMs); //Just so you see what kind of calculations I'm doing
      
      if (c.PositionMs > c.LengthMs )
           Display("fPosMs=%f, fLenMs=%f", IntToFloat(c.PositionMs),  IntToFloat(c.LengthMs));
}


Surprisingly, I've come across situations where IntToFloat(c.LengthMs) = 13864.0, while IntToFloat(c.PositionMs) = 27597.0. This should be impossible.
It always happens at the precise moment when the sound reaches its very end (or its very beginning, since it's looping).
Even more surprisingly, this seems to happen randomly. It doesn't happen each time the sound loops; more like once every 4 or 5 loops.
This stinks like a bad float value rounding mishandling a 0.0 somewhere.

Because of the treatment I'm applying to the volume, this causes a sudden stutter. Could this be the cause of the famous "sound stuttering bug" in AGS?

Please note that I've performed a research on the forums to track this potential bug, but didn't find any reference to it.
If requested, I can provide the .MP3 file or full source code (I warn you, it's a massive beast -- But there's only one and only AudioChannel.Seek call in the whole code, I guarantee it).

#914
General Discussion / Re: What is race?
Mon 21/11/2016 11:40:21
The problem is that English speakers use the word "race" for pretty much anything (including humans!) whereas in every other languages this word is only for pets or farm animals.
Race is not used in other languages because it doesn't mean anything scientifically.

Race is not a thing. Seriously.

Race. Is. Not. A. Thing.

the closest thing to a "race" in the scientific world is a species. And all human are the same species because genetic differences are tiny, tiny, tiny.
Therefore, this debate "what is a race" is doomed from the beginning. Stahp it. Stahp.
#915
sorry for necroposting but I found something interesting about that module.

If you set a sprite of just one pixel, and then use the settings below, then it looks like a cloud of agitated firebugs flying around rather than atmospheric effects.
Think Monkey island when guybrush walks in the dark forrest, or think flies in a swamp, etc.

Code: ags

    int VERTICAL_SPEED = 1;
    int HORIZONTAL_SPEED = 0;    
    
    int box_top = 0;
    int box_bottom=36;
    int box_left=146;
    int box_right=176;
    
    WeatherModule.Start(VERTICAL_SPEED,   HORIZONTAL_SPEED, false,  2, 2, box_left, box_right, box_top, box_bottom);  


#917
Just a lil' teaser. I know it doesn't look like much, but there has been a lot of under-the-hood progress since last time you saw that corridor.

>> VIDEO <<
#918
Critics' Lounge / Re: character walkcycle
Mon 31/10/2016 19:56:03
Current progress :

SIDE
[imgzoom]http://www.dropbox.com/s/jzq71tphhqk3t2t/side4_smallersteps.gif?raw=1[/imgzoom]

I think I've reduced and smoothed the shoulder move a lot, but let me know if you still find it awkward. I've reduced the size of the steps as well.
Also, some people have told me that the character looks like a shorty with big hair. do you have this feeling?

FRONT
[imgzoom]http://www.dropbox.com/s/1snud9ty8mb53q9/front3.gif?raw=1[/imgzoom]

BACK
[imgzoom]http://www.dropbox.com/s/0g6ie9m5eq3x4nq/back2.gif?raw=1[/imgzoom]
#919
Critics' Lounge / Re: character walkcycle
Mon 31/10/2016 12:58:57
Current progress :

[imgzoom]http://www.dropbox.com/s/77h819nh99b041p/side3.gif?raw=1[/imgzoom]

I think I've reduced and smoothed the shoulder move a lot, but let me know if you still find it awkward.
Also, some people have told me that the character looks like a shorty with big hair. do you have this feeling?
#920
Quote from: Cmdr on Sat 29/10/2016 22:54:15
Update:
Version 1.1
-Fixed some bugs and other issues


Congrats
SMF spam blocked by CleanTalk