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

#3481
I confirm that AGS fails to load this font properly, something may be wrong in the font library its using.

For now I'll try to make it at least not crash stupidly and just report an error.
#3482
Quote from: Khris on Thu 21/10/2021 08:11:03
I'd have suggested that from the start but thought you might have objects and the like in your rooms. If it's just a static image, that's gonna make things easier :)
You don't actually need a room background in that case, just put the background sprite on a GUI instead.

Yes same, if there are no moving things, no characters walking etc, it may be easier to just make a GUI with room image on background and and transparent buttons for hotspots. The only problem I anticipate is that AGS does not support pixel-perfect detection for buttons for some reason, so if you want to have that you'd need to either script click detection by reading their graphic into dynamic sprites, or by shaping hotspots out of several buttons.
#3483
Quote from: Baguettator on Wed 20/10/2021 16:46:42
The LineSpacing can't be modified in runtime ?

No, it's readonly. In theory this may be changed if really necessary, but tbh I cannot think of a proper use case. It's a font's property, which means that it will affect all places where this font is drawn at once.
#3484
It looks like either room template is corrupted, or was made in a old version of AGS, and not supported by the new editor.

If it's necessary, I might probably be able to tell more if you send me this room template.
#3485
Please tell if there's any error message when it crashes? Could you upload this font somewhere for us to check it out?

In regards to fixing the game, I think you may simply replace the font file in the game folder. It should be called "agsfntX.ttf" or "agsfntX.wfn", where X is font number.
#3486
It's  "LineSpacing", could be found in the font properties.

In regards to the problem, the TTF fonts in AGS currently have the issue of incorrectly reporting their size in some cases, I'm currently looking into this problem for 3.6.0.
#3487
Quote from: vga256 on Tue 19/10/2021 18:26:03
Given how specific my needs are for this project, I'd be hesitant to push for any kinds of changes to the engine/renderer code myself. Having a universal z-order, however, would bring AGS more in-line with other engines like Unity.

I have strong doubts about fully universal z-order, because that might overcomplicate it and allow users to do weird unexpected things. Currently I tend to think of AGS to have two separate coordinate spaces: UI and Room. Having everything in the same coordinate space would require a change of engine's paradigm (let alone complete rewrite of drawing logic, especially for the "software renderer").

But having just viewports sorted among UI is a more achievable thing and still logical in the AGS context imo. This basically makes room viewport an "overlay" with room camera drawn inside. I might have derived Viewport from Overlay now that I think about it; but with AGS development it's always been shoveling things in using the seemingly simpliest way...
#3488
I've been wondering for a while if that would be feasible to make viewports sort in the same stack as GUI. In the wip 3.6.0 we already made Overlays sorted among GUIs. With Viewports it's somewhat more complicated because they are sub-lists of things, so they would have to be fit in the middle of several lists of GUIs (unfortunately the way it's written currently, it's flat lists of drawn things rather than a proper "node tree"). But I think it's rather the issue of "ugly" code organization than the technical capability.

As for the workaround, if you are absolutely positive about having your viewport dragged above other GUI, then this goes down to simulating GUIs being covered by it. There might be several methods to achieve this. The dumbest I may think of is to resize GUI, reducing it's width and height (that will clip everything on it). However the problem with this is that the viewport may be dragged "diagonally" over one.

So, the trick may be to have each GUI composed of 2 identical GUIs with all controls repeated on them, sticked together. When viewport is dragged over this GUI, you resize one or both sub-GUIs to create a shape with a cut out side or corner.

EDIT: right, I realized that besides resizing GUI you will also have to offset its controls (depends on which direction you are resizing).

EDIT2: if you suppose the viewport may be actually small enough (resizing?), then it will be 3 GUI.

Here's a mockup of what I mean: black rectangle is the implied GUI border, colored rectangles are 2 or 3 GUIs that compose a larger pseudo-GUI, while white cuts are areas "covered" by the viewport:



#3489
Quote from: Skeevy Wonder on Mon 18/10/2021 22:33:59
Hullo! Is there a character to break up long lines of code or a hidden 'soft-wrap' feature in AGS?

