Software instability?

Started by Peegee, Sat 09/04/2022 13:19:02

Previous topic - Next topic

Peegee

Hello, I made about 7 levels of my game. These are rich levels, many varied systems, characters, objects. I did not change version of AGS.

I make a version, I test from the beginning, I find a lot of things that worked before and that don't work well anymore, especially in terms of characters, guys who disappear, change, turn around, shit. These are levels that have been tested a lot.

Weird stuff happens even for the main characters. Before, I sent one somewhere, it kept walking while I could select another one. Now the first stops as soon as I select the other.

Has anyone had this kind of problem before?
Am I at the limits of the software?

eri0o

You probably aren't, but it's better to make a list of what you are observing, and try to reproduce these in minimal games, where you use either one of the templates or the empty game template and reproduce each observed bug.

If it's a bug, it will make it easier to reason and understand what's happening and then fixing.

If it's not, it will make easier for you to understand the relationship in your different systems and see how things are affecting each other.

Peegee

I don't understand what you mean. Reprogram the whole game? Everything had been working for months.

Crimson Wizard

#3
It is impossible to answer your question, because there's not enough details about the problem. We know nothing about your game, or rooms, you gave a very obscure description.

When dealing with issues like that it is important to narrow down the problem, and describe them in most detail. Take one problem at a time too.

For example, you have issues with character walking, or turning (I could not understand this very well). Take that problem, describe what you were trying to do in your game, describe what kind of errors occur. Show relevant part of your script. Otherwise no one will be able to help you.


On another hand, what eri0o was suggesting: to leave your big project for a moment, and make a very small mini-game that contains only certain code, related to one functionality (like character movement, for example) from your bigger game, and test that code in a smaller game. Then take another piece of code and do the same, and so on. Such approach sometimes helps to flesh out separate parts of the game.

Cassiebsg

There's also the possibility that you have introduced new code that is now conflicting with your old code.
There are those who believe that life here began out there...

Snarky

Quote from: Peegee on Sat 09/04/2022 13:19:02
I did not change version of AGS.

You also did not tell us what version of AGS you are using.

Peegee

Thank you for your answers. I am using version 3.1.5.9.
I don't know exactly when it started to bug, since I've been working on the last 2 or 3 rooms probably, but since then, the whole beginning of the game which worked perfectly has lots of problems especially around characters, eNoBlocks. I change where it messes up. For example, I have something that I can't solve. When the character returns to its Right position, it does a rotten little flip.

By making modifications, for example if I add player.FaceDirection(eDirectionRight, eBlock); before the ChangeView(2), it will fetch me a frame from view 51 (which would be logical) but it puts the anim 3 (up), which doesn't make sense.

Code: ags


function oPied_UseInv()
{
if (cGob1.ActiveInventory == iMarteau)
{
  player.Walk(611, 426, eBlock, eWalkableAreas);
player.FaceDirection(eDirectionRight);
player.ChangeView (51);
aClou.Play(eOnce);
player.Animate(0, 3, eOnce);
cArbre.ChangeView(50);
oPied.Visible=false;

cArbre.Animate (2, 3, eOnce,  eNoBlock);
player.Animate(1, 3,  eOnce, eBlock);

player.ChangeView(2);
player.FaceDirection(eDirectionRight, eBlock);

cArbre.ChangeView(14);
cArbre.FaceDirection(eDirectionDown);
cArbre.Clickable=true;
aArbreTalk03.Play(eAudioPriorityHigh, eRepeat);
cArbre.Say ("Whaaaa, merci, céleste korrigan,[trop cool !!");
aArbreTalk03.Stop ();
SetTimer(2, 0);
player.AddInventory(iClou);
DialogueArbre=DialogueArbre+1;
player.ChangeView (2);
player.FaceDirection(eDirectionRight);
}
}


2 other general problems that happened overnight: I send a character somewhere, it works, I select another one. Before, the first character continued on his way, now he stops.
When my character speaks to someone in profile, the profile chat anim no longer loops, he continues to speak from the front. I lengthened the loop, cut the texts but it's not normal, and potentially problematic for localizations.

Khris

Until proven to be wrong I'm going to assume that all of these are user errors, because that is always the most likely explanation.
The suggested alternative that AGS has somehow gone mad and randomly changes things is also nonsense until proven to be correct (it should also be noted that there have been a ton of minor bug fixes since version 3.1.5.9)

