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

#3361
Quote from: Stranga on Wed 01/12/2021 10:36:26
Yes this did work in 3.5.1.

I have no idea how this could work in 3.5.1, because the editor code does not contain instructions for exporting custom properties, so I had to add them in 3.6.0.

To clarify, are you speaking of Custom Properties or of "Description"/"Name" property of objects?
#3362
Quote from: arj0n on Tue 30/11/2021 23:35:10
Game:
Resolution: 640x480, 32-bit true-colour
Total sprites: 1855 / 90000
acsprset.spr filesize: 63,2 MB

Results after compile:
None: game.exe filesize: 550 MB (576.947.304 bytes)
LZW: game.exe filesize: 138 MB (144.977.308 bytes)
RLE: game.exe filesize: 105 MB (110.966.094 bytes)

Could you post sizes of acsprset.spr after changing compression and compiling, not full game.exe?
Also, do you have an estimate on the total size of source sprites?
#3363
There have been such setting before, in the older versions of AGS, called "Play music on room load", but it has been removed in favor of using script commands.

Anything automatic (sound start/stop) in the current audio system tends to increase chances of unintended behavior conflicting with script, because it's unclear how to track such sound.
- If there are multiple music channels, how do you find the one where this "room music" is played on?
- If the "room music" was interrupted by something else (another music, e.g. played during an event), should it restart from beginning / restart from the same position / not restart at all?
- If the "room music" was stopped by a script command, then run again by a script command, should it be considered "same" music or a different one that engine should not stop on room exit now?

If there were a concept of "sound instances", where a playback is an object, that is explicit, may be addressed and tracked, that perhaps would be simplier to handle.




Note that it's relatively simple to script such system for your own game case. Imagine you add a custom property to rooms, called "RoomMusic", you may then use on_event in a global script to catch room enter/leave events and handle this "room music", for example:
Code: ags

AudioChannel *roomMusic;

function on_event (EventType event, int data) {
    if (event == eEventEnterRoomBeforeFadein) {
        int music = Room.GetProperty("RoomMusic");
        if (music >= 0) {
             roomMusic = Game.AudioClips[music].Play();
        }
    } else if (event == eEventLeaveRoom) {
        int music = Room.GetProperty("RoomMusic");
        if (music >= 0) {
             Game.AudioClips[music].Stop();
        }
    }
}
#3364
Quote from: nightmarer on Mon 29/11/2021 14:32:20
Not sure from which build started, but I will provide you a video.

Actually, I've been testing some of my own games, and it looks like similar thing happen if you have a room without any imported background, then there's a 320x200 magenta rectangle drawn instead of regular black one.


Meanwhile, I made an experimental build that lets select a "LZW" compression for sprites:
https://www.dropbox.com/s/d51t7xnmnwfkzh8/ags-3.6.0--experiment-spritelzw.zip?dl=0
it replaces regular "Compress sprites" option to "Sprite compression type", which has None / RLE (current) / LZW.

Could you check that out and see what difference does this make to your game sprites? I tried this with my games, but the effect was kind of small (but my largest sprite file is around 15 mb).
NOTE that it's best to use this on a side copy of a project, not the main one.

If this does not help much then I may look into adding Deflate (compression used by PNG) or else.
#3365
Quote from: nightmarer on Mon 29/11/2021 11:46:39
There where is empty background before it was black, and now it is pink/purple. This purple screen starts as soon as there is a fade in. Maybe it is showing the alpha layer as purple, when it should be invisible.

Is the "fade" layer itself purple, or something behind it? Do you use standard fade effect, or other methods, like gui with changing transparency?
Could you record a video of what is happening?
Do you know approximately since which build this started?
#3366
Quote from: nightmarer on Sun 28/11/2021 23:32:28
Any update about the PNG compression for this new version?

If you mean changing the compression method for the game sprites, there were no actual plans for this within 3.6.0.

EDIT: ags currently has a ready support for LZW compression which is used with room backgrounds for some reason. It might be curious to experiment also using this with sprites (optionally, if certain setting is on) and see what compression ratios it can achieve and what will be a perfomance impact.

Quote from: nightmarer on Sun 28/11/2021 23:52:42
BTW I see at the beginning of my game that the black background, which it was blac at 3.5.1 now is pink.
After that everything is fine.

Do you mean the room's background, or before the first room fades in? Does this depend on the graphics driver selection?
#3367
Updated to Alpha 13
(use download links in the first post)


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


Multiple Speech VOX support

Editor now packs alternate speech voxes, by scanning the top-level directories inside the "Speech" folder. For each top-level subdirectory It creates a sp_[name].vox where [name] is the lowercase subdir name.

For example, if you have this in your game project:

- Speech
- - Francais
- - MyLang

The editor will create following voxes:

- speech.vox (with top-level files from the root "Speech" folder);
- sp_francais.vox (with top-level files from "Speech/Francais");
- sp_mylang.vox (with top-level files from "Speech/MyLang");


Engine supports switching to a different speech vox anytime. To order so, there's a new script function Game.ChangeSpeechVox(string name), where you pass the "[name]" part of the vox filename. E.g. if you have sp_francais.vox then do Game.ChangeSpeechVox("francais"). For default speech.vox pass empty string. The new readonly property Game.SpeechVoxFilename returns current vox name. This works in similar fashion to the functions that control translations.

Note that speech vox selection is not tied to the current text translation in any way, so you may switch both text and voice to the same language, or switch them to different languages to have e.g. French voice-over with English text.



Other changes:

