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

#61
There is a special type of GUI for text box in terms of 9-slice - you set the 4 corners and 4 edges and the background and AGS will resize it accordingly when drawing the textbox. The property in general settings is for this use.

It seems this is not what you want.

You have a specific area on the screen and would like to always use that, and not have the box to be dependant on any character position. Is this what you want?
#62
A note on translation files, I believe it now uses the PO format.
#63
@edmundito I think https://github.com/adventuregamestudio/ags/issues/2427  would need to be done before that one - there may be a mix of having int instead of float for that.
#64
When doing this with room objects they may still be clickable.
#65
I see you using the word "Opaque" a lot, and so more making a note here to remind me when making docs, alpha is actually a measure (or a value?) of Opacity. Throughout AGS Script API we use Transparency, which is the inverse. A 100 value of Transparency is a 0 value of alpha.

Also with alpha in the color a lot of things that used to be blit can't be blit if the alpha is not 255.
#66
We could use the plain int approach, this could work nice with the hex assignment. 0xaarrggbb or 0xrrggbbaa or just 0xrrggbb depending how the colors are thought through.
#67
@Baguettator can you make a small game and project that has the same lines issue and share the project here?

Also, does the issue happens with all three graphics drivers (D3D, OGL, and Software)?
#68
Two things often appear when I use the VS Profiler in the AGS Engine when I am trying to do something visual (like the recent Particles script module)

  • Engine Script API calls
  • BitmapToVideoMemory methods

Other than this for some reason loops in AGS Script feel slower than they should, but these don't appear when profiling.

The Color having to be fast is an issue only in one place, which is the DrawingSurface.DrawingColor property, which is critical for doing fun effects!

I guess we could try the plain int approach and see how that works.

Whatever is done has to be throughly tested in the hard case that is a game with a linear interpolation, to see if the border of sprites are affected since the ticket with all the changes written impacts how sprite importing would happen.
#69
@homelightgames  that is beautiful! Thank you so much! I will try to tackle an idea I had for this using your images. ❤️ 8-) ❤️
#70
I mentioned in the ticket, what if we do that Color managed struct, all these properties are now this type, and things that need color properties would instantiate these managed structs and hold a reference internally. Then we can either make these readonly (so people must use the properties) or handle the pointer assignment as way that only copies the values (but not the pointer, or people could pass the same pointer to multiple properties and get confused when changing one property change another).

