AGS 3.6.0 WIP (Alpha 21) - SDL2-based engine + Unicode support

Started by Crimson Wizard, Thu 25/03/2021 02:28:54

Previous topic - Next topic

arj0n


Crimson Wizard

Here's a new experimental build:
https://www.dropbox.com/s/d51t7xnmnwfkzh8/ags-3.6.0--experiment-spritelzw.zip?dl=0

PLEASE NOTE: you may will have to make a new clean copy of your project to open in this build, because experimental settings changed again. Also do full rebuild at least once to ensure sprite file is recreated with correct settings.

* Can select "Indexed bitmap" method separate from the compression, which allows to mix these. The new option in settings is called "Save sprites as indexed bitmaps when possible" (True/False, default is True). So you may do both "Save sprites as indexed bitmap..." and some compression (None / RLE / LZW).
* The "indexed bitmap" method now does two attempts: first tries to make 256-colored palette with alpha, if failed then tries to make palette without alpha and if second succeeded then writes an indexed bitmap with an accompanying alpha channel. This essentially stores 32-bit sprite in 16-bit: less efficient but may still give x2 decrease in size if lucky.
* Slightly improved RLE compression, may do better by like couple % (not too important, but should mention this).



Quote from: arj0n on Thu 02/12/2021 21:35:51
My 32-bit background sprites seem to have a max amount of only about 17 different colors in them.

BTW, is there a reason why your game is not 8-bit? In your old game remakes you might be able to only use 1 set of sprites and change actual palette to emulate palettes from various systems.

arj0n

Quote from: Crimson Wizard on Fri 03/12/2021 02:49:22
BTW, is there a reason why your game is not 8-bit? In your old game remakes you might be able to only use 1 set of sprites and change actual palette to emulate palettes from various systems.

Normally I do use the palette change for such old game indeed.
But this time it wasn't an option because:

  • what is depicted in the sprites (for ex. a mirror) is the same for amiga en dos but differs in the atari version.
  • the dos version uses a strange way of vertical lines to create an effect, a bit like shading
There are several differences like the location and shape of mirror, lamp & nightstand for example:
Spoiler

But when I tried to go for an 8bit version for my project, I failed to get a normal result for the room bg after importing an 8bit version of the background sprite.
Here a test using a new clean project importing a 8bit room bg image:
Spoiler

AGS basic settings:
Spoiler


arj0n

Quote from: Crimson Wizard on Fri 03/12/2021 02:49:22
Here's a new experimental build:
https://www.dropbox.com/s/d51t7xnmnwfkzh8/ags-3.6.0--experiment-spritelzw.zip?dl=0

indexed bitmaps true
none: 118 MB (124.645.394 bytes)
rle: 9,24 MB (9.693.772 bytes)
lzw: 16,0 MB (16.871.106 bytes)

indexed bitmaps false
none: 475 MB (498.297.296 bytes)
rle: 29,5 MB (31.035.907 bytes)
lzw: 63,2 MB (66.327.162 bytes)

Crimson Wizard

Quote from: arj0n on Fri 03/12/2021 10:29:19
indexed bitmaps true
none: 118 MB (124.645.394 bytes)
rle: 9,24 MB (9.693.772 bytes)
lzw: 16,0 MB (16.871.106 bytes)

IIRC your raw sources were 6 MB, so indexed bitmaps + RLE give a pretty close result?

arj0n


nightmarer

Hello.
Here my files.

indexed bitmaps true
none: 7,41 GB (7.966.279.437 bytes)
rle: 3,23 GB (3.476.975.790 bytes)
lzw: 2,61 GB (2.811.194.259 bytes)

indexed bitmaps false
none: 8,77 GB (9.425.965.010 bytes)
rle: 3,31 GB (3.555.361.792 bytes)
lzw: 2,79 GB (3.005.119.147 bytes)

Crimson Wizard

Ah well, I see that indexed format does not help alot in your situation (effect is only noteable without extra compression).

Probably I'll add these new compression choices first, and then after check if the deflate (png's) compression will work any better.

At least LZW saves about 0.7 GB compared to RLE already.

TheNewSon

Any ETA for the stable release?

I'm so looking forward to adding all 9 languages into one single build for my prototype!!  :grin:

nightmarer

Any news about how the 3.6.0 is going to be released? I'm longing to change from 3.5.1 and enjoy the new features included.

Baguettator

Hi there !

Is the 3.6 version of AGS will allow to do something with the "length" of ListBox Items ? As far as I know, there is no option to "cut" the text, it always go outside the list box.

Of course, it could be perfect that AGS "remembers" the full length of the item, even if it's displayed not fully in the listbox. For scripting reasons, it could be nice ;)

Something like that is possible ?

Crimson Wizard

Hello.
Quote from: Baguettator on Tue 28/12/2021 18:59:36
Is the 3.6 version of AGS will allow to do something with the "length" of ListBox Items ? As far as I know, there is no option to "cut" the text, it always go outside the list box.

Of course, it could be perfect that AGS "remembers" the full length of the item, even if it's displayed not fully in the listbox. For scripting reasons, it could be nice

TBH I only recently realized that it's happening for some reason, never paid much attention to this before, I guess.

To be clear, none of the gui controls in AGS seem to clip their textual contents, and buttons only clip the image when certain property is set.
This is not right, afaik any normal GUI system clips the control contents to its size. I think it's possible to make this change for 3.6.0, maybe even unconditionally, because it looks weird. Unless someone has an idea of a good use case for non-clipping the text (which cannot be solved by also adding a label somewhere).
Of course this will have nothing to do with the actual text property, the clipping is a drawing operation that does not change the control's data but only affects its look.