The FaceDirection command in line 7 for instance isn't blocking, so changing the view right after can generate weird results I guess.
You are also not using LockView() before calling Animate() and UnlockView() after, so the weird behavior you describe is again expected if you don't do what the manual says.

As for stuff that used to work in previous rooms: rooms aren't isolated. Any global change you make can affect existing rooms in various ways. Beginners tend to do stuff like use on_event without the necessary precautions like checking player.Room first, so again, all of this is 99.99% basic user error.
Switching characters makes a character stop? Chances are your own code is actively doing this.

Snarky

Quote from: Khris on Mon 11/04/2022 10:04:55
(it should also be noted that there have been a ton of minor bug fixes since version 3.1.5.9)

AGS 3.2.1 came out in 2011, so unless this project has been going on for well over ten years, I'm going to assume that this is a misprint for 3.5.1.9 (which is from July 2021).

In any case, these are pretty obviously user errors, not AGS bugs.

eri0o

#9
@Peegee, can you explain a bit more on the systems and what you are trying to achieve? It looks like they are interacting with each other in unplanned ways, so this should help figure these out.

I strongly encourage to think on how to break these systems a part so they can be tested in a new project, it will be easier and faster to go through the bugs you are facing.

I noticed in your code you didn't leverage the speech system that is available in AGS, is there a particular reason for it? If you just were unaware, we can explain it!

See more here: https://adventuregamestudio.github.io/ags-manual/MusicAndSound.html#voice-speech

QuoteWhen my character speaks to someone in profile, the profile chat anim no longer loops, he continues to speak from the front

This is weird, can you make a small example that makes this happen?

Also, AGS is community developed and maintained, with the brutal majority of the code written by CW, but in general, you can think of it as game developers making the tool they themselves use, it's a bit different of other softwares where the person doing it is more disconnected from the users.

Peegee

That's it, I found a solution for this problem, I launch an anim of a frame, man profile, in view 51, before the ChangeView. But that's not the only kind of weirdness going on.

I test my second level, same, full of problems. As soon as there is character, eNoblock, Wait, sequences of more or less subtle anims, it no longer works.

I'm not a programmer, not of a super logical mind so I groped a lot to program these sometimes complex systems, certainly not always in the best way. I spent months on each level, they were tested and stayed by different people and overnight they bugged everywhere. I understand that it doesn't make sense that a code that works one day doesn't work the next. Currently I have 50 characters, 142 views, 8 rooms, 2467 sprites and am of course on AGS Editor .NET (Build 3.5.1.9).

It's true that I didn't follow the manual to the letter, I don't understand English perfectly and when I'm looking for something I often find the explanation too brief. I learned empirically with the help of a friend and as I went. I don't know LockView, what is it for? Same for the speech system, thank you for enlightening me.

The 2 "general" bugs, the guy who stops when you select the other, whereas before he continued, it's an aspect of the program that I've never touched, which has always worked since the beginning. The same goes for the chat loop of the character in profile, which no longer loops, he continues to speak from the front, I've never touched that.

I'm on a character: we click on the door, he sticks his head out, speaks, then his body, speaks, then walks... all that is completely destroyed and I can't put it back. Maybe with LockView it will be better? Does it allow the character to get out of more views to put them back in their two main views, normal and speech?

Khris

Here's the manual entry for Character.Animate:
https://www.adventuregamestudio.co.uk/manual/ags46.htm#Character.Animate

It explains how and why to call LockView before animating a character.

eri0o

#12
@Peegee, when you say

Quotethe guy who stops when you select the other

Can you elaborate what you mean? What exactly you are doing?

Instead of trying to go about everything it's better to focus on each part, one at a time and try to to figure things bit by bit, ok? Otherwise it's hard to understand.

QuoteIt's true that I didn't follow the manual to the letter, I don't understand English perfectly and when I'm looking for something I often find the explanation too brief.

When you don't understand the manual you should ask about the entry here and we can figure on how to improve it together. The manual is actually a Wiki where anyone can contribute and modify the text - I receive a notification for each change though, so if someone writes something that's not appropriate for some reason I may remove, but this hasn't happened yet, and the manual has been opened for public edits for some years now. This is really a collaborative project, using AGS with the mindset of a company behind it or a focused group won't work.