Editor:
- In the "Import TTF" dialog added a choice to import the size closest to the given pixel height (because TTF's point size does not 1:1 correspond to the size in pixels).
- Default config is now saved also when the game is run in debug mode (F5). This ensures that the test run is using the latest Default Setup, if the user's config has not been created yet.
- Editor no longer errors on empty translations when compiling the game.
- Editor now exports values of the string type Custom Properties to translations.

Engine:
- Engine no longer bails out with error if the chosen translation cannot be loaded on startup.
- Fixed previous music was not gradually lowering volume when crossfading (regression in 3.6.0).
- Fixed game window becoming non-resizing after switching from fullscreen (regression in 3.6.0).
#3368
Quote from: Chomba on Sat 27/11/2021 23:46:10
I think one way to make the change (rough, but it would be a way) would be inside AGS itself, generate an empty script and paste all the text from your translation file.

You use the replace text tool and put:

Replace: &
with: &100000

Well, you do not need to copy anything into AGS, the text editor you're using to work with translation files can do same.

Quote from: Chomba on Sat 27/11/2021 23:46:10
This is a way of doing it "by hand" and making a control of it at the same time... I can't think how to automate it (I have no coding knowledge).

You could ask someone who knows e.g. Python, this must be a trivial thing to script a for loop that skips odd lines and replaces text pattern; and you no longer will have to do this by hand.

I.e.:
- for each odd line
-- if starts with "&"
--- parse "number" after the "&"
--- write next (even line) as ("&" + "number + 1000000" + "text")
-- else
--- write empty line next

#3369
Quote from: Chomba on Sat 27/11/2021 23:12:25
We will name the English audio as ROGE1 and the Spanish one as a variant that we will never get to, as ROGE1000001 (there has to be a number before the 0, otherwise it will read it as just the number 1).

Yes, I believe this might work (this is the variant 2 i mentioned in the post above).
Note that this may be automated to save a huge amount of time by writing e.g. a Python script, as mentioned in my comment too.

On a side note, i only recently noticed that numbers over 9999 are available since AGS 3.5.0 (this limit got fixed by some unrelated change).


#3370
Wanted to bump this, to note that there's a multi-VOX solution coming into AGS 3.6.0 soon (at the time of writing this), where editor supports building several speech voxes using subfolders inside a Speech folder, and engine can switch between multiple speech voxes freely using new script command.
#3371
I dont think that's the problem with popups themselves, but rather with designing a system that uses these popups (and *that* may not be easy, perhaps even regardless of the engine).

My advice would be to first chart your gui system on paper, defining how does it work in principle. Then it will be easier both to explain what do you need, and to find out how to make it in AGS (or anywhere else).
#3372
Something I have not tested myself:

1) Do GetTranslation() only on the final string result, after all the appends.
2) in TRS have the full line as long as it takes, because TRS/TRA files don't have these limits afaik.

I suppose this could work, because engine cares only which line is sent to GetTranslation, and which line is in TRA.

But even if this works, idk how more or less convenient this may be though.
#3373
Quote from: Stranga on Tue 23/11/2021 22:18:56When I export my translation files it seems to skip property strings (i.e item/hotspot/character ect. properties), is this a new thing? I can't exactly remember If it did before.

Does this work in the previous versions (3.5.1 and earlier)?
In any case, I think they should, as someone may want to translate them using GetTranslation function.

EDIT: yes, this is very strange, but string custom properties were never added to translation. I checked ancient AGS 3.2.1 with the same result.
I believe this should be fixed. Temporarily the 2 workarounds I see is to either add these strings in script in a random place, or place them in TRS by hand.
#3374
Do people read "tips of the day"? I did not even remember that AGS has this thing... how useful it is?

imho it might be best to have proper articles in the manual.
#3375
Quote from: manu_controvento on Mon 22/11/2021 14:55:54
and it is not easable using the GetTranslation every time, because of the huge amount of text

Could you elaborate on this, why GetTranslation is difficult to use?
#3376
Quote from: Mølck on Mon 22/11/2021 11:45:24It still requires some extra maintenance with those int parameters though. Maybe I'll add some global variables to hold these int values.

AGS has few of methods of defining global constants:

1) #define - creates a macro
Code: ags

#define MY_VAR 100

advantage: can be anything, even a line of code
disadvantage: type is guessed from the value, if used incorrectly error messages may be confusing.

2) enum - creates a list of values
Code: ags

enum CallRoomID
{
    eCallRoom_DoThis,
    eCallRoom_DoThat,
    eCallRoom_AnotherThing
};

advantage: groups constants together, can be used as a variable/argument type in your custom functions.
disadvantage: only integer.

3) Regular global variabes, that are initialized once and never changed.
advantage: can be any type;
disadvantage: there's no prevention from changing it.
#3377
I think the simpliest fix would be to go to the path displayed in this message and delete "user.config" file.
#3378
Quote from: Peegee on Sat 20/11/2021 15:56:38
Yes I put this:    if (Region.GetAtRoomXY(player.228, player.173) == region[7])
But the program doesn't take it.

You seem to misunderstand, the proper way was to do literally
Code: ags
if (Region.GetAtRoomXY(player.x, player.y) == region[7])


The point is that you ask engine to check which coordinates player character is at. You don't have to know these coordinates yourself.
#3380
You also need to test whether globalBGM is null, because it will start as null:

Code: ags

if ((globalBGM == null) || !globalBGM.IsPlaying)

this is saying: do if globalBGM was not assigned OR was assigned but not playing anymore.
SMF spam blocked by CleanTalk