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 - Gal Shemesh

#41
Quote from: Crimson Wizard on Thu 16/05/2024 00:16:33I think if we take this quote from your original post:
QuoteResampling the sprites and backgrounds may statically look good, but the overall gameplay experience would still behave in a 1:1 manner, meaning that when the character moves it would move 1 pixel instead of 2 when walking to the sides, breaking the feel of an AGI style game.

If you want characters and other objects to stick strictly to 2:1 pixels, that means that you must have a logical resolution of 160x200. That's like a physical world is 160x200, but visually stretched to 320x200.
If so, then all rooms, masks, and all script commands must natively be in 160x200.
You're correct. I've just finished examining one of Sierra's AGI games and found that when I set a character to walk to around pixel 140 on the X axis, it almost reached the end of the screen to the right. So the AGI interpreter considers the game in 160x200 resolution and projects it to be displayed in 320x200. So yeah, the logic resolution must be 160x200, which can be set in a custom resolution. Only need to have the Editor to be able to show all of the resources in aspect ratio of 2:1 and the Engine too during runtime. Or else everything would look half as wide.
#42
Quote from: Crimson Wizard on Wed 15/05/2024 23:53:07The way I see this problem, is that game resources should not be stretched for real individually neither in Editor nor in the Engine as in - their pixels in memory should not be duplicated. Only the final image on screen should be stretched at runtime, and previews should be visually stretched in the Editor.

In order to define whether that's true or false, consider following question: which coordinates are you planning to use in script, for example, when ordering Walk()? Would that be 160x200 or 320x200 resolution?
Suppose you want to modify a sprite at runtime, in script, using DynamicSprite and DrawingSurface. Which resolution will that DrawingSurface relate to, 160x200 or 320x200?

That's a very good question! :) I think that it should be 320x200 where the coordinates on screen (when moving the mouse cursor in the Room Editor) should also be affected by the 2:1 aspect ratio. Meaning that you'd need to move the mouse twice the distance to move one pixel to the sides than to move one pixel to the top or bottom. I think that this is how it behaved in AGI Studio, but I'm going to load one of the Sierra games and check this now. Will come back to update shortly...
#43
Kind of... I mean, you can both look at it as a 160x200 game in an aspect ratio of 1:1 that gets streached to 320x200, or a 320x200 game in an aspect ratio of 2:1. But the second one (the natively 2:1) is the way it should be considered, where both the editor and the engine during runtime should take the aspect ratio into account and do the streching/scalling automatically for all of the in-game resources.

Just like in Aseprite when I open a 2:1 graphic that was saved in a 2:1 aspect ratio - it automatically shows it correctly, streatching the preview to look twice as big to its sides, without doing any manipulation to the actual resource. The drawing tools also work in a 2:1 way which is wonderful. If however, I open the resource is a program that does not take into account the aspect ratio setting, such as Windows Paint, then the resource would be considered in an aspect ratio of 1:1 and would look narrow, which is incorrect.
#44
Tweaking camera settings shouldn't be necessary to achieve this; the 2:1 aspect ratio should basically be for any sprite related resource that is imported into the game, including fonts. So it's the Sprites section, GUI, Inventory Items, Views, Characters, Mouse Pointers, Fonts - anything that has resources preview. And of course, the entire Room Editor which should be affected as well, such as when drawing masks or moving objects around: drawing / moving anything on the horizontal axis should move in increments of 2 pixels to the sides and 1 pixel to the top and bottom.

When looking on it from a point of view of 1:1 aspect ratio, this may look like a 160x200 resolution game that is stretched up twice as big to its sides by the editor and engine, making it look a 320x200 game in an aspect ratio of 2:1.
#45
That's an option, I guess. Though, wouldn't it be visible only in runtime? I was more thinking about something that the entire editor could show the resources (and the room) in the 2:1 aspect ratio, so it would be easy to view and edit things in the editor. Otherwise, everything would look narrow / skewed.

Here's an example how an AGI background would look when imported into AGS (original on the left versus a resampled version on the right):

#46
Hi guys,

Not sure if anyone would be interested in this, but if it's not too much to ask maybe others like me would appreciate it.

I'm trying to make a short game in all the historical graphical Sierra styles games, which are AGI (running in 2:1 aspect ratio in 16 colors), SCI (1:1 aspect ratio in 16 colors), and AGS (1:1 aspect ratio in rich colors).

