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

#1601
There's a problem found in the most recent update, RC4, which causes crash on startup under following conditions:
- OpenGL graphics driver
- Your computer has a ATI graphics card.

Following is a temporary build with a fix:
https://cirrus-ci.com/task/5996131579068416
#1602
Please note that you can create templates yourself from your game, if you do "File" -> "Make template from this game". The template may be placed either in "Template" folder inside Editor program files, or "C:\Users\<USERNAME>\AppData\Local\AGS\Templates". This way AGS will see your template and let you choose it when starting a new game.

In regards to BASS template. It does have a Save/Load gui, but it may only be called using a keyboard (F5/F7).
This is indeed a problem, and recorded here:
https://github.com/adventuregamestudio/ags-template-source/issues/28

We accept patches to template sources, if anyone wants to address these issues.
#1603
Quote from: Radiant on Thu 15/02/2024 10:38:52Suppose I have a big while loop in repeatedly_execute that I rather want to optimize, does it make sense to "cache" certain things in local variables, e.g. use
Code: ags
int f = enemy[n].flags;
and then use f in further comparisons instead of looking up enemy[n].flags every time?

(I'm talking about line-of-sight and distance calculations on a large grid, they seem to be a bit CPU-intensive, esp. on older systems)

With AGS script it's not always obvious which combinations of commands lead to faster or slower code, because some operations are done simply suboptimal from the start, and some became less optimal after the script interpreter got rewritten in AGS 3.3 for compatibility with 64-bit computers and other reasons.
So this may be only found by trying and comparing.
EDIT: I think i'd mention that 3.6.1 has a good performance improvement to running scripts compared to 3.6.0, getting overall perf close to 3.2.1 (but it still somewhat slower).

But even if we talked about the real language, usually it is better to look which options exist for a logic optimization first, that is something that would reduce number of processed objects, for example, cutting some early, by checking something that is faster to check.

I do not know your case, but if it's a big game world, then an example of a bigger optimization is dividing a world into smaller cells, where objects may only interact with objects in this and neighbour cells. This is achieved by having auxiliary object reference arrays per cell, and other things. I think the proper term for this approach is "spatial division" or "space partitioning".
#1604
Existing compiler in 3.* versions does not perform any mathematical calculations at compile time.
Enums are replaced with literal values at compile time (just like preprocessor macros made with #define), their names are never saved into compiled code.

New compiler in AGS 4 branch calculates certain things at compile time (but I don't remember all details).
#1605
For the record, the root of the problem was found in Discord chat, this was because there was a second ProcessClick call later in on_mouse_click.
#1606
Quote from: TonyD on Tue 13/02/2024 22:31:10This is going to be a bit of a noddy question, but I've not really touched the global variables part of the engine yet, what would be the type & initial value? I'm guessing type is a string and the value is the x,y?

Better try using Khris's variant first. I might have had a wrong idea about what kind of behavior is required, and the solution that i proposed may be overcomplicated for your case.
#1607
Quote from: Khris on Tue 13/02/2024 14:06:42You can do this with animation frames only; the idea is that the character's pixels move "backward" inside the sprite while the sprite moves "forward".
This causes the character's body to appear in place while their x/y coordinate still changes according to standard movement.

But how would a character sync with its position later during the next animation cycle?
I guess this would require to also make the image move "forward" faster than the movement during the first phase?
But then I also wonder whether there will be a jump if character stops anytime.
#1608
Quote from: TonyD on Tue 13/02/2024 13:38:35So this is for the main player character for their normal walk in-game rather than for a set animation to be played at some point. With that in mind, is what you suggested still a potential solution?

Yes, this solution may work for any character, and for multiple simultaneous characters too (in which case you would need to make an array of variables to store the custom walking info for all of them).

EDIT:
There might be additional problems here, such as a need to stop the custom walking in case player interacted with something while character was walking etc. So this may take time to figure out and resolve all potential issues.
#1609
AGS does not have such feature built-in, so this has to be done by scripting a custom movement.

I do not have a ready code example, but my thinking is this:
- save the walk destination (x,y) in global variables, and start the walking;
- in function repeatedly_execute check if the character is walking, and which animation frame it is;
- - if character is walking, and this is a frame where character should pause, then stop walking, and run animation using Animate command (non-blocking)
- - if character is not walking, but a destination is saved, and animation has finished, then order to walk towards destination again.
- when character reaches the destination, reset the global variables (in order to avoid unnecessary walking further).


On a side note, I believe that such feature is worth planning for the future versions of the engine.
#1610
I asked blaholtzen for some assets and made a simple test game:
https://www.dropbox.com/scl/fi/2mygs4whl89hvqg135j7z/test-ags4-directionratio.zip?rlkey=jvs4msnp7zx8ja3tylaahh4p7&dl=0

Although it seems that the loop direction ratio is not enough, it would need some method to control character movement too. Maybe I'm missing something.
#1611
UPDATE
This feature implementation is discussed here in this topic:
https://www.adventuregamestudio.co.uk/forums/editor-development/feature-request-character-direction-ratio/

There's already a test build available (based in AGS 4.0), but we need some kind of a test game which would prove that the functionality serves the purpose.
#1612
For the record, this is the most recent topic discussing the need of this feature, containing diagrams and test results:

https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/switching-angles-of-diagonal-character-loops/

Maybe something like game example in this thread may be reproduced for a test.
#1613
MOD EDIT: please note that the further discussion about facing angles was split into a separate thread:
https://www.adventuregamestudio.co.uk/forums/editor-development/feature-request-character-direction-ratio/
#1614
Unfortunately, there's no proper testing process going on here. I can tell that my changes formally work, but I cannot tell whether this works as expected and is enough to solve the user problem. Except maybe "downhill" effect, which seems to be distinct enough.

I would really appreciate if someone could provide a test game, or at least a set of graphical assets, that would let to test and see that the result matches intent with full clarity.

EDIT: Another thing, it just came to me that the original request by @Nurz in this thread was about different thing and not really solved by the functionality that I added. Somehow I got confused. As I re-read this thread, it looks like it deviated from discussing initial suggestion.
I might have to separate this experimental functionality that I did into another thread.
#1615
Since backing game up came up in this thread, I might also recommend learning "source version control" tools, such as Git, Mercurial, SVN etc. In very simple terms, these tools create a record of history of changes, where each step has an optional description, and you can see what did you change, and even revert to previous steps if necessary.
#1616
Quote from: Brian925 on Sat 10/02/2024 21:14:20....on an unrelated note, 76,000 views for this thread is odd lol

I have a feeling that these view counters are broken. Or maybe it's a result of spam robots loading these pages.
#1617
Quote from: Brian925 on Fri 09/02/2024 18:53:46This is mid fade. The outline of the entire image suddenly shows up then disappears, ignoring transparency

https://imgur.com/a/FwGqhiB

It's not entirely clear what do I see on this photograph; but supposing that the button is in the bottom-left corner, and that by "outline" you mean the whole greyish rectangle, then maybe this is caused by interface becoming disabled during the transparency change. If that's so, then this may be fixed by going to General Settings and changing value of "When player's interface is disabled, GUI should" to something else besides "Grey out".
#1618
Quote from: Brian925 on Thu 08/02/2024 17:14:21when I switched to GUI buttons, the images I'm using are now showing a subtle rectangular outline of the entire image when they fade to 100% transparency. Is that just to be expected with GUI buttons?

No, this is not supposed to happen.
Could you post a screenshot illustrating this problem?
#1619
The IsInterfaceEnabled is the closest that I might think of.
https://adventuregamestudio.github.io/ags-manual/Globalfunctions_General.html#isinterfaceenabled

But there's also a way of automating this using "When player interface is disabled, GUI should..." setting in General Settings, one of the choices there is "Be hidden". Individual GUIs may be excluded from this by setting their PopupStyle to "Always shown". I think they still may have their Visible state toggled by a script command.
#1620
Quote from: cat on Wed 07/02/2024 19:44:32I have a very weird issue with 3.6.1 (RC2 and RC4) related to "ShowPlayerCharacter". When I set this to false in my starting room (a title screen) the mouse cursor is invisible.
<...>
I can directly relate this to the "ShowPlayerCharacter" setting of the starting room. I searched the manual but wasn't able to find anything related to this setting. Is it even accessible in code?

According to the engine code, "ShowPlayerCharacter" disables the "Walkto" cursor mode.
Accidentaly, BASS template uses "Walkto" mode as default, even though it's just a pointer graphic.

Possible solutions are:
1. Fix BASS template to use another default cursor mode instead, like Interact or Pointer.
2. Enable "Walkto" mode right after room is loaded (using Mouse.EnableMode().
SMF spam blocked by CleanTalk