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

Topics - fratello Manu

#1
Hi everyone!

Is it possible to exclude from final game compiling all the "un-used" resources?
Use case: I want to create a "game series" which will share many common resources (characters, rooms, etc)
So I was thinking about managing all games into a single project, sharing all common resources and scripting separated plots, etc.

Is it possible to insert some "tags" in code to define a part which belongs only to a certain game?
In order to avoid including also the un-used resources while compiling a particular game.

Sorry If I didn't make myself clear... In my head it's simple but maybe not so simple to explain.

thanks!
#2
Beginners' Technical Questions / All my posts
Wed 25/05/2022 11:37:30
Hi everyone!
is there a way to see a list of all the posts I wrote on the forums?
thanks!
bye!
#3
Hello everyone!

Does anyone know if there's available somewhere over the rainbow a nice character generator, nice and suitable for adventure games?

For a game I'm working on I'm using sanderfrenken's Universal LPC Spritesheet Generator, which is really nice but obviously more rpg-oriented...
I'm using several assets for backgrounds too, meant for the LPC world as well.
It's actually very good for this game, but for further games I'd like to have something more Lucasfilm-lookalike...

If not a proper character generator, are there any nice sprite sheets templates somewhere, in a classic graphic adventure style?
I began to draw my simple own characters but it takes a long time, then I'd have to draw also backgrounds... etc.... I'd prefer focusing on coding, storyboard and soundtrack, which I'm better at.

thanks!
bye
#4
Hi everyone!

My first post on advanced tech forum, I apologize in advance if the topic was already faced and I missed it.

I'd like to find a way to "compose" sprites at runtime. For example: I would draw all my characters without the head, and then in a separate sheet all the head animations, for example for speaking anim.
Then the 2 objects (head and body without head) should be merged at runtime.

If you take a look at Monkey Island sprite sheets, they're like that. Does anyone know if it's possible in AGS? This would prevent me to draw extra animations to replicate just one part of the body, for example if I want my character to speak whille walking, or while doing anything else.

Thanks a lot!
Have a nice day
#5
Hi everyone,

I just read on the manual (..too late!  :P)

QuoteWhile most in-game text is translated automatically, there are a few instances when this is not possible. These are when a script uses functions like Append to build up a string, or CompareTo to check some user input. In these cases, you can use the GetTranslation function to make it work.

is there any workaround for this? I have a game with a huge amount of long strings and I obtained the text merging several lines with the .Append function. And (as I discovered just after) they are not automatically translated when calling Game.ChangeTranslation("language"). Eg:

Code: ags

  String sText = ""; 

  sText = sText .Append("bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla[");
  sText = sText .Append("bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla[");
  sText = sText .Append("bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla[");
  sText = sText .Append("bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla[");
  sText = sText .Append("bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla[");
  sText = sText .Append("bla bla bla bla");


and it is not easable using the GetTranslation every time, because of the huge amount of text

So I tried using the standard C# operator + to concatenate the string, avoiding the .Append function, but in AGS script is not available (that's why probably I wrote all these .Append  :P)

Any suggestion?
Thanks!
#6
Hi everyone,

is there a way to catch the modifiers keys pressing as stand-alone keys?

I'd need something like:

Code: ags
// called when a key is pressed
function on_key_press(eKeyCode keycode)

    if (keycode == eKeyAlt) // 
    { }

    else if (keycode == eKeyCtrl) // 



Use case: I control my character with keyboard and I'd like to use Ctrl for looking, Alt for talking, Shift for pick up, etc...

Thanks!
#7
Hi everyone!

Is it possbile to assign at run-time a sound to a specific frame of a loop of a view?

Basically, in a game with many characters, all of them with many frames for walking animations, I'd like to assign the footstep sound using a loop, instead of entering every single frame of every character view:

for [every view]
{
    if [View is a walking animation / I'll check with a specific name prefix....]
    {
        for [every loop of the view]
        {
            loop.frame[3].sound = step.ogg
            loop.frame[5].sound = step.ogg
            loop.frame[7].sound = step.ogg
        }
    }
}


Any idea?
thanks!
Manu
#8
Hi everyone!

is there any known issue concerning big sprites (exceeding screen size) moving?

E.g. I want a *big* spaceship, helicopter, plane.. etc.. to fly accross the screen. At the moment, its height exceeds the screen height.
I create a character for the spaceship and it is correctly displayed. But as soon as I call cShip.Walk(........) it disappears (blocking or not, walkable areas or not.)

Any ideas?

Thanks!
#9
Hi everyone!

I need to set/change characters "z-order" at run-time ... basically, I need a "char.BringToFront" function, useful to switch which character is on front if overlapping

Thanks!
#10
Hi everyone!

I need to avoid characters overlapping.
I thought it was enough to set all characters as "solid" but overlapping still occurs.

So I tried to make a function to stop characters movement (e.g. player) if "colliding" with npc's area:


Code: ags
  if(AreThingsOverlapping(player.ID, cNpc.ID)==true)
  {
    player.StopMoving();
  }


...but nothing changes.

Is there a way to do this?

Thanks!
#11
Hi everyone!

I'm trying to cycle all inventory items to set their "description" (so actually its "Name", in code)
I think I'm doing something wrong comparing the objects:

Code: ags
// for every inv: assigning name
function CompileInvNames()
{
  int ic = 0;
  
  while(ic<Game.InventoryItemCount) 
  {
      ic++;
      inventory[ic].Name = GetInvName(inventory[ic]);
   }
}


and the called function is:

Code: ags
String GetInvName(InventoryItem* inv)
{

  switch(inv)
  {
    case iMyInventory1:
      return "This is the name for iMyInventory1";
    
    case iMyInventory2:
      return "This is the name for iMyInventory2";
      
    // etc......
  }
}


...where iMyInventory1 is the object itself, so the "name" in AGS editor.

What I'm doing wrong?

Thanks!
#12
Hi everyone!

I can't find a working way , from script (no mouse clicks anywhere, things will happen by typing commands, parser-style) , to do something like:

- use iKey (which is in my inventory) on Hotspot1, or
- use iKey on Object1, or
- use iKey on Character1, or
- use iKey on iOtherInventoryWhichIOwn.

I know I have to deal with RunInteraction and eModeUseWith, but I can't understand in which event, with which syntax.... etc

Thanks!!! :wink:
#13
Beginners' Technical Questions / Global Enum?
Wed 03/02/2021 10:13:51
Hi everyone!

is there a way to declare a "global" enum?

Something like...

enum eMyEnum
{
  None = 0,
  FirstValue = 1,
  SecondValue = 2
}

being able to access the values (not numbers but values) from all scripts (including rooms scripts)

Thanks!
#14
Hi everyone! I couldn't find an answer... I need to iterate all elements of current room, to display their descriptions somewhere.
I'd like to do this for every character, object and hotspot (let's pretend, to display names in a Label)