Regular statements may be broken between any two operators or punctuation marks. I don't have 100% certainty when it comes to AGS, as its compiler contains obscure bugs, but I believe it suppose to work in most times.

For example:
Code: ags

Game.Camera.SetAt(100, 100);


may be written as

Code: ags

Game.
Camera.
SetAt
(
100
,
100
)
;


and will work just as the first one above.

Unfortunately, AGS compiler does not support wrapping the strings in code, so with them you'd have to combine longer string from smaller parts using String.Append or String.Format:
Code: ags

String s = String.Format("%s%s%s",
          "First part of a very long string",
          "Second part of a very long string",
          "Third part of a very long string");
#3490
I've bought few "early access" games in the past, including Minecraft, because they were relatively cheap and looked as a promising concept. But besides the price imho there's also another factor such as whether the game genre is prone to "spoilers". It's one thing when there's a procedurically generated game supposed to be replayed many times; but when there's a strong story focus, I'd prefer to play the final game release to not spoil it to myself, and not have to repeat same sequences over and over again.

As for demos, as Stupot said above, the whole point of a demo is to give a free of charge try of a game, so selling one is bizzare.

Although, tbh, personally I often get a pirated game from some torrent to check it out before deciding whether to buy or not, this works as a sort of more convenient "demo" for me.
#3491
Quote from: Peegee on Sat 16/10/2021 13:14:14
The real problem, what with "SaveGameSlot (1," room 1 initial state ");" and "ResetRoom (1);", to save and reload, the software is not able to reset neither the characters nor the variables, nor the contents of the inventory. Is this normal?

You're mixing two separate methods: ResetRoom does not reload your save, it resets only the room you were in. To reload a save use RestoreGameSlot.

There's an example posted by Khris some time ago:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=59511.msg636640201#msg636640201
#3492
Quote from: Peegee on Sat 16/10/2021 08:49:35
Hello, in fact I have the 3 characters which are playable. So when I go to my load page, I don't know which one is playable, I put the 3 in transparent and not clickable.

AGS has a "player" word, which refers to the current player character. So, when you write a generic code that may be used for any character, you just do, for example:
Code: ags

player.Transparency=0;
#3493
Quote from: Laura Hunt on Thu 14/10/2021 21:55:55
Quote from: Crimson Wizard on Thu 14/10/2021 21:37:19
But I guess this is also why the view editor needs multiple selection and being able to edit properties from multiple frames at once.

Agree, that would also be a very welcome addition. But I guess it would take more work?

Editor currently does not have any mechanism for this, there might be a default handling available for the PropertyGrid control, but I know nothing about that.
Someone has to research how this works first.
#3494
Quote from: Laura Hunt on Thu 14/10/2021 18:54:15
I'm not sure this is the best place to leave a suggestion, but right now, the only way to change the delay of a view frame is manually in the View editor, and it can get quite cumbersome if for whatever reason you need to change the values for a lot of frames. How feasible would it be to expose the view frame delay property to the script?

Delay is already exposed to script, but as a readonly property called "Speed". Making it writeable is mostly a matter of adding this field to savegames, otherwise saving/restoring game will make frame data inconsistent.

But I guess this is also why the view editor needs multiple selection and being able to edit properties from multiple frames at once.
#3495
Quote from: Peegee on Tue 12/10/2021 07:51:40
I sometimes replace the character with an object:
1- Because I can change its depth.

Could you elaborate on this, what do you mean by "depth"?

Quote from: Peegee on Tue 12/10/2021 07:51:40
How to move the character instantly?

Characters have "x" and "y" properties, so you do simply
Code: ags

cChar1.x = 100;
cChar1.y = 200;

or
Code: ags

player.x = 100;
player.y = 200;

for simplicity if it's a player character.

Quote from: Peegee on Tue 12/10/2021 07:51:40
What code to load a level, and have it reset each time?

By "level", do you mean a room?
You load a new room using player.ChangeRoom command. You reset a room using ResetRoom command. But if you need the room to be reset every time you enter it. then simply give that room a number above 300, like I explained in my previous post.

