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

#301
Flappy bird is not a platformer, but it's side scroller.

Essentially you have only collision handling and the little physics that goes in the bird is isolated from other elements so it's really simple to implement.

The level, you should think about it in small pieces, like say each up and down pipe plus any elements in between, and then you can either use functions to instantiate this sequence of pieces from a description as they pass or use some variation of it for random generation as they pass.

I think for it you could use a screensize room and use room overlays for the game pieces, and then handle the collisions yourself in script - simple AABB collision would probably work fine.
#302
Ok, I finally bought something, but it hasn't arrived yet. After looking around a lot I found a place online selling a new and in the box with warranty and everything, Lenovo Thinkpad Gen 2 X13, which is 13 inch and apparently it weighs around 1.2 kg, which is light enough. I looked around and there are a few variations of this laptop, and I couldn't completely be sure which exact version of it is, but it should arrive here by Friday and then I will check it out. It appears at least the wi-fi and SSD are not soldered and that the bottom plate of the laptop is easy to remove. I know Lenovo is also Chinese, but it's a big brand that has proper local support here.

I wanted really to try the smaller form factor Chinese brands but they are just too expensive here - even the Chuwi Minibook X here was more expensive than a Lenovo notebook.

I know the particular model I chose is a bit older but the current ones available here are at a minimum 14 inch screen, weight slightly more and have internals that are harder to open - price wise they are the same, but they were less portable than what I wanted.

Anyway, I can't wait to be mobile again as I currently only have either desktop computers or notebooks with dead battery and keyboards...
#303
So, it's been a while now that my ASUS ZenBook (2018) has died on me - well, it's battery and keyboard died and I can use it as a local desktop. It's screen also isn't in good shape... I also had a different ASUS notebook (2019, with Nvidia) that died (battery and storage), and a Dell Latitude (from 2022) (touchpad and then everything...). I had an old LG before that I had the storage die, but I replaced and then battery and one day I accidentally broke the power connector...

I have a MacBook that has been going strong, and while I am happy with it, I have been thinking about getting something smaller and more portable - and apparently Apple discontinued the 11 inch MacBooks. The problem is what, since apparently smaller notebooks are not a thing anymore. I wanted something that could run Windows so I could run Visual Studio and run and test C++ and C# code for Windows. Because I don't have anything currently I can only code when I am both at home and also haven't got absolutely anything else going on here...

With all that said, I've started to look into some chinese notebooks that apparently kept the netbook dream alive. So I looked at the Onemix 4s (and some others from the same maker), the OneGx1, the Chuwi Microbook and the GPD Pocket 3.

Now from all of these, it looks like the Onemix and others from the same manufacturer there are quite a few manufacturing issues reported online, but the people who got well functioning units apparently really like it, but also it has a usbC charging port that isn't actually usbc, it just reuses the connector so if you accidentally plug a different charger there it does... The OneGx1 I couldn't get any information online and it's very expensive here - it's like twice the price of an average MacBook.

The Chuwi Microbook looks super interesting, the size appears to be good, it's not expensive (only 370 USD) but apparently there isn't many people that bought it yet so I can't find much information online.

Now the GPD Pocket 3 is looking very appealing currently, it has an Intel Gold 7505 version that was released this year before the new GPD Pocket 4 release. There is more information here... Anyway I am thinking about if I should get it or not. It's around 700 USD

There is also a version of the GPD Pocket 3 with i7 1195G7, which is a much better processor, but then the device goes to 1000 USD price, which is a much bigger price and I find it harder to justify it - gets dangerously into get a MacBook and try to run Windows on QEMU territory...

For comparison from a reputable brand, the closest I found in size is the ASUS 2024 Vivobook Go 11.6", which is much cheaper, at 240 USD, but the problem is it's configuration is terrible, at 4 GB RAM, while the GPD Pocket 3 has 16 GB RAM.

Anyway, does anyone of you here have any of these small laptops? Or is there some other model I am forgetting?

I really can't go with iPad or an Android tablet because they can't run Visual Studio which is a big deal breaker for me - I can't actually make anything without it... I can need for agsing...

Anyway, curious if someone has opinions on this - like, perhaps I should just get the regular ThinkPads... I don't know if they still make them small.
#304
Engine Development / Re: AGS engine Linux port
Sat 14/09/2024 21:25:36
It's that but I think it should work without sudo.

But if you intend to ship the game to someone else after only doing that you need to use something like tar.gz that would preserve the executable bit flag.