However, I found that if I draw my graphics in Aseprite in 2:1 aspect ratio which is natively supports, I need to resample the images when exporting them so they would stretch twice as big horizontally before importing them into AGS, or else they would look narrow. So I wondered if there's a way to have an aspect ratio of 2:1 in AGS but then found that there is none...

Resampling the sprites and backgrounds may statically look good, but the overall gameplay experience would still behave in a 1:1 manner, meaning that when the character moves it would move 1 pixel instead of 2 when walking to the sides, breaking the feel of an AGI style game.

There's another feature request that I just posted for having an AGI style game feel (here), so we'd be able to set the characters to stop on any of their Walking cycle frames, and not only on the first frame (ID 0).

I really don't want to start learning the out-dated AGI Studio engine for a small game only to achieve its feel, and would prefer it if I could make it in AGS where I'm more comfortable with.

Of course, the Room Editor with all its drawing tools should also work in the 2:1 aspect ratio, so I'm really not sure what such feature request involves. However, if it's possible and not too much work it would be nice to have in AGS.

Thanks
#47
Hi guys,

Was trying to make an old AGI/SCI style game and found that there is no option to have the characters to stop on any of the Walking loops frames - when they stop, they loop back to the very first frame (ID 0), and in some scenarios such as on occassional bumps into obstacles, the walking animation looks a little funny when it keeps jumping to the first frame of the cycle.

In AGI/SCI games, when you stopped the character from moving or if you bumped into an obstacle, the character would have stopped at the very frame they were at, making the walking cycle to look more continues and not jumping to the first frame on every stop.

Thought that it may be nice to have a feature that we could toggle between having characters to loop back to the first frame of the cycle, or to have them stop at the frame they're at.

Thanks
#48
Hi guys,

A minor suggestion: when clicking on a frame in the View Editor and hitting the Delete key to remove the frame, the frame selection box disappears, requiring you to re-click on the next frame if say you wish to remove more than just one frame. Yes, you can use the Shift key to select multiple frames and to then delete all of them in one go, but one may just want to either delete frames one-by-one by re-hitting the Delete key, or perhaps to have the key repeatedly pressed-down to remove a bunch of frames further from the frame you're standing on, without needing to scroll horizontally to do a multiple selection.

I think that when hitting the Delete key, the frame selection box should remain in the same place if it's not the last frame. And if it is the last frame then it should move back one frame. Of course, it should have a small delay in the code so it doesn't do double-deletion of frames, unless the key is repeatedly pressed-down for say half a second where it should then do a fast deletion.

Just a small improvement. Again, not a big deal to do a multiple selection and delete. But just thought it may be good to bring this one up.

Thanks
#49
AGS Engine & Editor Releases / Re: AGS 3.6.1
Sun 07/04/2024 00:09:46
Hi guys! Wasn't very active recently and just dropped by to see what's new.

Congratulations on the 3.6.1 release! So glad to see that it passed its beta phase, and that many things that I reported about were fixed and suggestions that I raised to make AGS better were included! :) Thanks to everyone who took part for their effort!

As for the new bugs - it's inevitable. But I have my full faith in you all - no bug could stand in your way! :grin:

Keep up the good work and many thanks again.
#50
And for anyone who wish to have an out-of-the-box module, I've just made and shared it here.
Several things were fixed in it and there's no need for global variables anymore. Just download, import and use. :)
#51
About
This module basically pauses the game upon call, takes a screenshot, and then draws that screenshot onto the screen as an overlay, with a nice touch of fade animation.

You enter the grayscale pause using the grayscale.FadeIn() function. Then you can show other elements on screen such as GUIs or close-up graphics for the player to interact with. When you're done, you exit from it using the grayscale.FadeOut() function, which fades back to full color and unpause the game.

This is the first module that I've created in AGS and I'm happily sharing it so everyone could enjoy and use it.

This module couldn't be done without the help of @Nahuel and @Crimson Wizard who assisted and directed me in the right way to making it work - thanks guys! I've credited you both in the module.

The idea behind making this module was to reproduce the same effect that exists in an old adventure game that I'm currently re-producing with captions, called "The Riddle of Master Lu" - in that game, when you opened GUIs during gameplay or examined inventory items which showed a close-up graphic of them, the entire screen went grayscale so the player won't be distracted by the surrounding but only by the specific GUI or close-up  graphic that was opened.

Attached an example how this module looks like in my reproduction game:


You may download the module from my personal dropbox.

Module was updated with the MIT license agreement as suggested in the forum guidelines. It is free for non-commercial AND commercial use - only request is to please credit authors if used.

Enjoy! :)