If you see an issue with the manual you can open a ticket here: https://github.com/adventuregamestudio/ags-manual/issues

Peegee

Over time I ended up figuring out how to make things work for my game.
In my game there are 3 characters with different functions. I can select them by clicking on them or on a thumbnail (GUI). When I click on the ground, the man moves to this point. While he's walking, before, I could select another character and move him too. The two characters were walking at the same time. I didn't do anything to program it, it worked like that from the start. Now the first stops, I don't know why.

eri0o

So, this doesn't look like a function from AGS. Are you using the Tumbleweed Template? Is this a function used from Tumbleweed?

The Tumbleweed Template was (and still is) a popular template here, so in the past it was decided to ship it along with the Editor releases, but it's all scripted in AGS itself - meaning it's all things you can achieve through AGS script, without any need to modify the engine. Currently I help to maintain it too, and transcribed the original docs in the AGS manual itself.

https://adventuregamestudio.github.io/ags-manual/Tumbleweed_player.html#verbssetplayer

You mean you are using SetPlayer from the Verbs? Can you add an image to explain what are you doing?

The templates are just a way to share something that is hard to encompass in just a script module, and usually includes more things along, but ultimately you can edit their behaviors easily by yourself. The tradeoff of them is when updates are done in templates, there's no easy way to get them, because the template after you start using is your game - a module is easier to delete the scripts and import the new version to the project.

Peegee

I use the basic BASS model. I don't use verbs. What exactly do you want a picture of? In fact I managed to catch up with the problems of the first level but not in the second, I don't even see any consistency, it doesn't launch the right anims.

Crimson Wizard

Quote from: eri0o on Mon 11/04/2022 14:30:19
So, this doesn't look like a function from AGS. Are you using the Tumbleweed Template? Is this a function used from Tumbleweed?

Changing player character is a function in AGS too:
https://github.com/adventuregamestudio/ags-manual/wiki/Character#charactersetasplayer

eri0o

I don't understand when you mentioned you have an interface to change the player character which you did not code. Afaik, there's none, so I must not be understanding what you mean when you say that, so having any pictures at all may help undo possible confusions. Maybe you mean the AGS Editor and not in game, but I really don't understand at all what you mean.

Cassiebsg

Since your game seems to be in French, I'll assume your language is French.
Just wanted to say that there's an AGS French community, though I'm not sure how active they are. But maybe they could be a source of help to understand the manual. ;)

About changing view, lock view and animate view... if you are changing the view to play an animation, you are doing it wrong.

Like said above, if you want to animate your player with a different view use (exemple from the manual):
Code: ags

character.LockView(12);
character.Animate(0, 0, eOnce, eBlock, eForwards);
character.UnlockView();


ChangeView you should only change, if you need your character to look different... maybe he changed clothes, or you want to show him with a new hat or an object on his hand. (and you will be walking around like that). Or if in a room you need to change him to a different angle of the walking animation...

Meaning that this part of the code should look something like this:
Code: ags

player.LockView(51); // note that you can use the name of the view but with all CAPS... vView = VVIEW instead of the number 51 
aClou.Play(eOnce);
player.Animate(0, 3, eOnce, eBlock, eForwards); // or mabye eNoBlock? (I suggest you always specify, or it might not do what you want)
cArbre.LockView(50);
oPied.Visible=false;
cArbre.Animate (2, 3, eOnce,  eNoBlock, eForwards);
player.Animate(1, 3,  eOnce, eBlock, eForwards);
player.UnlockView();
player.FaceDirection(eDirectionRight, eBlock); 
cArbre.UnlockView(14);

There are those who believe that life here began out there...

Crimson Wizard

#19
Quote from: eri0o on Mon 11/04/2022 16:19:24
I don't understand when you mentioned you have an interface to change the player character which you did not code.

From what I understand, it was said about the walking behavior, not interface:
Quote from: Peegee on Mon 11/04/2022 14:10:14
When I click on the ground, the man moves to this point. While he's walking, before, I could select another character and move him too. The two characters were walking at the same time. I didn't do anything to program it, it worked like that from the start. Now the first stops, I don't know why.

SMF spam blocked by CleanTalk