There are also good video tutorials by densming which I usually recommend. They are a little old, but most of the things still match recent version:
Here's the link to the youtube playlist
#3496
Hello.

Quote from: Peegee on Mon 11/10/2021 14:57:25
1- I am not very comfortable with GUI questions. On my "load a level" room, I would like to make a back button, but I don't see the button creation tool when I am on my room, what should I do?

GUI are completely separate from the rooms, they are created in their GUI editor. You could make a GUI, make it not visible by default, display it in the particular room using script command (e.g. gGui.Visible = true) and hide back in "room leave" event (gGui.Visible = false).
But there are other ways to make "buttons", for example you may also make one using a room object.
What method to choose depends on what is more convenient for you, and how do you make your "load level" screen.

Quote from: Peegee on Mon 11/10/2021 14:57:25
2- For some actions, I prefer to hide a character and replace it with an object, but after a while the animated idle arrives, unexpectedly. How to deactivate idle momentarily?

Answering your question directly, that would be Character.SetIdleView function, passing -1 as the "view" parameter would deactivate it, and later you would need to call it again with a proper view number to turn it back.
But it seems the issue here is rather that the character is not hidden properly, or even that it's replaced with an object.
Regarding hiding, how do you currently do that, are you changing their view to something that contains empty sprites? Note there are several methods of hiding them, e.g. they may be moved outside of the room bounds, or have their Transparency set to 100.
Finally, what is the reason to replace character with an object? Characters are superior to an object, they can do everything that object does. It's likely there's a way to make character do what you need without replacing them.

Quote from: Peegee on Mon 11/10/2021 14:57:25
3- When I load a level, if I start playing and load it again, I notice that it does not reset it. Is there a way for this or should I set the loading code to zero all items? I have very rich levels and dozens of variables.

1. AGS rooms may be state-saving and non-state-saving. Currently this is chosen only by its number: room numbers 1-300 are saving their states, and room numbers above 300 are not.
You choose the room number when creating them, and also may change them anytime by editing their "Number" property while in the editor.
2. If you want to reset the room state only in particular case, there's ResetRoom script function. Note that it will only reset objects and variables belonging to that room, if you want to reset also global variables and characters, you would have to do so by hand.
#3497
In regards to the lstSaveList.ItemCount++, I also must add. The way the ++ operator works, the value of the variable is used before ++ is applied.
For example:
Code: ags

int a = 10;
int b = a++;

^ here b will become 10, and then a will increase by 1.
#3498
Quote from: Blackleaf7 on Fri 08/10/2021 13:08:37
I'm trying to change the speech style from Lucas arts to SierrawithBackground but it will not change despite me changing it in the general game settings.

Do you characters have SpeechViews set? They need it to start using Sierra style.

Quote from: Blackleaf7 on Fri 08/10/2021 13:08:37
I tried using Speech.Style to change it manually but it said that the speech variable had already been defined

Please post how you wrote this in script, there might be a syntax mistake.
#3499
Quote from: bx83 on Thu 07/10/2021 01:14:36
What graphics card?

I don't think graphic card will be a problem with AGS, because in AGS engine most job is done by CPU due to how engine works; at least it should not appear because of a few big sprites on screen.

But for the reference it's Nvidia GTX 960 (2 GB)
#3500
I was able to notice change in fps with the "infinite fps" mode (as described above).

It roughly is like this: in a random room it runs at 550-600 fps, when I enter a trailer it's down to 520 fps, and there's also an interesting effect that when I move cursor around the big character it goes down to 420 fps. The latter is maybe related to tooltip gui keep redrawing itself.

There's also something strange with the "red kettle", when I hover cursor over it fps drop down to 300...

PS. I noticed that in the trailer there's a clock with a moving pendulum, wonder if it's the one causing this regular fps drop, as the character itself does not move much.

I don't see much slowdown in the "Dark Seed" house still.


My computer is Intel Core i5-6500 (3.2 GHz) with 16 GB RAM.
SMF spam blocked by CleanTalk