Changelog
=========
Version: 1.2.0
Released: 20th Septembre 2023
Notes: Added Original User GUI Hidden and Visible again during FadeIn/Out

Version: 1.1.0
Released: 20th Septembre 2023
Notes: Added TweenModule compatibility & Licence to header. by Nahuel

Version: 1.0.1
Released: 19th Septembre 2023
Notes: Added license. by Gal Shemesh.

Version: 1.0.0
Released: 19h Septembre 2023
Notes: Initial release. by Gal Shemesh
#52
Ok, it's done! 8-) making another comment instead of editing my previous one so anyone who gets here who's interested in this thing will be able to see the progress and differences.

With @Nahuel's great code above, I learned about the DynamicSprite type which I wasn't familiar with before, and the ability to draw it onto the screen and make 'tint' adjustments to it. Though, it affects the room's background separately and objects and characters separately - in some cases some will prefer / need this to work this way, especially when for example you wish to make a playable scene while changing the color tint.

However, in my scenario I actually wanted to 'freeze' the entire screen with everything that is currenly showing on it, to make it grayscale and to show GUIs / close-up inventory items sprites onto it. So I tried using a 'screenshot' method instead. But when passing a screenshot of the room into the global variable and drawing it on the screen using 'DrawingSurface* ds.DrawImage' the screenshot was actually dawn behind all objects and characters. So with the help of @Crimson Wizard who helped me on Discord to tune the code for drawing the screenshot using an 'overlay' instead, the magic finally happens!

I can't thank you enough you guys. Thank you so much for your kind and professional help! ;-D

Here's an animation GIF demonstating the final thing. I'm also using a custom inventory interaction (override built-in inventory window click handling is set to TRUE) so I show there how it works; on this bit I also wish to thank @Khris for the help to other member in this thread that I also learned from.

I'm attaching the grayscale effect code below for anyone who's interested (or if I ever forget  (laugh)):



The code - I made a dedicated script for holding this code which serves as a 'module', for separating it from the Global Script. I called the script "Grayscale Fade" and the following code is in its header:
Code: ags
// gUI is the GUI that holds the actions and inventory. I don't want it in the screenshot so I turn it off before taking it
// screenToGrayscale is a DynamicSprite* type global variable
// screenOverlay is an Overlay* type global variable

void grayscaleFadeIn()
{
  gUI.Visible = false; // hide the UI before taking the screenshot
  mouse.Visible = false; // hide the mouse cursor before taking the screenshot
  Wait(1); // allow enough time for the GUI and mouse to get hidden, or else they will be integrated into the screenshot
  PauseGame(); // pause the game before taking the screenshot
  screenToGrayscale = DynamicSprite.CreateFromScreenShot(); // save a DynamicSprite type screenshot of the screen into the 'screenToGrayscale' variable for making into grayscale
  screenToGrayscale.Tint(190, 190, 190, 100, 100); // set the grayscale level on the screenshot in 'screenToGrayscale'
  screenOverlay = Overlay.CreateGraphical(0, 0, screenToGrayscale.Graphic); // passing the screenshot from 'screenToGrayscale' into global overlay object type variable 'screenOverlay' for drawing it on the screen (on top everything)
  mouse.Visible = true; // un-hide mouse cursor
  int screenshot = 100; // set the initial transparancy value for the screenshot in a local variable named 'screenshot' (100 = fully transparent)
  while (screenshot > 0) // a 'while' loop for making the transition effect - checks if the 'screenshot' local variable's value is greater than 0 (not opaque / semi-transparent)
  {
    screenshot = screenshot - 5; // subtract transparancy increment from the local variable towards transparancy
    screenOverlay.Transparency = screenshot; // set the transparancy value of the overlay object type as the local variable's 'screenshot' current value
    Wait(2); // a short wait to see the result on screen before the 'while' loop repeats itself
  }
}

// call this void when willing to exit from the current grayscale pause and return to the game
void grayscaleFadeOut()
{
  int screenshot = 0;  // set the initial transparancy value for the screenshot in a local variable named 'screenshot' (0 = opaque)
  while (screenshot < 100) // a 'while' loop for making the transition effect - checks if the 'screenshot' local variable's value is lower than 100 (not fully transparent)
  {
    screenshot = screenshot + 5; // add transparancy increment from the local variable towards opaque
    screenOverlay.Transparency = screenshot; // set the transparancy value of the overlay object type as the local variable's 'screenshot' current value
    Wait(2); // a short wait to see the result on screen before the 'while' loop repeats itself
  }
  screenOverlay.Remove(); // after while loop is over, remove the overlay object from the screen
  gUI.Visible = true; // un-hide gUI
  UnPauseGame(); // unpause the game
}

