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

Topics - Monsieur OUXX

#101
if you're familiar with AGS, you know that under specific conditions (running a 320x200 game with Direct3D) you can have high-resolution characters in a low-resolution game. Some consider it a glitch, some like it, and at the end of the day the causes of that peculiarity is very well known (it has to do with allegro and all that).

But now, WHAT IF I did this :
- creating a 640x480 DynamicSprite (and of course drawing anything i want into its drawing surface)
- putting a dummy character in the bottom-middle of the screen, with the appropriate walkable area (which could be : no WA at all, or with a 50% scaling -- in this thought experiment i'm not sure what would work, i'd need to try)
- setting the view/loop/frame of that character to point to the dynamic sprite i mentionned earlier

...wouldn't i get high-resolution graphics in my low-res game? Now imagine that this would be a window of text or something that's better in high resolution (like a console or anything required in some special debug mode). Wouldn't that work?
#102
In 3.4.0.16 (i.e. patch 4) :

Code: ags

AudioClip* ac;
ac.

When you do this and stop at the dot, you receive suggestions for AudioClip members, including "ID" which is not a member of AudioClip (only AudioChannel)
If you try to force it and type "ID", then of course the compiler complains about it.
#103
I'm using 3.4.0 patch 4 (if this is not the latest version, then please ignore)
The Editor throws an exception when I type the following keystroke into a script file : #.u.n.d.e.f.SPACE ( #undef followed by space bar)
#104
Hello,

I want to automatically run some script during the black screen inbetween fade out/fade in.
This script is long and complex and might freeze the screen half a sceond. That's why I want to do it at the exact moment when the player does expect the game to be unresponsive.
I want this script to run at EVERY room change, no matter what. So it should happen automatically.

therefore the question is : how do I automatically pick that up?

I've tried this but it seems to be triggered only after the end of the fade in (I suppose AGS doesn't happen player.Room until then?)

Code: ags

void room_Leave()
{
    Display("changed room");
}

int player_prevRoom=-1; //cheap trick to detect room leave
void DetectRoomLeave()
{
    if (player_prevRoom<0)
        player_prevRoom = player.Room;
    if (player_prevRoom!=player.Room)
        room_Leave();
    player_prevRoom=player.Room;    
}


void repeatedly_execute_always()
{
    DetectRoomLeave();
}


after posting this I'll be on my way investigating on_event and/or late_repeatedly_execute_always
#105
Since the AGS scripters dream team is currently in Iceland, I'm sure it will be super easy for them to find a few minutes to interrupt their current board game or outdoor sports activity to help AGSers in distress ;)

I'm currently rewriting the wiki about Fonts, and I'm confused regarding the fonts anti-aliasing.

If you know some answers, please answer each question as separately as possible

  • When you "use TTF fonts", does it mean: "use TTF fonts that were definitely rendered into pixel fonts at import time"? Or does AGS only render them in the Fonts pane but still secretely keeps the original TTF font for just-in-time rendering ?


  • Does AGS import the font with no anti-aliasing and then adds it at rendering time, in the engine?

  • How does anti-aliasing work in relation with outlines? I've tried to use a TTF font in a 640x480 game, enabled anti-aliasing in the game settings, and then enable "automatic outlineStyle" in the font. The result is terrible (the font gets totally screwed up because the outline also gets anti-aliased it seems, so it inserts transparent pixels randomly in the text)

  • In 2017, what is the added value of Calin Leafshade's SpriteFont Rendere plugin? ( here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=44359.5  )
#106
The AGS 3.4 patch 4 update mentions :
Quote
Fixed game compilation on systems which have Japanese ANSI or similar locale
as default locale for non-Unicode applications.

Does that have impacts in the game's Japanese fonts and/or Japanese translation? Or is it just a compilation thing? Is it possible to make a game in Japanese?
#107
Hints & Tips / Terror of the vampire
Thu 13/07/2017 13:28:22
This is the FULL WALKTHROUGH

Spoiler