If you are shipping without packaging using something like Steamworks , then I believe Steamworks defaults to 755 for all files - alternatively you can specify using it's packaging language.
#305
You have to use CustomDialogGui. DialogGuiOptions[option] attribute to set the options. I don't know how did you change the size there in the dialog but the correct way is to use the options. You can either directly set the size there or set the minimum and maximum for either or both width and height and turn on the width and height calculation by setting them to 1 - 0 turns them off to revert to manual calculation.

I guess that a picture isn't worth a thousands words alone, sometimes you need to show the code of what you did.

(I wrote a more detailed explanation before but the forums ate my answer...)
#306
@DiegoHolt in ags4 you can just set the GUI to the scale you want - but we haven't yet made a manual for it... Ags4 is still in development though and it will have breaking changes between versions.

I think in ags3 the easiest approach is to just make your GUIs at the proper size.

About text you can create a new font and make it a different scale - I don't remember the details of the font panel because I don't use very much. I think it's Size Multiplier: https://adventuregamestudio.github.io/ags-manual/EditorFont.html

Anyway, then you go to your GUI and set the labels and buttons to use this new font you created there.
#307
@DiegoHolt this is not a plugin, it is an exported Script Module. A Script Module is a pair of Header and Script files that can be imported in your AGS game project through AGS Editor.

In your project explorer, you click in the Script entry there that should contain all your script modules, including the GlobalScript and right-click it and select import module, then click on the SCM file from here whenever you downloaded it.

There's an entry on this in the manual here but it's very minimal, feel free to suggest improvements

https://adventuregamestudio.github.io/ags-manual/ScriptModules.html#managing-modules
#308
Just to confirm, you want to make this game: https://branegames.itch.io/we-suspect-foul-play ?

And yeah, there's definitely some way to code a way to retrieve giving a position, which token is there - and then you can add a new tag, say "label" or "region" (need to figure a name) and then you can check to which label/region the token would belong, assuming you mark the interesting things using that. You still would need to handle the drag and drop separately, you would just render that token when it would be there - say there's a "visible" tag you could pass 0 to not render that text after the player had dragged off the text.
#309
Hey, if you name all your views in the Editor as VIEW_NAME, where name is what you want, say VIEW_CLARA_MAIN_CABIN, then you can type VIEW in the AGS Editor and it will show all views in the autocomplete. This should make it easier to know your views when you need one to input somewhere.
#310
I would prefer no spaces. Spaces are evil and should never exist, everyone should just speak in german.
#311
Hey @Snarky , first, thank you for using the module, you are my first costumer in three years.

Now, the miniparser I kinda wanted to remove since I thought it was badly designed and too buggy and wasn't making things easier to use at all - but this was my own experience as sole user and developer. I just used the regular parser when I needed.

Now about the tab issue thanks for the explanation I filed an issue in the repository and will look into fixing it.

I guess I probably should bring the tap module and update the CI of it and add a bunch of json tests there.

Anyway, this may take a little bit I will get there, sorry for the wait.
#312
Cool :)

Also the forums use a thing called BBCode for the messages which uses tags, which can be interpreted differently depending on exact forum implementation, but the gist is the following