This function can be called anywhere you like. For example, when clicking on a button that should reveal a settings panel GUI:
Code: ags
function btnSettings_OnClick(GUIControl *control, MouseButton button)
{
  grayscaleFadeIn();
  gSettings.Visible = true;
}

Or when close-examine (look at) of an inventory item - for this I first made a global 'int' variable that I pass the close-up graphic sprite index number into when looking on a certain inventory item. Then I call the grayscale function to play and when it's done I'm calling another function for actually drawing that sprite on the screen - that other function I placed on my dedicated UI script header, but you can place it in the Global Script header as well:
Code: ags
// replace 'x' and 'y' where you wish the sprite to be drawn on
void inventoryCloseUp()
{
  inventoryItemCloseUpOverlay = Overlay.CreateGraphical(x, y, inventoryItemCloseUpSprite); // passing the close-up sprite stored in 'inventoryItemCloseUpSprite' into global overlay object type 'inventoryItemCloseUpOverlay' for drawing it on the screen (on top everything)
}

And here's the 'Look at' inventory item code:
Code: ags
// replace 'x' with the close-up image sprite number
function iKey_Look()
{
  inventoryItemCloseUpSprite = x;
  grayscaleFadeIn();
  inventoryCloseUp();
}
#53
Only now got to the point in my game that I could finally put this into use - using @Nahuel's code I was able to achieve this almost fantastic result! I just implemented this as a Void that I could call when clicking on varies things, such as buttons for opening menus, etc. I also coded the transition effect. It looks like this:

Code: ags
void grayscaleScreen()
{
  PauseGame();
  DynamicSprite* RoomBefore;
  RoomBefore = DynamicSprite.CreateFromBackground();
  RoomBefore.Tint(190, 190, 190, 100, 100);
  int dsTrans = 100;
  int sat = 0;
  int lum = 0;
  while (dsTrans > 0)
  {
    dsTrans = dsTrans - 5;
    sat = sat + 5;
    if (sat > 100)
    {
      sat = 100;
    }
    if (lum < 80)
    {
      lum = lum + 5;
    }
    if (lum > 80)
    {
      lum = 80;
    }
    DrawingSurface* ds = Room.GetDrawingSurfaceForBackground();
    ds.DrawImage(0, 0, RoomBefore.Graphic, dsTrans);
    ds.Release();
    SetAmbientTint(190, 190, 190, sat, lum);
    Wait(2);
  }
}

There are a few issues, though:

1. The player character's sprites are brighter than this in-door room. So I used 'player.LightLevel' to make him a little darker. But this caused him to be isolated from the AmbientTint effect altogether. I also tried using player.Tint to make him darker but this one isolates him as well.

2. Overlay speech text, such as the 'SayBackground speech' that is shown in the screenshot still remains in full color.



I wonder if there's a way to make this grayscale effect happen on a screenshot, that is taken from the room when triggered, which is then drawn on the screen the same way as in this method - if possible, that would probably make things much easier as non individual elements would need to be tinted, as everything will be merged down in the screenshot.

EDIT:
Ok, almost nailed it - I managed to make a screenshot which contains everything in the room in it and to make it grayscale - this allows to desregard needing to tint rooms and objects / character separately. I used 2 global variables of the DynamicSprite type for storing the room's state: one for tinting into a grayscale image and another for reverting back to full color - if this is the correct route; I'm not sure yet. Since my rooms are positioned 30 pixels lower on the screen, I had to make the screenshot drawn 30 pixels lower on the Y axis. The code looks like this:

