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 - Crimson Wizard

#1521
One essential feature of VNs that you do not have in your list is the "history" of choices and ability to rewind the story back. I don't know if you need this or not, but thought I'd mention this.
AGS has no such feature built-in, and making one would require a good planning & scripting effort.
Ren'Py supports that out of the box, AFAIK.
#1522
Well, that looks cool.
#1523
Quote from: Dave Gilbert on Wed 20/03/2024 20:05:58But while you can have infinite room script tabs open at once, only one room tab can be opened at a time, right? So it's less of an issue.

Less or not, but it's still an issue.

Besides, there have been a feature suggestion to be able to open multiple rooms in the Editor too (maybe that's already almost possible in AGS 4).
#1524
I wish there were a way to distinguish Room tabs from other kind of tabs, and Room and Room Script tabs between each other.
Judging by the screenshots, right now there's no way to tell whether this is a room or its script.

I'd propose something that mentions "room" word in a tab.

For a quick idea (not final):
- Room N: Description - for a room tab
- RoomN.asc: Description - for a room script tab.

Later we may also add tab icons for a quicker identification (this is a second suggestion from the original ticket).
#1525
Note we already have a suggestion opened on github:
https://github.com/adventuregamestudio/ags/issues/1066
#1526
Quote from: lapsking on Mon 18/03/2024 11:04:03I think the whole discussion should move to the original topic regarding the code here.

Sorry for the trouble Crimson and thanks for pointing out that it's related to clicking.
 Edit: But now the problem is it doesn't distinguish between Use and UseInv. :(

Well, I think you should better post the new problem in that original thread.
#1527
Did you do any changes to on_mouse_click function in this template?

I think the good way to see what happens is to wait until this problem occurs, then set a break point in the "on_mouse_click" inside VerbGui script (F9 in script editor), try clicking somewhere, and run it step by step (F11) to see how it goes.
#1528
Quote from: lapsking on Mon 18/03/2024 07:00:44But in this specific room with more than usual objects (11 high resolution objects) compared to my other rooms after more than 3 or more objects become invisible or visible the code doesn't work properly anymore. The previous action appears in action bar after leaving exit hotspot but clicking doesn't trigger anything.

If the previous action appears in action bar after leaving hotspot, that means that this particular code is working.
Maybe the problem is in clicking instead?

Do you have any object or gui that may be covering a screen, and not let clicks through?

What kind of objects are there that you turn visible and off? Can you make a list of things you work with in that room, or perhaps post a screenshot, just to let us understand the situation better?
#1529
Quote from: lapsking on Mon 18/03/2024 06:17:23Sorry, Crimson.  If it does worth having a look, shall I remove this post from here and write it with more details where it was supposed to be?

There's no need to remove anything, but surely post the description of this problem with more details.
#1530
Quote from: lapsking on Mon 18/03/2024 05:40:18It has been working well in all of the rooms. But the last room I'm working on has a glitch. The code is the same and everything. So it took me good few hours to realize glitch happens after interacting with more objects visible=true, visible=false. Is it possible the code is not working because my game is high resolution and because of more objects appearing and disappearing this issue happens? I don't know what else it can be cause otherwise the code is doing fine. That's the only thing that comes to my mind. Some memory or I don't what issue to make code work properly? Maybe I had to post this on AGS 3.6 forums though!

Yes, bug reports (and suspicions) are better posted in the forum thread dedicated to the version that you are using.

We'd need to see a exact code that you think is not working, the description of the room (what is present there), and what exactly happens wrong. I won't be able to answer your questions without this information.
#1531
As an update to this:

Quote from: heltenjon on Mon 21/02/2022 23:52:39
Quote from: eri0o on Mon 21/02/2022 20:46:26I am not 100%, but the walking and some details look very agsy.

The game is not available yet - and the rest is too french for me to understand  :P
According to this: https://www.rom-game.fr/news/4772-Gobliiins+5.html there is currently a fundraiser to raise 3000 Euros to complete the game. It's indeed made in AGS.

Gobliiins 5 have been released some time ago. It's made in AGS, and still not in database, so I guess this matches this topic.

Itch: pierre-gilhodes.itch.io/gobliiins5
Steam: https://store.steampowered.com/app/2475980/GOBLiiiNS5/
#1532
I reposted the recent update again (see a post above), but the problem with room backgrounds in 8-bit games was not fully fixed, and will take more time to investigate and fix.

Importing existing 8-bit games in ags4 now works properly (judging by few tests), but adding new backgrounds does not work correctly yet (they look wrong at runtime).
#1533
Updated to Alpha 9
(Please use download links in the first post)

Contains updates and fixes from 3.6.1 Beta RC6 (except ones related to backwards compatibility).

Other changes:

Editor:
- Fixed 8-bit images imported and converted for a 32-bit game to not get their colors clamped to a low-precision palette.
- Fixed 8-bit rooms not being usable in the new Editor version (regression in AGS 4).
NOTE: 8-bit backgrounds are still not working fully correct in this version, new imported bgs do not have their palette remapped.

Script API:
- Added VideoPlayer struct, which provides means of playing non-blocking videos rendered onto a sprite that may be displayed on any game object.

Engine:
- Camera will not follow a disabled player character.
- Fixed error occuring when trying to make a screenshot while running Direct3D renderer (regression in AGS 4).
- Fixed sprites leaving traces on background while running Software renderer (regression in AGS 4).







The new VideoPlayer struct is declared as:
Code: ags
builtin managed struct VideoPlayer {
  import static VideoPlayer* Open(const string filename, bool autoPlay=true, RepeatStyle=eOnce);
  /// Starts or resumes the playback.
  import void Play();
  /// Pauses the playback.
  import void Pause();
  /// Advances video by 1 frame, may be called when the video is paused.
  import void NextFrame();
  /// Changes playback to continue from the specified frame; returns new position or -1 on error.
  import int  SeekFrame(int frame);
  /// Changes playback to continue from the specified position in milliseconds; returns new position or -1 on error.
  import int  SeekMs(int position);
  /// Stops the video completely.
  import void Stop();

  /// Gets current frame index.
  import readonly attribute int Frame;
  /// Gets total number of frames in this video.
  import readonly attribute int FrameCount;
  /// Gets this video's framerate (number of frames per second).
  import readonly attribute float FrameRate;
  /// Gets the number of sprite this video renders to.
  import readonly attribute int Graphic;
  /// The length of the currently playing video, in milliseconds.
  import readonly attribute int LengthMs;
  /// Gets/sets whether the video should loop.
  import attribute bool Looping;
  /// The current playback position, in milliseconds.
  import readonly attribute int PositionMs;
  /// The speed of playing (1.0 is default).
  import attribute float Speed;
  /// Gets the current playback state (playing, paused, etc).
  import readonly attribute PlaybackState State;
  /// The volume of this video's sound, from 0 to 100.
  import attribute int Volume;
};


The idea is that you create a VideoPlayer object, and then use its Graphic property to assign the video frame to something, like room object, or Overlay.
NOTE: scaling video is done by scaling an object: for example, you may play a 320x180 video in a 1920x1080 game by assigning to an Overlay and changing Overlay's Width and Height - that's the simplest and fastest (performance-wise) method for stretching video in game so far.

After that you may control the video playback any way you like: start it, stop it, pause and resume, change speed and audio volume.
WARNING: proper Seek is currently not implemented, but Seek(0) works, rewinding the video back to beginning.

Video's FPS is completely disconnected from the game's FPS. Videos are played as a background "process", and their state and displayed frame is synchronized with the game once per game's update. If video's FPS is lower than the game, that would simply mean that the game may display same frame during 2 or more updates. If video's FPS is higher than the game, that would result in frame skipping, because some frames will be replaced faster than the game can display them.

On another hand, you may choose to open VideoPlayer in a non-automatic mode, by passing "autoPlay = false". Then you may use NextFrame() function to advance a frame manually, according to your own rules. There's an important nuance: video's audio track is not played with NextFrame(), but only when the video is played automatically.

Multiple simultaneous video playbacks are supported, but keep in mind that decoding and preparing a frame on screen takes time, so more videos you play in parallel, the more performance hit will be.
In general, following are the factors that slow things down:
- Number of simultaneous video playbacks;
- Video's resolution (but scaling video frame using game object is fast!);
- Video's FPS: the higher FPS the more often the frame has to be decoded and updated, increasing amount of work.


Example:
Code: ags
VideoPlayer *MyVideo;
Overlay *VideoOver;

function ButtonPlay_OnClick(GUIControl *control, MouseButton button)
{
    MyVideo = VideoPlayer.Open("video.ogv", true, eRepeat);
    if (MyVideo)
    {
        VideoOver = Overlay.CreateRoomGraphical(0, 0, MyVideo.Graphic);
        VideoOver.Width = 320;
        VideoOver.Height = 200;
    }
}

function ButtonPauseResume_OnClick(GUIControl *control, MouseButton button)
{
    if (MyVideo)
    {
        if (MyVideo.State == ePlaybackOn)
            MyVideo.Pause();
        else
            MyVideo.Play();
    }
}

function ButtonStop_OnClick(GUIControl *control, MouseButton button)
{
    if (MyVideo)
    {
        MyVideo = null;
        VideoOver = null;
    }
}

function ButtonSlower_OnClick(GUIControl *control, MouseButton button)
{
    if (MyVideo)
    {
        MyVideo.Speed = 0.5;
    }
}

function ButtonNormal_OnClick(GUIControl *control, MouseButton button)
{
    if (MyVideo)
    {
        MyVideo.Speed = 1.0;
    }
}

function ButtonFaster_OnClick(GUIControl *control, MouseButton button)
{
    if (MyVideo)
    {
        MyVideo.Speed = 2.0;
    }
}

function ButtonFrame_OnClick(GUIControl *control, MouseButton button)
{
    if (MyVideo)
    {
        MyVideo.NextFrame();
    }
}
#1535
Updated to RC6
(Please use download links in the first post)

This update fixes a number of regressions found in 3.6.1, and few more minor things.

Editor:
- Fixed Log Panel could not be shown again using menu command if it was closed by pressing "x" button.

Engine:
- Removed "supersampling" option from OpenGL renderer for now, as it's not consistent with the other renderers and not maintained properly.
- Allow game to call DynamicSprite.CreateFromDrawingSurface() and CreateFromBackground() with zero or negative size, clamping it to 1x1, in consistency with Create().
- Fixed Software render crashes if rendering in "game_start" script (for instance, if there's a call to Display).
- Fixed some TextBox keys were still tested while interface is disabled.
- Fixed old-style InventoryScreen dialog not letting to select an item.
- Fixed mouse cursor being visible during fade-out and fade-in transitions (this applies to texture-based renderers, Software renderer historically displays a cursor during fade-out, and that cannot be fixed easily at the moment).
- Fixed room objects and characters not drawn in correct positions if FadeIn() command was called in "room load" event.
- Fixed Crossfade and Dissolve transitions not rendering correctly in old-style letterboxed games.
- Fixed one extra frame drawn before Crossfade or Dissolve fade-in starts, causing a room to "blink".
- Fixed couple of potential crashes occuring during render after RunAGSGame() command.
- Fixed unnecessary warning about "dynamic sprite not deleted" displayed on exit for sprites generated by textual overlays.
- Fixed IAGSEngine.SimulateMouseClick() in plugin api causing stack overflow due to infinite recursion.
- Fixed old-style letterbox viewport getting broken after loading an old pre-3.5.0 save.

Android:
- In AGS Player removed currently unused "Super sampling" and "Drop video frames" preference settings.

Winsetup:
- Added config option to disable fullscreen mode selection.
- Fixed "graphics filter" option not displaying a correct initial selection.
#1536
So, I fixed few mistakes reported lately, and here's a AGS update that may be downloaded from our build server:
https://cirrus-ci.com/task/6526915163455488

- fixed characters and objects not visible on screen if FadeIn() is called in "room load" event.
- fixed graphic filter not selected correctly on winsetup launch.
- fixed LogPanel cannot be restored after closing it by pressing "x" button.

there are few more, but they are related to obscure and deprecated features.

I will likely release a new proper RC update soon, given there have been a bunch of fixes made in the last several days; so I want to give users an opportunity to test the newest version.
#1537
Quote from: imagazzell on Mon 11/03/2024 20:15:101. Was something changed about either room_load or the fade scripts since 3.5.1? In upgrading to 3.6.1, I needed to move my FadeIn commands from the end of room_load, where I used to have them and they worked fine, to the beginning of the "after fade in" function (which seems backward to me). Otherwise, my pre-fade commands (characters moving into position, etc.) were now happening after the fade.

Normally you should not run anything blocking, that requires "wait", or any visual effects in "room_load" (aka before fade-in) because room is not supposed to be drawn at this time. I do not know exactly why it worked in 3.5.1 or earlier, but maybe it was not entirely consistent in this regard. The correct way is to have only starting room setup in "room load" and run any effects, animations or cutscenes in "after fade in".

The "fade in" in these events is referring to the built-in AGS transition. If you are using custom transition, then normally you should set built-in transition style to "Instant", and run your own transition in "after fade-in" event. This recommendation may be found on AGS forums too.

If AGS had a mechanism to let user override transition effect, and had some kind of a "transition state" that user could handle in script, then things would sound more logical, but it does not have this now.

EDIT:
But because new version in 3.* branch must be backwards compatible, I would need to fix the FadeIn command not working in room load, since it worked before.


Quote from: imagazzell on Mon 11/03/2024 20:15:102. I don't know if this issue is new to 3.6.1, but some of my default setup choices are not sticking in the "winsetup" program after compiling. Most notably for me right now is the scaling method. I selected "linear interpolation" in the default setup pane, but after compiling, it reset to "nearest-neighbour".

Winsetup displays a configuration merged from at least 2 sources: default config file found in the game's directory (this is what you set in Default Setup), and player's config found in game's save folder. If you want to see what the default config looks like in winsetup, then delete config file from save folder.
You may refer this article for more information:
https://adventuregamestudio.github.io/ags-manual/EngineConfigFile.html
#1538
Things to double check:
1. Version of AGS. AGS supports Unicode since v3.6.0.
2. "Text format" property in the General Settings. Is it ASCII or Unicode?
3. Is the font Unicode-compatible or ANSI-compatible? The font must match the text format.

If you are working on translations:
4. Is there a "#Encoding" option present in TRS, and what is it set to? See manual for details:
https://adventuregamestudio.github.io/ags-manual/Translations.html#additional-options
Example:
Quote//#Encoding=UTF-8
5. Is TRS file itself saved in UTF-8 (no BOM) format?
6. Same question about font provided for this translation, is it Unicode or ANSI compatible? The font must match the translation format.

I think the easiest way to test whether this is a font's problem, is to take one of the standard Windows fonts, like Arial or Times New Roman, as these are Unicode fonts and have multiple alphabets in them. If this Windows font works with your game, then that other font is not suitable for unicode text.
#1539
Also, "first time in room" event may be a bit misleading, it is actually run AFTER fade in, while character setup is best done in "Before fade-in" event, before room is shown on screen.

If you need something done strictly the first time, Game.DoOnceOnly function may help.
#1540
Quote from: Akril15 on Fri 08/03/2024 00:14:34To answer the issue of getting more testers for the game, I will definitely seek out some beta testers once the game can be finished. Right now, though, there are a lot of small, but crucial parts of the game that aren't finished yet that I need to fine-tune.

Honestly, with the game as big as yours, it may make sense to get "alpha" testers too. Not only that will speed things up, but they may give you a first impression of your game, and maybe notice logical mistakes in story and design that you missed.
SMF spam blocked by CleanTalk