Then we could do obj.Color.RGB = 0xRRGGBB or obj.Color.ARGB = 0xAARRGGBB (or obj.Color.RGBA = 0xRRGGBBAA, and however we handle it, we hide it internally (including any mask color necessary).
#71
@homelightgames that is beautiful. Yes, the SVG file would be helpful.

Also can you additionally render two pngs, one that is only the background and other that is only the cup with a transparent image?
#72
I have some thoughts on this in general... No conclusion though.

  • Dynamic Sprites are dynamic in two dimensions: they can be loaded dynamically, but also their content modified
  • Sprites (static?) can be unlocked, this mean unloaded and reloaded, but their meta information in maintained
  • There is an array of sprites for their width and height
  • There is no "Dynamically loaded" sort of sprites, meaning ones that their content is not modified - so that they could be unloaded from memory but keep the PATH information, and reloaded on game load without storing their content on save-games
  • Sprite ID is an unique integer but not an index
  • Sprite ID is stored in objects (Button Image, object graphic, ...)

Now looking at the Dynamic loaded AudioClip idea

  • They look like their content is not meant to be editable, so they could not save their contents on the save and just the path, and reload on game load
  • The dummy audio clip idea could be static, so in case of a failure, one could still just compare the pointer to this dummy, and if it matches it doesn't need to check for validity
  • A validity may be needed if these clips are not locked in cache - meaning they can be unloaded at any time
  • The ID in audio clips is an unique integer
  • The ID in audio clips is also an index
  • The ID in audio clips is also stored as property of other things (ViewFrame, ...)

So the ID in audio clips being also an index is curious, and then there is the situation of AudioClipCount. I think AudioClipCount is meant to be something used to iterate through all AudioClips - perhaps you want to filter all of them, check what is of music type and throw them in an in-game music test menu or game radio.

Now the issue of iterating though things is AGS (Script?) doesn't have good ways of iterating through things, other than using a "for" - and even the "for" is recent, we used to only have while, until a few years ago.

So it seems some way of iterating through AudioClips that would set a starting condition and other to get the next (until you get a null) would be the way to go - and the initial condition could then even set this iterator to only iterate through some specific type, or at a specific order. I don't have a good idea for this API or its naming. But going this route I guess AudioClipCount would be removed.

Edit: or other iteration method. This is meant for option 3.
#73
If you drive a car, and have been stuck in traffic you understand the concept that you ARE traffic.

The panel isn't "yours". You used the same wording in the first post too. This is a community, you are participating in the community, the panel is ours. It's a better conversation to discuss what do we want for our panel.

I understand there's a balance in motivating the game developers to continue creating games, and there's also a way for players to evaluate what to play. There may be more things that are subtly or perhaps unconsciously taken into consideration.

But I don't think approaching like you are some external entity is constructive.
#74
Saying the word "your" says more about you than anything.
#75
Critics' Lounge / Re: AGS Splash Screen Image
Thu 02/01/2025 04:31:42
Made an AGS Script module version of this sprite.

splash.ash
Code: ags
// splash module header

import void ShowSplash();
import void HideSplash();

splash.asc
Code: ags
// splash module script

String _DecompressRLE(String rle)
{
  String result = "";
  int i = 0;

  while (i < rle.Length) {
    int currentChar = rle.Chars[i];
    i++;

    // Extract the numeric value (length of repetition)
    int k = i;
    while (k < rle.Length && rle.Chars[k] >= '0' && rle.Chars[k] <= '9') {
      k++;
    }    
    String countStr = rle.Substring(i, k-i);
    i = k;

    int count = countStr.AsInt;

    // Repeat the character and append to result
    for (int j = 0; j < count; j++) {
      result = result.AppendChar(currentChar);
    }
  }

  return result;
}

DynamicSprite* _CreateAGSSprite(bool tiny)
{
  String rlebmp = "w49b3w36b1w5b1w2b1w131b1w3b1w19b1w10b1w4b1w5b1w6b1w2b1w124b1w5b1w1b2w2b3w2b2w3b4w2b3w2b3w4b1w2b1w2b1w1b2w1b4w1b1w124b1w5b2w1b1w1b1w2b1w4b1w4b1w2b1w2b1w1b1w2b1w4b1w2b1w2b1w2b1w3b1w2b3w122b1w5b1w4b4w2b3w4b1w2b4w1b1w2b1w4b1w2b1w2b1w2b1w3b1w2b1w2b1w121b1w3b1w1b1w4b1w4b1w2b1w4b1w2b1w4b1w2b1w4b1w2b1w2b1w2b1w3b1w2b1w2b1w122b3w2b1w5b3w2b4w4b1w2b3w2b3w5b2w1b2w2b3w3b1w1b1w2b1w846e10w4k11w4k5w2k6w3k12w2k11w4k13w2k5w2k6w2k11w5k12w49e10w4k11w4k5w2k6w3k12w2k11w4k13w2k5w2k6w2k13w3k12w48e13w2k13w2k5w2k6w2k13w2k13w2k13w2k5w2k6w2k13w2k13w48e5w2e6w2k5w2k6w2k5w2k6w2k5w10k5w2k6w6k5w6k5w2k6w2k5w2k6w2k5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a2w7a3w6e13w2k5w2k6w2k5w2k6w2k5w3k13w67a1w1a27w1a2w7a3w6e13w2k5w2k6w2k5w2k6w2k5w3k13w67a1w1a27w1a2w7a3w7e12w2k5w2k6w2k5w2k6w2k5w4k12w67a1w1a27w1a2w7a3w139a1w1a27w1a2w7a3w139a1w1a27w1a2w7a3w139a1w1a27w1a2w6a4w7e12w2k13w2k5w2k6w2k11w4k5w4k10w54a1w1a27w1a2w2a8w7e12w2k13w2k5w2k6w2k11w4k5w4k10w54a1w2a26w1a2w1a9w6e13w2k13w2k5w2k6w2k13w2k5w3k13w52a3w4a22w1a2w1a8w7e5w14k5w6k5w2k6w2k5w2k6w2k5w3k5w2k6w52a7w4a18w1a2w16e5w14k5w6k5w2k6w2k5w2k6w2k5w3k5w2k6w55a8w4a14w1a2w16e11w8k5w6k5w2k6w2k5w2k6w2k5w3k5w2k6w59a8w4a10w1a2w16e11w8k5w6k5w2k6w2k5w2k6w2k5w3k5w2k6w64a7w4a6w1a2w17e12w6k5w6k5w2k6w2k5w2k6w2k5w3k5w2k6w68a7w4a2w1a2w23e6w6k5w6k5w2k6w2k5w2k6w2k5w3k5w2k6w72a7w3a2w23e6w6k5w6k5w2k6w2k5w2k6w2k5w3k5w2k6w77a7w16e13w6k5w6k13w2k13w2k5w3k13w81a3w16e13w6k5w6k13w2k13w2k5w3k13w100e11w8k5w7k10w4k11w4k5w4k10w54";
  String dtabmp = _DecompressRLE(rlebmp);
  int dtabmp_w = 181;
  int dtabmp_h = 56;
  int cmap[] = new int[128];  
  cmap['w'] = 65535;
  cmap['k'] = 65536;
  cmap['b'] = 10565; // gray
  cmap['a'] = 25823; // light blue
  cmap['e'] = 8629;  // blue
    
  DynamicSprite* spr = DynamicSprite.Create(dtabmp_w, dtabmp_h, true);
  DrawingSurface* srf = spr.GetDrawingSurface();
  
  
  for(int i=0; i<10137; i++)
  {
    int color = cmap[dtabmp.Chars[i]];
    srf.DrawingColor = color;
    srf.DrawPixel(i % dtabmp_w, i / dtabmp_w);
  }
  srf.Release();
  
  if(tiny)
  {
    spr.Crop(0, 10, 60, 46);
    return spr;
  }
  
  int ox = 320/2 - dtabmp_w/2;
  int oy = 180/2 - dtabmp_h/2;
  
  DynamicSprite* spr2 = DynamicSprite.Create(320, 180, true);
  DrawingSurface* srf2 = spr2.GetDrawingSurface();
  srf2.Clear(65535);
  srf2.DrawImage(ox, oy, spr.Graphic);
  srf2.Release();
  
  return spr2;
}

void _DrawSplash(DrawingSurface *surface)
{
  DynamicSprite* aspr = _CreateAGSSprite(false);
  if(aspr.Width > surface.Width || aspr.Height > surface.Height)
  {
    aspr = _CreateAGSSprite(true);    
  }
  
  // Calculate integer scaling and preserve aspect ratio
  int scaleX = surface.Width / aspr.Width;
  int scaleY = surface.Height / aspr.Height;
  
  int scale = scaleY;  
  if(scaleX < scaleY)
    scale = scaleX;

  if(scale <= 0)
    scale = 1;
    
  int targetWidth = aspr.Width * scale;
  int targetHeight = aspr.Height * scale;
  
  if (targetWidth > surface.Width)
  {
    targetWidth = surface.Width;
    targetHeight = (aspr.Height * targetWidth) / surface.Height;
  }
  
  if (targetHeight > surface.Height)
  {
    targetHeight = surface.Height;
    targetWidth = (aspr.Width * targetHeight) / surface.Width;    
  } 
  
  int ox = (surface.Width - targetWidth) / 2;
  int oy = (surface.Height - targetHeight) / 2;
  
  surface.Clear(65535);
  surface.DrawImage(ox, oy, aspr.Graphic, 0, targetWidth, targetHeight);
}

DynamicSprite* _SplashSprite;
Overlay* _SplashOverlay;

void _CreateSplashOverlay()
{
  _SplashSprite = DynamicSprite.Create(Screen.Width, Screen.Height, true);
  DrawingSurface* surf = _SplashSprite.GetDrawingSurface();
  _DrawSplash(surf);
  surf.Release();
  _SplashOverlay = Overlay.CreateGraphical(0, 0, _SplashSprite.Graphic);  
  _SplashOverlay.ZOrder = 1000000;
}

void _RemoveSplashOverlay()
{
  if(_SplashOverlay != null)
  {
    _SplashOverlay.Remove();
    _SplashOverlay = null;
  }
  if(_SplashSprite != null)
  {
    _SplashSprite.Delete();
    _SplashSprite = null;
  }
}

// public interface

void ShowSplash()
{
  _CreateSplashOverlay();
}

void HideSplash()
{
  _RemoveSplashOverlay();
}
#76
Code: ags
 If (cChar2.FollowCharacter(cChar3));

This should be invalid code but it may be a leftover from old things in ags3 and we definitely should throw an error in there on ags4.

In 3.6.2 beta and forwards we added Character.Following.

https://adventuregamestudio.github.io/ags-manual/Character.html#characterfollowing

Other than this it would be interesting if you could explain more of what you are trying to accomplish.
#77
What does TextBox Font means?

AGS uses the font with ID 1 for speech by default, did you set Game.SpeechFont ?

This is briefly explained in Setting up the game manual section.

I wonder if having some setting in Game Settings would make it easier if someone only has one speech font in their game - I am used to switching them a lot, which is why I never thought about this before.
#78
Can you share a print screen of this specific font properties?
#79
https://cirrus-ci.com/task/4965409310375936

Hi,

The builds of AGS Editor and Engine for Windows have been built using Visual Studio 2015 for quite some time now.

I am upgrading the continuous integration to use Visual Studio 2022 instead to provide builds. This means when the AGS Editor requires a VC Redistributable it will now use a different one.

Please try the builds linked from the CI on here and check if they work the same in your computers. I only tested in a Windows 11 Sandbox, and it seems it worked there for me.

It would be nice to know if Editor and Engine are working in different Windows OSes too and also checking in different people machines.

Thank you!
#80
The fireflies in my game are in the region of the cat graves. Screen capture looks weird because of the way I had done an additional effect on top where each alternate frame has a different effect. :/
SMF spam blocked by CleanTalk