So I need something like:

Code: ags
String result = "this room contains: ";

for (every hotspot in room.hotspots)
{
  result = result.Append(hotspot.Description);
  result = result.Append(", ");
}

for (every character in room.characters)
{
  result = result.Append(character.RealName);
  result = result.Append(", ");
}

for (every object in room.objects)
{
  result = result.Append(object.Description);
  result = result.Append(", ");
}


Does someone know if there's a way to do this?

Thanks!
Have a nice day
#15
Beginners' Technical Questions / Phylactere?
Tue 29/12/2020 14:11:53
Hi everyone!
Could someone give me a working Phylactere module download link?
Thanks!
bye!
#16
Hi everyone! I think this is a quite simple thing to do but I didn't find any answer.

I just want to make something happen (e.g.: playing a cutscene) when player "interacts" with an item which is already in inventory.

So I implemented the item's "interact inventory item" event:

Code: ags
function iMyItem_Interact()
{

    // do something;

}


...but instead of processing this code (I put a breakpoint and I see that code is not processed), it seems that the standard Use inventory mode is activated. Which would be correct, safe that for this item I want my code to be executed.

I'm missing something basic for sure... but what?

thanks!
bye
Manu
#17
Hi everyone!
I have a GUI with a textbox. I'd like the user to write something, and then to get a confirmation pressing Return (e.g. make something happen)
How could I do it?

I put in global script:

Code: ags
// called when a key is pressed
function on_key_press(eKeyCode keycode)
{
if (keycode == eKeyReturn) 
  {
    // Text box input accept:
    if (gGuiText.Visible == true)
    {
      // Hide GUI 
      gGuiText.Visible = false;
      
      //..........DoSomethingElse();
    }
  }
}


I think the text box which is in GUI has the focus, so it prevents the Return key to be processed by the on_key_press function.

Any idea?

Thanks!
manu
#18
Hi everyone! Just a little preview of a retro-style game I'm developing
I know it will take me quite a lot of time, but at least the "core engine" is ready. Now I just need to go on with the plot!



Since I'm a musician and software developer, I decided to look for a way to quiclky realize the graphics. So I start using some open source resources from OpenGameArt.org, making backgrounds with tile art. All the characters are created with a online character generator by sanderfrenken. Most of the assets are part of the LPC collection (Liberated Pixel Cup) on OpenGameArt.org
Screen resolution is 800 x 450 and I will release the game for Windows and Linux (...and possibly Android, with slighly different viewport and UI)



The adventure is about a dead pirate who comes back to life at present days. He wants to get back his treasure, but the place he was living in is now totally different!
I decided to add a bit of action, not usual in adventure games, so I developed also a "battle system".



Music from OpenGameArt.org:
Battle theme A by cynicmusic
Heroic Demise by Matthew Pablo


Have a nice day!  8-)
#19
Hi everyone!

I'm quite sure this is a really naive question but I couldn't find any similar previous thread.

I want to define a temporary object (or even a DynamicSprite as well) locally in a function, just to display a one-shot animation on screen (e.g. explosion of something, not suitable as a permanent object).

I created the explosion View, then I made a function as:

Code: ags

function ShowExplosion(int x, int y)
{
    Object* objExplosion;
    objExplosion = new Object;

   objExplosion.X = x;
   objExplosion.Y = y;
   
   objExplosion.SetView(......proper view...);
   objExplosion.Animate(...proper animation....);
}


but I get a compiler error: built-in tipe "object" cannot be instantiated directly.

Then I tried to declare the objExplosion object globally instead of inside my function to see if something changes, according to instructions for the New statement on manual.... Nope.

Obviously, in C# I'd just write:

Code: ags

Object objExplosion = new Object();


So, I don't understand what I'm doing wrong.

Thanks!
#20
Hello everyone!

is there some way I didn't find to move / reorganize the sprites subfolders without deleting and re-creating them?
maybe with some module or plugin I'm missing?

thanks!

manu
SMF spam blocked by CleanTalk