Inn's main room
   TALK TO Tavern Crone (exhaust all dialog options until "talk to" produces no effect)
   PSYCHO Tavern Crone
   TALK TO Innkeeper (exhaust all dialog options until "talk to" produces no effect)
   PSYCHO Innkeeper
   TALK TO Barman (exhaust all dialog options until "talk to" produces no effect)
   LOOK AT sign
   LOOK AT Certificate
   WALK TO Exit. (the one to the far right)
   
Inn's back room (with the fireplace)
   LOOK AT Throw rugs
   LOOK AT Vampire teeth trophy
   LOOK AT Giant Fang
   LOOK AT Hat
   TALK TO Vampire hunter (exhaust all dialog options until "talk to" produces no effect)
   PSYCHO Vampire hunter
   WALK TO Exit. (back to inn's main room)
   
Inn's main room
   TALK TO Barman : ask him about his son.
      "So your son's at university..."
      "But WHICH University?"
      Dialog ends
   WALK TO Exit. (the one that leads ouside the tavern) --> The barman starts revealing Byron's issues --> Ego walks upstairs
   
Upstairs (Byron's room)
   PICK UP Turnip
   TALK TO Byron (exhaust all dialog options until "talk to" produces no effect) --> It ends on you deciding to break the chains --> Byron tells you that when he pulls on the chain he ALMOST" manages to pull his ankle out
   WALK TO Exit (downstairs)
   
Inn's main room
   TALK TO Tavern Crone (exhaust all dialog options until "talk to" produces no effect) --> Now you know about the clock tower
   TALK TO Innkeeper. Ask "about your son..." --> now you know he doesn't want to talk about it
   TALK TO Barman. Ask everything about Byron "A word about your son..." "He's chained round the ankle". The dialog ends.
   TALK TO Barman again. Keep asking. "who brings him his food", etc.
   TALK TO BARMAN. Order food. --> You learn that the chef wants new ingredients
   WALK TO Exit. (kitchen exit, behind the barman)
   
Kitchen
   (try to give turnip to chef again and again and exhaust every dialog line until he accepts)
   GIVE Turnip to chef
   GIVE Turnip to chef
   GIVE Turnip to chef
   GIVE Turnip to chef
   GIVE Turnip to chef
   --> None of the arguments convinces him --> you learn that Ego thinks there might be a psychological lever that could work on the chef
   PSYCHO Chef
   TALK TO Chef : --> "<Alienst wisdom> ..." --> you receive GARLIC
   PICK UP Stick of lard
   PICK knife: --> you receive KNIFE and you receive MEAT TENDERIZER
   TALK TO Chef (exhaust all dialog options until "talk to" produces no effect)
   WALK TO Exit (go back to main tavern room)

Inn's main room
   WALK TO stairs
   
Upstairs (Byron's room)
   USE lard on byron --> funny misunderstanding. No effect
   USE lard on chain --> Byron escapes. --> The barman comes and orders you to leave the inn
   WALK TO Exit (tavern main room)
   
Inn's main room
   WALK TO exit (front door) --> Ego says he doesn't know where Byron flew away
   TALK TO Tavern Crone --> He tells you the barman went to the room in the back to talk with the vampire hunter
   WALK TO Exit (far right, vampire hunter's room)
   

Inn's back room (with the fireplace)
   (cutscene with discussion between barman and vampire killer)
   TALK TO vampire killer--> exhaust all lines about you wanting to save Byron-->killer eventually tells you that you need stake+garlic+silver cross
   exhaust all other dialog options
   
==== 1. GET THE STAKE =====

   WALK TO  Exit (to main room)
   
Inn's main room
   TALK TO Barman --> order food --> now you know you may order food --> he tells you to sit down
   USE stool --> the crone "warns" you --> now you know the seat is fragile
   USE Rotted stool (again) --> this time you sit down and get some soup --> The Innkeeper steals it --> you learn that the table can spin
   TALK TO Innkeeper --> tell him whatever dialog line is offered to you to make him get up --> he leaves the room
   USE table --> the table spins, the beer is now on the left side --> the innkeeper comes back and sits --> the seat collapses
   PICK UP stool leg (under lying innkeeper) --> you get a stool leg
   USE blunt knife on stool leg --> you get a woode, stake
   WALK TO Exit (far right, vampire killer room)
   
==== 2. GET THE SILVER CROSS =====

Inn's back room (with the fireplace)
   USE craniometer on silver cross (in the fireplace) --> you lose craniometer, you receive silver cross
   
==== 3. GET THE GARLIC =====

If you have followed previous steps, you already have it.

Inn's back room (with the fireplace)
   GIVE garlic to vampire hunter
   GIVE stake to vampire hunter
   GIVE silver cross to vampire hunter --> vampire killer wants you to cool it down first
   USE cross on ale tankard (and not the opposite! it doesn't work the other way around)
   GIVE silver cross to vampire killer --> she tells you Byron is in the click tower
   
==== OFF TO THE CLOCK TOWER ===
   
   WALK TO Exit (back to main room)
   TALK TO Chef --> he tells you that he wants you to bring back Byron so that he can explore recipes specially created for vampires
   WALK TO Exit (main door, to the outside)
   the stairs up have collapsed
   USE cog (climb up) --> Ego says he needs a way to climb without get his hands stuck into the cogs
   USe knife on cogs --> the knife gets crushed to no effect
   USE stake on cogs --> this time the cogs slow down
   USE cogs (climb up) --< you climb up

==== MIDDLE OF THE TOWER (lower part) ====

   keep climbing up
   when you reach a certain height, the screen quickly scrolls up (with an new button appearing on the left of the screen: an arrow pointing downwards)
   click on the arrow. That brings you back just where you were before --  at the top of the "low" section of the climing.
   climb down, but this time to the left instead of where you came from
   USE lever : Ego says "I can't see its immediate use"
   MOVE lever : Ego pulls it down.
   go up, now.
   
==== MIDDLE OF THE TOWER (upper  part) ====
   USE pole --> Ego climbs up
   USE chain --> Ego won't do it with his bare hands
   USE cross on chain --> he says he needs a more strudy string
   USE garlic on chain
   USE ladder
   
==== TOP OF THE TOWER ====

   walk to Byron --> Ego walks half way but stops because of the noise
   LOOK AT yoke --> yup, defnitely what we need to break down.
   USE meat tenderiser on yoke --> can't reach it
   USE beam (climb) --> it's too high up!
   PICK UP ladder
   USe ladder on beam
   USE ladder (climb)
   USE meat enderizer on yoke --> Ego says he'd rather have some sort of screwdriver
   USE definitely blunt knife on yoker --> it's broken and useless
   USE crucifix on yoke --> almost thin enough
   USE meat tenderizer on crucifix --> Ego says the metal is not soft enough
   USE lighter on crucifix --> the crucifix is now hot
   USE meat tenderiser on crucifix --> the end is flattened
   USE crucifix on yoke
   
==== CURING BYRON

   TALK TO byron --> exhaust all dialog options
   PSYCHO byron --> not working
   PSYCHO Byron again ("judge") --> still not working
   PSYCHO Byron again ("alienate") --> still not working
   PSYCHO Byron again ("listen") --> when you have the oppotunity to talk, say "Please go on..." (keep listening)
   
[close]
#108
I'm so confused: I've been using this logging technique for several projects already and usually I have no issues.
I'm sure it's not even a problem with AGS or Windows' location of personal app data. I'm sure it's just be being blind and stupid.

LOGGING MODULE CODE:
Code: ags


String fName;

static void Console::ResetLog(String name)
{
    //overwrite the existing file and write something into it to give it a physical existence, then close it.
    fName = name;
    File* f = File.Open(fName, eFileWrite);
    f.WriteRawLine("");
    f.Close();
}

static void Console::W2(String s)
{
    //I'm doing this (open, append, close) to ensure that each output is actually flushed to the file in case the game crashes.
    // It's a very reliant technique.
    File* f = File.Open(fName, eFileAppend);
    f.WriteRawLine(s);
    f.Close();
}

void game_start()
{
    Console.ResetLog("SelfGenLog.txt");
}



During the game I write many things to the logs. I set a breakpoint inside Console::W2 and it actually goes through there.
And yet I can't find "SelfGenLog.txt". What am I missing?
#109
Hints & Tips / Chronicle of Innsmouth
Wed 17/05/2017 13:26:27
hi all!

following the tradition I'm opening a thread for hints on this great game. I mean it, it's a nice game full of good ideas. Compact dialogs that manage to tell the player a lot, excellent atmosphere, etc.

Anyways. Asking for a tip:

when searching the room in the flashback
Spoiler

Searching the room for letters. I've found 3 letters :
Spoiler

One in a drawer, one under the candle, one in the bed...
...where's the 4th one? Nothing in the wardrobe I believe?
Maybe I missed a clickable area OR I didn't use the right verb. I feel like I've tried top open/close/use/pick up/pull/push pretty much everything in the room.
Spoiler

DAMMIT I've tried to pick up / open/ pull bible... all I had to do was "look at"
[close]

[close]

[close]

#110
Hi all,

if you're stuck in solving the game, you can ask, I'll try to give hints without spoiling.

I'm stuck myself in the forrest
Spoiler

I'm stuck with reaching the pizza van after finding it
Spoiler

the code I enter doesn't work
Spoiler

When I enter the code found on the pizza flyer into the keypad of the electric fence, it still triggers the alarm???
[close]
[close]
[close]

#111
Let's imagine for a second that I branched from the AGS engine, and let's imagine that I manage to make heads or tails of the interpreter's memory management.  :-D

If we decide that there was no good reason for a managed struct to store a dynamic array, and if we go further along those lines and allow to store an array into another array, then... what should be the syntax?
Code: ags

int array[] = new int[100];
int* arrayOfArrays[] = new int*[10]; //this?
arrayOfArrays[0] = array;
int* arrayPointer = array; //this?


Also, as you know, C++ can manage pointers and references. The two are very similar but have some differences (I won't detail here). A long time ago, Chris Jones has made the choice of making referencing go down the "pointers" road instead of the "references" road (except in some very specific cases). I suppose that felt more natural for something that spawned from C then C++.
However, if I implemented references, how woud you picture it? Would there be some syntax traps caused by AGS' C-like-but-not-completely syntax?
Actually maybe it's already there. I never ever try to pass structs (managed or unmanaged) as parameters to functions, except for built-in ones. I have no clue.


#112
It's just a question :
-If I branch away from the project and open it with a Visual Studio version more recent than the files in the repository, ...
... i'll have to commit all my changes, including the automated update to the solution and project files (.sln, .csproj...) made by visual Studio at the time I opened them.

Should I commit that? If not, how should I handle it?
#113
Critics' Lounge / Game speed : 40FPS or 60FPS?
Thu 16/03/2017 14:54:38
OK so this is a weird questions but hear me out :
- AGS games are 40FPS by default
- That's probably a legacy reason (point n click games didn't require to have fast or fluid animations).
- But nowadays, let aside the aesthetic reason ("it's prettier") is there a reason that would make me favor 60FPS?

Some example I'm making up on the spot: "it's better for compatibility/ easier to sync on mobile devices" or whatever.
#114
OK, I know this is not easy, but bear with me.

The biggest issue I encounter when programming in AGS is the lack of data structures classes -- stacks, heaps, dictionaries, linked lists, hashmaps, etc.
Apart from arrays (whether dynamic or static), there's nothing.

Why I'm saying that :
Spoiler

At the moment, even arrays (even dynamic arrays!) are a real pain. Because even if you write a fancy module (to implement, let's say, a stack) (and God knows I and others have done that a trillion times), then, because of AGS language limitations, it will immediately become quite complex to make an array of those custom "stacks". Close to impossible to store that array into another array. And clearly impossible to reach a third level of arrays referencing each other.

Are you wondering why on earth that would be required?
Spoiler

Well, that sort of things is required all the time when you want to do "serious" progrmaming.

Look, for the skeptics, here is an example that I'm inventing right now, on the spot :
- a sprite is virtually an array of int
- a collection of sprites (for example, a loop) is an array of the previous
- a view is an array of the previous
- a character has an array of views
- a game has an array of characters
See, even before you realize it, you have 5 levels of arrays referencing each other.
[close]

The example above is taken from AGS built-in situations. So you don't need such strcuture. But as soon as you're trying to escape that, you're screwed. if some arrays contain int, some contain String, some DynamicSprite, etc. ... It's a nightmare.

Some clever people manage to get away with it (temporarily) by resorting to some tricks, such as :
- keeping a unique int ID for each item in their collections (that they can then use as some sort of pointer)
- moving the data storage array outside of the "struct" to be able to create arrays of complex types
- providing a unique interface (a struct with public functions) for all the data structures of the same type (for example, one struct dedicated to all stacks of int.

But then again, you quickly reach the maximum level of complexity for a normal human being if you want each new array to be put into another array. Especially if you don't just grow your data strucutres, but (a perfectly legitimate need) also want to be able to reduce memory use each time you delete stuff. You quickly have a case of memory management involved. At first it's easy. But after 3 levels of referencing between arrays, storing different data types, good luck!
[close]

I hope I've convinced you. Every language does that. Not AGS.

So now, for the suggestion :
The most natural suggestion would be...
Spoiler

... to allow pointers to unmanaged structures, allow (dynamic) arrays of them, and let arrays of structs store such dynamic arrays --or that kind of difficult stuff. I say difficult, because it requires deep modifications of the script parser and compiler. Only someone with a good understanding of the AGS parser classes and the virtual machine pseudo-code can do that.
I'm sure it will come eventually, it's on its way. CW and the boys are working hard on it. But there's no guarantee.
[close]
It would take forever, so I'm putting that aside.

There's something much simpler though.
Think fo the way GUIControl* is implemented.
Spoiler

There's the base class, GUIControl.
It's polymorphic. You can give any kind of control to a functin that expects a GUICOntrol, but then you can cast it using .AsButton, .AsList, whatever. And then you can use it as that specific type of control, with the methods that come with it.

[close]

Now imagine if AGS was providing a generic new type :
Code: ags

DataStructure* //the equivalent to GUIControl*



Then you would have several types of standard data structures:
Code: ags

DataArray //the basic wrapper to dynamic arrays. It offers 'count' (aka 'length') conveniency
DataDictionary //for quickly matching keys and values. Quick reading of values
DataList //For easily inserting or removing items anywhere in the list
DataStack //for pushing and popping shit
DataHeap //you know what a heap is
DataHashMap //Expensive in terms of space, but storing and reading values is almost immediate ( O(1) )


Then you would do this:
Code: ags

DataStack* myStack;
DataDictionnary* myDictionnary;
DataStructure* myDataStructure = myStack; //Just like you would do GUIControl* c = myButton

//you can also use it in arrays of mixed data structures types : 
DataStructure* myDataArray[10]; //just like you can do GUIControl* myControlsArray[10];
myDataArray[0] = myStack;
myDataArray[1] = myDictionnary;


Casting types would also be permitted (again: like it's already possible with CUIControls) :
Code: ags

DataStructure* myDataStructure1 = myDataArray[0];
DataStructure* myDataStructure2 = myDataArray[1];

myStack = myDataStructure1.AsStack; //throws an error or returns null if myDataStructure1 is not an actual stack. Just like ".AsButton" does
myDictionnary = myDataStructure2.AsDictionnary; //throws an error or returns null if myDataStructure2 is not an actual dictionnary. Just like ".AsListBox" does


Instanciation would look like what exists for DynamicSprites :
Code: ags

DataStack* myStack = DataStack.Create(10); //initial size: 10


Each data structure type would have the usual functions know to each of them :
Code: ags

//Stack : 
   - ID (a unique int value, just like DynamicSprites or GUIControls have one)
   - create (initial size)
   - push (value)
   - pop (value)
   - count

//dictionary : 
   - ID (a unique int value, just like DynamicSprites or GUIControls have one)
   - Create
   - AddValue(key, value)
   - GetValue(key)
   - KeyExists(key)
   - ...

//array:
   - ID (a unique int value, just like DynamicSprites or GUIControls have one)
   - Create (initial size)
   - Add (at the end)
   - Insert (arbitrary place)
   - Sort (by value if contains [i]int[/i], by alphabetical order if it contains [i]String[/i], by ID other wise) 
   - ...



Now all of that is, I suppose, well within reach if we stick to structures meant to store int.

It could get more complicated for structures meant to contain several types of values:
Spoiler

It might be needed to duplicate all the prototypes of all the functions :
Code: ags

DataDictionnary.Create_int
DataDictionnary.Create_String
DataDictionnary.Create_DataStack

DataDictionnary.AddValue_int
DataDictionnary.AddValue_String
DataDictionnary.AddValue_DataStack


...But I suppose that code wizards could use the code generation features of their favorite IDE (such as Visual Studio with ReSharper) to generate billions of functions without needing to write much code.
[close]

The beauty of this is that, apart from the wrapper AGS classes, not much coding would be required, since everything else is already implemented within the underlying language and/or libraries. Don't tell me that Allegro or whatever does not offer a Dictionnary class that already implements all the functions I suggested?


So what do you think of that?
#115
Critics' Lounge / mountain scene
Wed 01/02/2017 20:06:57
Is there anything that shocks you in there, drawing-wise? When you look at it, is your eye drawn onto some unpleasant detail?

[imgzoom]http://68.media.tumblr.com/2069db18575d5ea1759bfb07ab412a8d/tumblr_okpot61idB1tsfksfo1_540.png[/imgzoom]

Since I know you guys and I know that there's always a rogue paintover happening at some stage, here's the PSD file (photoshop) : https://www.dropbox.com/s/giche63309kmcwe/02_agsforums.psd?dl=0
#116
Critics' Lounge / Indy sprite : rear view
Tue 13/12/2016 23:47:11
Disclaimer : We're discussing the rear view only.

So we have this first draft for the rear view (a big big thank you to Nr. 2698 and selmiak for the sprite they drew despite me fixing a few things here and there).
[imgzoom]https://68.media.tumblr.com/9d6985b8e5c320e7a8a87567934bdd6a/tumblr_oi5dugqaOM1tsfksfo2_75sq.png[/imgzoom]
3x:
[imgzoom]https://68.media.tumblr.com/ba745feec6f1a7fc0f559694745849c3/tumblr_oi5dugqaOM1tsfksfo1_250.png[/imgzoom]

How would you make it better?
#117
How about producing a proof of concept of a template for a basic data structure, like let's say a List, that would rely on a type not know in advance, provided it provides a few basic methods (Compare and stuff)
I've done that in the past but it was very clunky because there could be only one macro. But with macros inside macros, I guess that gives access to a whole new world of fun.
#118
A thing is puzzling me : how does the number of channels vary?
- In AGS 3.4.x+ : Is System.AudioChannelCount constant? Even when clips are playing?
- In older AGS versions: what would be a good way of counting the channels?

I've tried as follows:
- All my AudioTypes have "MaxChannels"=0 (unlimited channels), except one. That one has MaxChannels=2.
- Then I run this function, using a clip that has an "unlimited channels" AudioType with MaxChannels=0.
Code: ags

//This function only makes sense before System.AudioChannelCount was introduced -- AGS 3.3.x

//MAX_AUDIOCHANNELS : any value higher than the expected result (probbaly should be 7 or 8)
#define MAX_AUDIOCHANNELS 9
void CountAudioChannels(AudioClip* testClip)
{
    AudioChannel* audioChannels[MAX_AUDIOCHANNELS];

    //We'll count the audiochannels by playing priority 1 sounds until one of them uses a previously-used channel
    //IMPORTANT: this clip's Audiotype must have a setting that allows to use an unlimited number of channels (max channel = 0)
    AudioChannel* firstChannel = testClip.Play(eAudioPriorityVeryHigh, eOnce);
    audioChannels[0]= firstChannel;
    AudioChannel* otherChannel = testClip.Play(eAudioPriorityVeryHigh, eOnce);

    nbAudioChannels = 1;
    while (otherChannel != firstChannel)
    {
        audioChannels[nbAudioChannels] = otherChannel;
        nbAudioChannels++;
        otherChannel = testClip.Play(eAudioPriorityVeryHigh, eOnce);
    }
    #endif

    Display("Counted %d AudioChannels.", nbAudioChannels);
}



the result is 5. When al my AudioTypes have MaxChannels=0, the same function returns 7. So I infere that 5 is probably the result of 7-2.
So does that mean that the AudioType that has MaxChannels=2 reserves the channels? I thought that would mean it can use 2 channels at most.
#119
Spoiler

Consider this : you want n ambient sounds to play simultaneously.
By nature, an ambient sound will crossfade with itself, so that the repeating is seemless to the player's ear.

I've implemented this by using 2 channels per ambient sound: I simply play the sound twice (which implicitly uses 2 channels), with eRepeat parameter, so that the AudioClip repeats itself on eachc hannel. Those two identical AudioClips are shifted in time so that when the second one starts, the first one is around its middle. When one of the channels is reaching its end, the sound gets faded out by my script. Then when it's starting again, the volume is faded back in. This way, out of the two channels for this one ambient sound, there's always one that's being played full volume, and the other one that's near its end or start, that's being faded out or in.

That works well.

But that's a waste of channels. If I have n channels then I can play only n/2 ambient sounds.

Do you think there would be a clever way of using the "crossfade tracks" property of the AudioTypes to achieve the same feature? While asking the question I realize that the solution probably revolves around playing an ambient clip only once (no eRepeat), but then having the script check if it's reaching its end. By then, calling .Play on the same AudioClip would make it play again, but with crossfade.

HOWEVER, what I'm wondering, is this: Would that use the same AudioChannel (the crossfading is done by the engine internally to the channel) OR does it implicity use another channel, hence defeating the purpose of the idea?

[close]

Question: If you play an AudioClip that has an AudioType that was set up to "crossfade", does it use only one channel?
ANSWER: I've run some tests and the crossfade seems to be just a fade out at the end and a fade-in at the beginning. It seems to use only one channel. Am I correct?


See also (interesting thread about volume management on a crossfade track): http://www.adventuregamestudio.co.uk/forums/index.php?topic=50093.msg636482411#msg636482411
#120
I've been reading this and this and I can't sort out what's real, what's a suggestion, and from what version it applies.

I've tried this script in both 3.3.4 and 3.4.0.6 and both display only "FLAGS:"

Code: ags
    String result="FLAGS:";
    //I think API_VERSION does not exist -- testing just in case
    #ifdef API_VERSION >= 3.4.0
    result=String.Format("%s 1", result);
    #endif
     
    #ifdef API_VERSION < 2.7.2
    result=String.Format("%s 2", result);
    #endif
    
    #ifdef API_VERSION < 3.4
    result=String.Format("%s 3", result);
    #endif
    


    //At least one of those should work??? At least in 3.4.0.6 ???
    #ifdef SCRIPT_API_v330
    result=String.Format("%s 4", result);
    #endif
     
    #ifdef SCRIPT_API_v334
    result=String.Format("%s 5", result);
    #endif
    
    #ifdef SCRIPT_API_v340
    result=String.Format("%s 6", result);
    #endif
    
    #ifdef SCRIPT_API_v3406
    result=String.Format("%s 7", result);
    #endif

    Display( result);


How should I proceed to test the current version?
SMF spam blocked by CleanTalk