Ok, done in your branch, so you can choose if you want Follow(null) or StopFollowingAsync depending if you want to stop the current walk or not.
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 MenuQuote from: cat on Sat 17/11/2018 16:18:14Yeah, I'm not really sure what's the best way to handle it yet.
Another question: if follow(null) can cause problems, wouldn't it be better to remove this synchronous call completely?
Quote from: cat on Thu 15/11/2018 19:05:29Should be fixed now, and also:
However, when it comes to the line Characters.Mortimer.Follow(null); the game freezes. I cannot even move the mouse cursor anymore.
Quote from: cat on Thu 15/11/2018 19:05:29Ah, so if you want to stay in the vicinity of the cat, then you don't want to wander off at all, so I'll put it at 0. Wandering off is basically going wherever in the room without care for where the target is.
On a different note: I tried the setting
Characters.Mortimer.Follow(Characters.Cornelius, new AGSFollowSettings(true, 80, 0, 10, 140, 160, 0, 10));
This works almost as desired, but the character will wander off till the end of the walkable area (much farer away than 160 pixel), is it possible to limit this somehow?
new AGSFollowSettings(wanderOffPercentage: 0,
minWaitBetweenWalks: 0, maxWaitBetweenWalks: 10,
minXOffset: 140, maxXOffset: 160,
minYOffset: 0);
Quote from: morganw on Wed 14/11/2018 23:27:04The restart is something I do on purpose, as I need to install the fonts because of a bug in mono (and also: this).
From what it printed to the console it looked like the entire application was relaunched once it was finished scanning for fonts.
ProcessStartInfo info = new ProcessStartInfo("fc-cache", "-f -v") { UseShellExecute = false };
ProcessStartInfo info = new ProcessStartInfo("fc-cache", $"-f -v {LINUX_FONT_LIBRARY}") { UseShellExecute = false };
Quote from: morganw on Wed 14/11/2018 23:27:04So it's probably not related, but just for sharing, the engine will use the default system font if you didn't specify your own font, and the demo game does use the default font in some places.
Does the actual engine rely on the built-in fonts?
Quote from: cat on Wed 14/11/2018 20:26:24So looking at the manual, the first parameter is the distance the follower will stand from its target, and 150 means "about" 150 pixels. I don't know what "about" means exactly, haven't looked at the code, but let's assume that it's give-or-take 10 pixels.
Next topic: following a character. I now realize that Cornelius Cat uses quite a lot of different features for such a short game
In the original AGS game I use the settingCode: ags cMouse.FollowCharacter(cCat, 150, 0);
This results in the mouse somewhat following the cat, but mostly running around, even when the cat is standing. How do I have to set the values in AGSFollowSettings to achieve the same?
mouse.Follow(cornelius, AGSFollowSettings.Companion());
//It will also allow you to override specific settings, for example:
mouse.Follow(cornelius, AGSFollowSettings.Companion(wanderOffPercentage: 0));
Quote from: cat on Wed 14/11/2018 20:26:24Should be fixed now (in your branch).
Edit: Btw, there seems to be a problem when un-following a character with Follow(null):
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=AGS.Engine
StackTrace:
at AGS.Engine.FollowTag.AddTag(IObject target, IEntity follower) line 23
Quote from: cat on Mon 12/11/2018 19:54:21Done.
It works except for one thing: I set the default cursor via the constructor, but it is only applied after changing to the inventory cursor and back. Of course I could set the cursor myself, but actually I'd expect this to happen automatically when TwoButtonsInputScheme.Start() is called. The same applies for the setter of the DefaultCursor property.
Quote from: cat on Sun 11/11/2018 19:22:12I'm still not finished with this, but I pushed just enough so it should work for you as you expect, I hope.
Btw, is it on purpose that the text wraps left-aligned instead of centered? It doesn't look that nice, especially when there is only a word or two in the second line.
Debug.Listeners.AddRange(new TraceListener[] {new ConsoleTraceListener()});
Debug.WriteLine("Starting Demo");
Quote from: morganw on Mon 12/11/2018 00:12:21Did you install the flatpak version? Even though it's the "recommended" version according to their website, it's actually broken with regards to dotnet standard. I was able to debug using their legacy version.
Unfortunately I can't get the debugger to attach (this seems to be a common monodevelop problem)
Quote from: morganw on Mon 12/11/2018 00:12:21Did you try the release build or the debug build? You should get at least some console printouts with the debug build, or there really is something happening very early on.
and running without the debugger doesn't seem to do anything (I guess the program is just exiting).
Quote from: morganw on Mon 12/11/2018 00:12:21I'm not sure what's the minimum requirement, but it seemed to work fine with OpenGL 2.1.
One thing I didn't think to check, what is OpenGL requirement?
Quote from: cat on Sun 11/11/2018 19:22:12Should be fixed now (still same branch).
When the player performs a right click when an inventory is active, there is a null reference exception at AGS.Engine.TwoButtonsInputScheme.SetInventoryCursor(IInventoryItem inventoryItem) in line 37
onRightMouseDown sets the ActiveItem to null, which then triggers the OnPropertyChanged handler.
I'd change SetInventoryCursor to reset the default cursor when null is passed and the active inventory is null. This would help regarding the exception, but also allow the programmer to change back the active inventory programmatically. This is needed when I use the active inventory item on a hotspot and this results in me losing the inventory item.
Quote from: cat on Sun 11/11/2018 19:22:12Right, I was doing copypasta from the rotating cursors scheme...
Another issue: You might want to check if the previous cursor should really be changed. Otherwise, there will be weird issues when setting two active items after each other without returning to the default cursor in between.
Consider renaming _previousCursor to _defaultCursor, then it will be more clear. You could also provide a method SetDefaultCursor. This way you can safely change the default cursor, no matter if there is currently an inventory active or not.
Quote from: cat on Sun 11/11/2018 19:22:12Ok, I don't have any preference myself, so I changed it to 70%.
Works, but 80% seems a bit too much. Maybe 70% is enough? (But this might be because of my setup with the stage frame around it.)
Quote from: cat on Sun 11/11/2018 19:22:12Not on purpose, but a bit more complicated to get right for all text rendering scenarios, I'm working on it and will update.
Btw, is it on purpose that the text wraps left-aligned instead of centered? It doesn't look that nice, especially when there is only a word or two in the second line.
QuoteGreat feedback!
However, this does not work with the TwoClickInputScheme. I will rewrite it, but the question is: What is the best approach? I could
- Add a method for setting the active inventory to the TwoClickInputSchemeclass (public void SetActiveInventoryItem(IInventoryItem inventoryItem)). This is pretty simply but has two disadvantages: I have to remember to call it and I will somehow have to have a reference to the instance.
- The next idea is to subscribe to repeatedly_execute in the TwoClickInputScheme and continuously check for the active item. This would be the AGS-style approach, but it feels unnecessary to do the check every cycle when the active item only changes ever so often. Which brings me to my third idea:
- Is it somehow possible to attach an observer to ActiveItem? Then the InputScheme could just subscribe to it and do the cursor handling accordingly. The AGSInventory.Items property is already a BindingList, is there something similar for basic properties?
cornelius.Inventory.OnPropertyChange(nameof(IInventory.ActiveItem), () => scheme.SetInventoryCursor());
QuoteSo 2 fixes here:
The character switches to the speak animation but still moves towards the walk-to-point. Since there is no 'speakandwalk' outfit, I guess the character should stop walking?
When the say async is done, the character will quickly slide to the walk-to-point without any animation. This happens no matter if I click to stop the sayasync or not.
cornelius.Outfit[AGSOutfit.SpeakAndWalk] = cornelius.Outfit[AGSOutfit.Walk];
QuoteThe default label size for speech is now resolution dependent (by default it's 80% of your virtual resolution).
the default label width is 250 but your game is high resolution so makes sense to have a bigger label -> we should probably make the default label size resolution dependent).
QuoteFixed, it's now centered above the character.
The default position of text shown for character.SayAsync is a bit strange: it is a bit above (OK) but on the right side next to the character. Why?
Quote from: Ali on Thu 25/10/2018 13:51:28Not obvious to me at all.
Obviously, I would never hug someone in real life.
Quote from: Kastchey on Thu 25/10/2018 19:49:19Ha, I wonder what happened to my previous avatar, it just vanished out of thin air. Oh well, new/old avatar is back on.
I call out to all avatarless huggers to get themselves an avatar.
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.069 seconds with 16 queries.