Code: txt
A tag uses a pair of "[" and "]" characters to contain some content inside (usually the first part is the "tag name"

A tag that modifies text is paired with another with same name and a "/" character before "tag name", usually referred as closing tag.

So something like [tagname]some text[/tagname]

This is why your quote usage didn't work, you used a pair of closing quote tags so the forums can't parse and understand where the text that you want to mark as quote began and ended. It should be something like:

Code: ags
[quote]a text that is a quote[/quote]
#313
Code: ags
 if(cEgo.x == oThingy.x && cEgo.y == oThingy.y)

This should never be done, there's no guarantee that the character will reach an exact position - I see this in many many things. Beyond this relying on the walkable areas making sense, there's also the issue of things being solid. Things should have a point for where the character "goes" but you should test only if the best effort was done (is somewhere around the area and finished their walk).

I think you would probably not do this in an actual game but someone with less experience may look at this and think this would actually work.
#314
First the best answer was provided by @Snarky here: https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/what-s-the-least-inelegant-way-to-have-two-characters-speak-at-once/msg636665461/#msg636665461 .

I don't write on the forums because I talking here, it's just the most constructive way to advance the engine and related things I can contribute when I only have my phone and am not home which is most of the time overall, but unfortunately my keyboard keeps eating what I write (you don't use phones but perhaps anyone else here using a multi language mobile keyboard at least understands that it constantly guesses the language wrong...). Anyway I am just trying to exercise the design of some solution of something since @Khris brought up that all existing modules are old and you already mentioned the proper solution would be co-routines. This exact issue of scheduling background conversation and actions has appeared in the forums over and over so I was just thinking that there has to be some strategy to script some somewhat general solution that could be packaged into a module.

Anyway, I will leave this discussion here and later see if I can throw some sketch in the advance technical later.
#315
I think only start and the update and finish can be the same as if it was called directly unless there's a situation I am not seeing.

I think I would have a Say command that is SayBackground and a SayBackground that is SayBackgroundBackground or need to figure some fake Join command that marks "we wait for things before this finish" and then this is accomplished by doing a quick preprocess of all commands to put the things in order and throw a proper wait max in there or something - assume we know the duration in loops of all things in background, then the "Join" preprocess would clean the wait time of things before and just throw a max there with the wait of things before.

Anyway, have a few ideas, but I wanted to work on other things this weekend so I will probably not have time to work on this idea - will let it sit until later...
#316
Imagine someone wants to use MySayBackground or BubbleSayBackground, this is why I think I would give out the say specifically and then let people do whatever - since it's the only way to do a callback I know.

Also using my command scheme you could even do If(string expression) Else() and End() to be completely do whatever in background, plus other fun commands - I wrote this in JS once in a custom engine.
#317
The thing about script modules for this is there isn't a clean way to pass your custom say function forward. So you would need to have a custom function to process the events that is meant to run in a loop under rep exec always to consume this and give out any say events so someone can overload them - perhaps passing one string for the background say plus some extra string for data in case the person's background say needs additional parameters.

I imagine it would be like a stack of things you push on top of the other...

Code: ags
// TO-DO: figure a better name
struct BgThings {
  Command* _stack[];
  void Say(Character* c, string message, String extra = 0);
  // ... other commands
};

void BgThings::Say(Character* c, string message, String extra)
{
  Command* cmd = new Command;
  cmd.Type = eCmdSay;
  cmd.Character = c;
  cmd.Text = message;
  cmd.Extra = extra;
  Push(_stack, cmd);
}

// ... Draw the rest of the owl

The problem is designing the API as I do this in a completely different way in real life so it would be easier if people could dream how this would work and imagine a few designs for this.
#318
@Shiloh can you share copy of the video that causes the issue or make one that has the same issue and share a link to it here or through dm? It would make it easier to debug.
#319
A simple way to spot this would be to print that value to the log

Code: ags
System.Log(eLogInfo, "dialogoRandom: %d", dialogoRandom);
#320
@Shaneaphone here's an example of what my idea of regions: ericoporto.github.io/public_html/sound_test/

In this example, the regions looks something like this

Spoiler
[close]

The room script code looks like this

Spoiler
Code: ags
// room script file

// General idea, we are going to create a circle around the player 
// with the camera height as diameter and then we will figure how much from
// the circle is made of each region
// we will then attribute some volume for each thing in each region 
// and then we will use this and some lerping to set the volume for each audio track
// remember to set the audio channel per type accordingly

// how many regions we care about, including zero
#define MAX_REGIONS 6

struct RegionAudioVolume {
  float Loopyloading, Fantasy, Temple, Waves, Clock;
};

RegionAudioVolume region_volume[MAX_REGIONS];

// >>>>>>>>>> IMPORTANT <<<<<<<<<<<<<<<<<<<<
void InitVolumesPerRegion()
{
  region_volume[1].Loopyloading = 100.0;
  region_volume[2].Fantasy = 100.0;
  region_volume[3].Temple = 100.0;
  region_volume[4].Fantasy = 50.0;
  region_volume[4].Waves = 100.0;
  region_volume[5].Clock = 100.0;
  region_volume[5].Fantasy = 60.0;  
}
// >>>>>>>>>> IMPORTANT <<<<<<<<<<<<<<<<<<<<

AudioChannel* acLoopyloading;
AudioChannel* acFantasy;
AudioChannel* acTemple;
AudioChannel* acWaves;
AudioChannel* acClock;

float _Lerp(float from, float to, float t)
{
  return (from + (to - from) * t);
}

float _FRandom()
{
  return IntToFloat(Random(8192))/8192.0;
}

Point* _RandomPointInCircle(int diameter)
{
  Point* p = new Point;
  float r = (IntToFloat(diameter)/2.0)*Maths.Sqrt(_FRandom());
  float theta = _FRandom() * 2.0 * Maths.Pi;
  p.x = FloatToInt(r * Maths.Cos(theta));
  p.y = FloatToInt(r * Maths.Sin(theta));
  return p;
}

#define CIRCLE_POINTS_CACHE_SIZE 8192
Point* _circle_points_cache[CIRCLE_POINTS_CACHE_SIZE];

void room_Load()
{
  oClock.SetView(VIEW_CLOCK);
  oClock.Animate(0, 4, eRepeat, eNoBlock, eForwards);
  player.PlaceOnWalkableArea();
  int circle_diameter = Screen.Viewport.Camera.Height;
  for(int i=0; i<CIRCLE_POINTS_CACHE_SIZE; i++)
  {
    _circle_points_cache[i] = _RandomPointInCircle(circle_diameter);
  }
  
  acLoopyloading = aLoopyloading.Play(eAudioPriorityHigh, eRepeat);
  acLoopyloading.Volume = 0;
  acFantasy = aFantasy.Play(eAudioPriorityHigh, eRepeat);
  acFantasy.Volume = 0;
  acTemple = aTemple.Play(eAudioPriorityHigh, eRepeat);
  acTemple.Volume = 0;
  acWaves = aWaves.Play(eAudioPriorityHigh, eRepeat);
  acWaves.Volume = 0;
  acClock = aClock.Play(eAudioPriorityHigh, eRepeat);
  acClock.Volume = 0;
  InitVolumesPerRegion();
}

// how many points to sample from the circle, less is faster but less precise
#define SAMPLE_POINTS 200

float[] GetWeightedRegions(int x, int y)
{
  float regions[] = new float[MAX_REGIONS];
  int x_limit = Room.Width;
  int y_limit = Room.Height;
  float increment = 1.0/IntToFloat(SAMPLE_POINTS);
  for(int i=0; i<SAMPLE_POINTS; i++)
  {
    int r_x, r_y;
    
    Point* p = _circle_points_cache[Random(CIRCLE_POINTS_CACHE_SIZE - 1)];
    r_x = p.x + x;
    r_y = p.y + y;
    if(!(r_x >= 0 && r_x < x_limit && r_y >= 0 && r_y < y_limit))
    {
      r_x = p.x;
      r_y = p.y;
    }
    
    Region* sampled_region = Region.GetAtRoomXY(r_x, r_y);
    regions[sampled_region.ID] += increment;
  }
  return regions;
}

float smooth_regions[MAX_REGIONS];

void CalculateWeightedRegionOfPosition(int x, int y)
{
  float regions[] = GetWeightedRegions(x, y );
  for(int i=0; i<MAX_REGIONS; i++)
  {
    smooth_regions[i] = _Lerp(smooth_regions[i], regions[i], 0.05);
  }
  //System.Log(eLogInfo, "0: %f, 1: %f, 2: %f, 3: %f, 4: %f, 5: %f", regions[0], regions[1], regions[2], regions[3], regions[4], regions[5]);
  System.Log(eLogInfo, "0: %f, 1: %f, 2: %f, 3: %f, 4: %f, 5: %f", smooth_regions[0], smooth_regions[1], smooth_regions[2], smooth_regions[3], smooth_regions[4], smooth_regions[5]);
}

void UpdateVolumesFromRegions()
{
  CalculateWeightedRegionOfPosition(player.x, player.y - 10);
  RegionAudioVolume total;
  for(int i=0; i<MAX_REGIONS; i++)
  {
    total.Loopyloading += smooth_regions[i] * region_volume[i].Loopyloading;
    total.Fantasy += smooth_regions[i] * region_volume[i].Fantasy;
    total.Temple += smooth_regions[i] * region_volume[i].Temple;
    total.Waves += smooth_regions[i] * region_volume[i].Waves;
    total.Clock += smooth_regions[i] * region_volume[i].Clock;    
  }
  
  System.Log(eLogInfo, "L: %f, F: %f, T: %f, W: %f, C: %f", total.Loopyloading, total.Fantasy, total.Temple, total.Waves, total.Clock);
  
  acLoopyloading.Volume = FloatToInt(total.Loopyloading);
  acFantasy.Volume = FloatToInt(total.Fantasy);
  acTemple.Volume = FloatToInt(total.Temple);
  acWaves.Volume = FloatToInt( total.Waves);
  acClock.Volume = FloatToInt(total.Clock);
}

void repeatedly_execute_always()
{
  UpdateVolumesFromRegions();
}
[close]

There is probably some saner way to do this and someone else can figure some pretty way to package as module. In my case I usually play with sound differently in any chance I can because it's fun, you can do hackery and it usually sounds alright.

Here's is the example game project: TestSound.zip

I recomment running it and playing with the volume values at the top of the room script to get a feel of it.

The way it works is it samples some somewhat 200 random points in a circle that has a diameter equal to camera height and then averages the region of each point and then uses this average to adjust the volume of all the running audio clips. Then you just draw regions that make somewhat sense to how you want the room to sound (since you know you are sampling a circle you can just set a brush in your favorite image editor to have matching size to get a by the eye idea of how things will sound in different places).
SMF spam blocked by CleanTalk