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

#1
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.
#2
Thank you very much!
#3
Hello.
I would like to personalize some Characters with some special features.
For example, I would like to add a bool variable which defines if the Character is alive or dead.
I don't know if it is posible to do that. I want to clean global variables to define this.
Which would be the better way of doing this in AGS?
#4
Quote from: Crimson Wizard on 14 Dec 2021, 00:19
This is strange. I might test this out myself, but in the meanwhile, would that work if you check ID instead?

i.e.
Code: ags

if (this.ID == Sara.ID) { anim_view = 242; }

With the ID is working. :)
But without it it doesn't.
#5
I use it like:
Code: ags
Sara: Bla bla bla bla.
option-on 1


this.Name is returning the right name of the character, but still is not entering in the "if" to change anim_view.
#6
Hello.
This script is not working. I have identified that the character is not being identified through the dialog.
Following your code I entered some more information for a few characters more.
I received an error "SetCharacterView:invalid view number(You said 0, max is 555)"
I display that anim_view is not changing the number, as it is not identifying the character from the dialog, or at least is not matching the name of the character of the dialog with the real character with exactly the same name.
Which is the same problem I already had.

Code: ags
function MySay(this Character*, const string text) {
    // Starting up
    int anim_view;
   
    if (this == Sara) { anim_view = 242; }
    else if (this == Kovacs) { anim_view = 526; }
    else if (this == Mel) { if(Mel.View == 548) {anim_view = 467; }}
    Display("%d",anim_view);
    // Running speech
    this.LockView(anim_view); // lock to speaking animation
    this.Animate(this.Loop, 3, eRepeat, eNoBlock, eForwards);
    this.Say(text);

    // Ending
    this.UnlockView(); // unlock back to current view
}
#7
Quote from: Crimson Wizard on 13 Dec 2021, 02:16
First of all, this code looks wrong, because for proper behavior you need to call LockView, not ChangeView, before Animate (and then UnlockView). But I'm not certain what other actions are playing at the same time (are you also playing some portraits simultaneously? if this is what you've meant by "mushots"...)
It is running with changeview so far, but I will use lock if it is more correct. I meant "mugshots".

Quote from: Crimson Wizard on 13 Dec 2021, 02:16
In any case, my suggestion is to not start animation in the repeatedly_execute, but instead write a custom Say function that runs everything, and use that for speech.

If this is only for particular character / certain moments, then may use this function explicitly in dialogs. But if it's for all the characters in game, set up "Custom Say function in dialog scripts" in General Settings -> Dialog section: then this function will be used instead of Say to replace common dialog lines.

The example of how the function may look like:
Code: ags

function MySay(this Character*, const string text) {
    // Starting up
    int anim_view;
    if (this == Sara) { anim_view = 242; }
    else if (this == SomeoneElse) { anim_view = xxx; } // etc

    // Running speech
    this.LockView(anim_view); // lock to speaking animation
    this.Animate(this.Loop, 3, eRepeat, eNoBlock, eForwards);
    this.Say(text);

    // Ending
    this.UnlockView(); // unlock back to current view
}


Then it may be used like
Code: ags

player.MySay("text");
Sara.MySay("bla bla bla");

Thanks for the suggestion. I didn't know it was possible to set a custom dialog script.
#8
Hello.
The following code is in global script/execute always function.
It works to create animation for character when you are using mushots aswell, but it is not working when the character speaks inside a dialog,
it seems that the character inside the dialog is not detecting Character.Speaking function.

Code: ags
  if (Sara.Speaking && !Sara.Animating) {
    Sara.ChangeView(242); //Change to speaking animation
    Sara.Animate(Sara.Loop, 3, eRepeat, eNoBlock, eForwards);
  } else if(!Sara.Speaking && Sara.View == 242) {
    Sara.ChangeView(244); //Change back to walk animation
  }


Any idea about how to solve it?
#9
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)
#10
I guess that our sprites are pretty colored :)
#11
320x200, 32-bit true-colour
Total sprites in project:   35703 / 90000
PNG folder: 1,61 GB (1.734.822.663 bytes)

Sprite file compression:
None: acsprset.spr filesize: 8,77 GB (9.425.965.010 bytes)
Indexed: acsprset.spr filesize: 7,66 GB (8.229.703.633 bytes)
LZW: acsprset.spr filesize: 2,79 GB (3.005.119.147 bytes)
RLE: acsprset.spr filesize: 3,32 GB (3.565.176.753 bytes)
#12
Quote from: nightmarer on 29 Nov 2021, 14:32
Not sure from which build started, but I will provide you a video.
BTW I sent you the videos through Discord
#13
Ok I see, what it needs to be changed.
LEH 3.481.618 KB - I had this one selected
LZW 2.934.687 KB
#14
Quote from: Crimson Wizard on 30 Nov 2021, 02:10
Quote from: nightmarer on 29 Nov 2021, 14:32
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.
I'm afraid it didn't change the size of the asprset.spr. Do I need to do anything or just run it?
#15
Not sure from which build started, but I will provide you a video.
#16
Quote from: Crimson Wizard on 28 Nov 2021, 23:56
Quote from: nightmarer on 28 Nov 2021, 23:32
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 rates it can achieve and what will be a perfomance impact.

Our sprites are 1,6 GB and our acsprset file is 3,4 GB. It is a shame that our game is going to be so huge in disk space.

Quote from: Crimson Wizard on 28 Nov 2021, 23:56

Quote from: nightmarer on 28 Nov 2021, 23:52
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?

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.
#17
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.
Any reason for that?
#18
Hello all.

Any update about the PNG compression for this new version?

Regards.
#19
I see, then I don't have too much to do.
#20
Hello.

My global script is growing and growing, and now it is so long that it is really difficult to read.
How it would be the best solution to keep all the Character and inventory interactions in separated scripts?

Regards.
SMF spam blocked by CleanTalk