Code: ags
void grayscaleFadeIn()
{
  PauseGame();  
  mouse.Visible = false;
  screenToGrayscale = DynamicSprite.CreateFromScreenShot();
  screenBeforeGrayscale = DynamicSprite.CreateFromScreenShot();
  screenToGrayscale.Tint(190, 190, 190, 100, 100);
  int screen = 100;
  while (screen > 0)
  {
    screen = screen - 5;
    DrawingSurface* ds = Room.GetDrawingSurfaceForBackground();
    ds.DrawImage(0, -30, screenToGrayscale.Graphic, screen);
    ds.Release();
    Wait(2);
  }
  mouse.Visible = true;
}
Now, a new issue arise which is that all of the room elements (characters and objects) remain showing on the screen, while the full grayscale screenshot is drawn at the back of them. Is there a way to draw the screenshot in-front?
#54
Thanks guys. By now I've already implemented a black GUI and made a custom FadeIn and FadeOut functions with it by using transparancy - I don't think I'm going to use the built-in transitions anymore due to their limitations and as they don't give the freedom of control; in my custom fades I can do mostly anything I want, and even choose the amount of transparent value that I wish to make the fade kind of 'jump' to on each screen draw. For example, subtracting transparancy in jumps of '10' with a minor Wait of (3) or so for making a '10 frame like' FadeOut, instead of a smooth fade that drawn on each game cycle.
#55
Quote from: Crimson Wizard on Fri 15/09/2023 15:22:03Today it's possible to use one of the existing video plugins, like this one:
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/plugin-spritevideo-v0-9-3-sprite-and-video-render-based-on-direct3d-plugin/
(except it does not support audio)
When we translated some games we found integrating subtitles in the FMVs that didn't have any somewhat troublesome. I don't mind having audio separated from the video in AGS. Though, the last time I tried adding a video into AGS I had trouble showing text on top of it, which led me to disregard the video altogether. Not sure if its supported by now.

Quote from: negator2vc on Fri 15/09/2023 15:31:02Just please don't mess with the original design (puzzles, texts, etc...).
No worries. :) I stick to the original and do my best to re-build everything exact. The only thing I've improved so far is the ability to skip over the cut-scenes, which isn't possible in the original.
#56
Quote from: Monsieur OUXX on Fri 15/09/2023 10:07:49That seems like a great idea, because there's a lot of old FMV games which could have achieved greatness but were carrying some obnoxious/obsolete game mechanics, broken puzzles and unclear hints.
They all need a good "repair". Not just this one, but Phantasmagoria and the others too!

Thanks. :) While this kind of thing is great to kind of fixing problems in old games, only a minor group of people would probably do that as it's time consuming, which others may prefer to spend on an original game of their own. I encountered with only a few old games that fans had taken and improved, such as King's Quest 1 through 3 by AGDI, another KQ3 by Infamous Adventures (once called TIERRA) and KQ4 Retold by DrSlash.

As for Phantasmagoria - in the local group I'm running with some friends in my country we've fully translated it to Hebrew; I was responsible on translating the visual graphics. Same on Syberia 1 & 2. They all look great, though I don't think that we would have taken the road of rebuilding neither of them like I'm doing here with Master Lu.
#57
I have a suggestion / feature request regarding the Sprite editor:

If sprite source files had moved on disk and we try to replace them from source, AGS gives an error that the source files are missing. However, it doesn't give an option to search for the files in the new path.

I thought that maybe I could just select multiple sprites and then update only a fraction of the path in their SourceFile property, and that it will keep the filename intact - but it actually changed all sprites to have the same path in their SourceFile, which is not correct. So I thought of 2 possible solutions:

1. To have the SourceFile property broken into 2 separate properties: one for the path without the filename, and one only for the filename. That way, the path of multiple sprites could be updated while their filename property will remain intact.

2. Havig AGS to give us an option to search for the first missing file, and after picking it in the new path it will try to search for the rest there as well - this is neat solution that exists in other programs like Adobe's; when loading a project and there are missing files that should be read from external locations on disk, which for example had been moved to another location, the program prompts about the first missing file and lets you browse for it. Once picking the file at the new path, it takes into account the new path and automatically search for the rest of the missing files there.

I think that the second option would be the best route, as this may also be usable not only for the sprite manager but for other sections in AGS which have an option to replace assets from source.
#59
That is awesome, CW. What an improvement to the View editor! Thank you so much! I can confirm that delaying , flipping, setting different images and setting a sound on frames in multiple loops work great!

I have some feedback for other things I checked that don't currently work correctly:

1. Upon trying to delete (Del Key) a selection of frames in multiple loops, only the frames of the first loop are getting deleted while the selected frames on different loops remain intact.

2. The right-click context menu on any of the frames from the multiple selection removes the multiple selection and affects only the single frame clicked upon.
#60
Thanks a lot, CW. If and when this could be added that would be much appreciated.

Quote from: Crimson Wizard on Wed 06/09/2023 17:05:09The "Assign to View" can assign only to the first 8 loops for some reason.
This is such a mess...
Gee, good find! I haven't reached to assign to a 9th loop yet but only to the 8 directions. You were one step ahead of me on this one before I even managed to find and report about it myself, as I counted on assigning sprites this way... (laugh) Thanks for letting me know at least. :)
SMF spam blocked by CleanTalk