Also, I'm sorry for not answering earlier -
Quote from: TheNewSon on Fri 10/12/2021 00:25:07
Any ETA for the stable release?
Quote from: nightmarer on Sun 19/12/2021 11:26:53
Any news about how the 3.6.0 is going to be released? I'm longing to change from 3.5.1 and enjoy the new features included.

I believe that the main bulk of changes is already complete (in fact it has much more than I initially planned, considering it also has a new render, audio & input backend based on SDL2). And I know that at least few people already made or are making their games with this (I recall seeing a 3.6.0 game in the AGS database).

But it's difficult to say when exactly the "final" release will be. Some of the new features may require polishing, and the version needs more testing overall.
Unfortunately the developers team is really small (there are like 2-4 people working at irregular times, and not all of them are working on this exactly version), so the only realistic solution is if the AGS community participates in testing.
I do regularily use the engine to run the games (not make ones), so may notice if some issue stands out, but frankly don't know how "stable" overall this is, and have to also rely on what other people report.

There are several known problems in 3.6.0, after fixing which I may release it as "Beta" to encourage more use and testing.

Crimson Wizard

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

Contains all the changes from 3.5.1 Patch 6.

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


Editor
- Added "Sprite file compression" option in General Settings, replacing "Compress the sprite file" option. The new option allows a selection of compression algorithm used for sprites. Currently supported: None, RLE (old default compression) and LZW.
- Added "Enable sprite storage optimization" option to the General Settings, that permits the editor to repack sprites in a different storage format, reducing their disk size whenever possible. This option may be used alongside with the sprite compression. Note that this does not change how the sprites work in game.

NOTES: RLE compression is best for the games with simple graphics without much detail. LZW works better than RLE when the graphics are detailed, especially with anti-aliasing etc.
"Enable sprite storage optimization" is best for games with low-res "old-school" gfx which use relatively small number of individual colors. Games with anti-aliased sprites with alpha channel will benefit less from this (or not at all). Having this option enabled does not have any consequences if sprite storage cannot be optimized, these sprites are simply stored as default, so it's okay to keep this enabled at all times (unless your tests show that game loading times became longer because of this).

Engine
- Fixed default black room backgrounds were displayed as magenta / "magic pink" (regression).

FanOfHumor

Does this version have 16 sound channels now?

Manu

Thanks again for the amazing work! I wish I knew more about Windows/.net programming to be able to help you.

One question, do you think it will ever be possible to customize the font size of the editor UI? Not the code editor, because you can zoom in/zoom out, but the right panel (Explore project and Properties) would be extremely useful!

Crimson Wizard

My plan in regards to 3.6.0 is currently this:

1. Fill in most noteable gaps in existing functionality; fix known issues with the base features, etc.
2. Release 3.6.0 as Beta version, and encourage people to use and test it more.
3. While in Beta stage, look if there are feature requests that are significant and don't require much changes to implement, and maybe do some.

For some time I hoped to bring 3.6.0 to almost finished state before the New Year, but somehow I got distracted and did not work much during the autumn months... So now I do not want to prolong its development further. It's been worked on roughly for 13 or 14 months now, so it's time to wrap up.



Quote from: Pajama Sam on Thu 30/12/2021 06:51:35
Does this version have 16 sound channels now?

Yes, it does for a while. All the additions to 3.6.0 are mentioned in the first post (a little disorganized list, but I will make a proper one soon).

Quote from: Manu on Thu 30/12/2021 10:19:10
One question, do you think it will ever be possible to customize the font size of the editor UI? Not the code editor, because you can zoom in/zoom out, but the right panel (Explore project and Properties) would be extremely useful!

Sorry, I cannot really tell, this is something to plan ahead and think through. Editor currently supports "color themes" (File -> Preferences -> Editor appearance -> Color themes), which recolor all controls. So I suppose similar method could be used to alter fonts everywhere. But we need to ask those who were working on this last time, maybe they have certain plans already (Chamber of Fear (persn on github) and Alan v. Drake).


Dave Gilbert

This is SO GREAT! Thanks, CW.

One small thing I noticed. You incorporated this feature where you can resize the sprite images in the sprite tab (which is fantastic!), but it's not implemented in the view tab as well. The test that eri0o created in the thread contained both. Is it possible to include the view loop resizing as well?

Crimson Wizard

Quote from: Dave Gilbert on Thu 30/12/2021 16:32:30
One small thing I noticed. You incorporated this feature where you can resize the sprite images in the sprite tab (which is fantastic!), but it's not implemented in the view tab as well. The test that eri0o created in the thread contained both. Is it possible to include the view loop resizing as well?

Ah, right, this was suspended because it also included the "sound" icon, but there has been an argument about how this icon should be positioned.
But it must be possible to only add the zoom controls alone for now. I'll try do that on the next update.

Dave Gilbert

Yay! Thanks so much. I wasn't aware about a sound icon, but I found the thread and that also sounds extremely useful!

FanOfHumor

I wanted to suggest a script that can modify a sound as the game is running.
Such as-

Code: ags

function object_AnyClick()
{
   Sound.Pitch=-or+ number;
}

or
Code: ags

function object_AnyClick()
{
   Sound.FadeIn=-or+ number;
   Sound.FadeOut=-or+ number;
}

or
Code: ags

function object_AnyClick()
{
   Sound.Reverse=true;
}

Do you think these things could be useful in some way. Or is this already a module or plugin?

By the way what you did with resizing in the sprite tab is fantastic.Now people with poor eyesight"like my brother" can make games that were impossible for them to see to make.

I would also like to suggest making the scripting text size adjustable in prefrences.

SMF spam blocked by CleanTalk