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 - tzachs

#81
Madame Sky

I appreciate your concerns, but I assure you that I feel no pain whatsoever. I don't need to sit or rest, in fact I'm anxious to try and exercise my newfound abilities. In fact, if any of you have a dead person with whom you wish to communicate, please let me know, and I'll do my best.
#82
Madame Sky

Ah, my sweet and kind Benny, thank you for your consideration, dear. Yes, I would have my cards back now, thanks.
And thank you doctor, yes, I feel fine, no back pains at all. In fact, I have never felt better in my life.
#83
Madame Sky

//Eyeing Angelica

I'm fine, sweetheart, thanks for asking.

//Turning to Mary

My dear, there is nothing I would like more than a glass of water. Unfortunately I no longer trust any drinks in this place.

//Put her hands on her neck, then smiling a smile of relief

Well, it looks like I'm back from the dead!

//Staying silent for a few seconds, for a dramatic pause, then speaking while looking at the floor, slightly shaking

I.. have a confession to make.
I am a fraud. Or rather, I was a fraud. I was using Mr Green's services to get info on people and use them to prey on the gullible.
I am ashamed and truly sorry.
I was trying to follow the footsteps of my ancestors but I just didn't possess any of their powers.
That is, until now.

//Looks back up, suddenly with newly found confidence.

i just had an eye opening experience. You see, I have never been close to another person's demise.
Once I touched the body of poor Mr. Harlington, it's like everything came to me at once. It opened the gates and released my powers.
I had visions like none before.
I smelled mud and tasted blood in my mouth. This is not my memory, but Mr. Harlington's memory, in that I'm certain.
I felt a crushing weight pressing down on my body. As I tried to get around it and escape from it in a panic, I noticed, for a brief moment, a triangular gap in whatever was on top of me.
In the gap I saw the sky and then a rifle barrel appeared. The bayonet at the end of the barrel prodded around above me for a bit. Then I sensed footsteps moving on.

Does this ring a bell to anybody? Did you see anybody carrying a rifle? Colonel, do you carry a rifle? Is there any place around here which has mud and we can perhaps go and search?

Anyway, this concluded my vision. Following that I was able to float in the air here and listen in on your conversation.
Now, checking my pockets it seems that my precious tarot cards are missing.
They could not have left the room. As I floated in the air I saw 3 people kneeling over me: the doctor, Mr Green and our sweet host.
Did one of you, perhaps mistakenly, take my cards? Can you expose what you have in your pockets so we're sure?
Or, rather, if you did nothing wrong, surely you won't object to a third party, like Mary here for example, to perform a little body search on you.
#84
In Mittens New Orleans we went to a voodoo museum/shop, and I sat next to a slightly creepy yet kinda cool voodoo dude. And we talked a little bit, I don't remember exactly what he told me but he basically presented himself as an expert on voodoo and invited me to ask him questions.
I'm sure you can guess what I asked him. And he seriously replied and told me stuff about voodoo.
I'm both proud and ashamed of that moment. :-[
#85
The Rumpus Room / Re: Group hug!
Thu 11/10/2018 18:43:42
The awkward hugger joins:
#86
Quote from: cat on Fri 05/10/2018 19:49:51
What does the ? do in
Code: ags
_bottle?.GetComponent<IHotspotComponent>().Interactions.OnInteract(AGSInteractions.INTERACT).SubscribeToAsync(onBottleInteract);

The "?." is called the null conditional operator (sometimes nicknamed "the Elvis operator"). If "_bottle" is null it will skip the subscription afterwards.
Here's some more details on this operator: http://www.informit.com/articles/article.aspx?p=2421572
#87
Quote from: cat on Fri 05/10/2018 19:49:51
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?
Because for some reason I thought the text should go to the right of the character (I was imagining a speech bubble).
Sorry, will fix soon.

In the meantime, you can set a TextOffset for your characters with a negative x to move the text to the left (you can also set a bigger label size so the text in the screenshot won't wrap, 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).

For example:
Code: csharp

cornelius.SpeechConfig.TextOffset = (-100,0);
cornelius.SpeechConfig.LabelSize = (500,500);
#88
Madame Sky

I'm also not shocked by this. I got my psychic senses tingling since the first second I entered this place. This poor man, I can see that his soul was haunted by something.
#89
From the stacktrace it seems that the issue is related to the way you created the walkable area, can you write the code you used for that (or send me the current project)? Thanks.
#90
Quote from: Crimson Wizard on Mon 24/09/2018 21:23:22
Since I was referencing examples of my work I decided to update my games to the latest version of MonoAGS too. Some issues were easy to fix, but I am currently trying to figure out what happened to the IImageRenderer interface which I implemented as SpriteFontRenderer in my game.
The IImageRenderer interface was removed and replaced with IRenderer and IRenderInstruction, see this PR: https://github.com/tzachshabtay/MonoAGS/pull/279
This was a follow-up to our discussion on refactoring the rendering logic: https://github.com/tzachshabtay/MonoAGS/issues/207

For the most simple example of this in action, see the pivot renderer component (basically just draws a cross where the pivot point is): https://github.com/tzachshabtay/MonoAGS/blob/master/Source/Engine/AGS.Engine/Graphics/Drawing/PivotRendererComponent.cs

Quote from: Crimson Wizard on Mon 24/09/2018 11:54:42
You may find different use cases for the Origin (I will use this term, which is equivalent to Pivot at the moment) within same game or even within same room.
Sure, I'm not disputing that, I'm just not sure we understood each other's point. What I argued against is your quote about "not relying on engine defaults and creating utility functions". I think that if you build a standard point & click game with this engine, then most chances are that the defaults match what you need (and if that's not the case, we should change that). If you're creating a different genre game, or have fancy non standard puzzles/sequences in your game, then yes, you might want to create utility functions for those (or, perhaps, we might have in the future, a feature similar to Unity's prefabs, that you can use instead of utility factories), but I don't think that applies to the vast majority of the games that will be created with this engine, and I don't think it applies to cat's game which is a standard point&click (mechanics wise, ignoring the wonderful puppets ;-D) with standard puzzles.
#91
Quote from: cat on Thu 20/09/2018 21:36:31
When I use this and click somewhere, nothing happens in the game but I see an exception in the output window:
Exception thrown: 'System.IndexOutOfRangeException' in AGS.Engine.dll
I can't reproduce this, so I need more information.
Is this the entire error message, no additional stack trace? Also, where did you put this code? And can you also write the code you used to add the walkable area? Or alternatively, can you send me your project again (with the error reproducing)?

Quote from: cat on Thu 20/09/2018 21:36:31
I used Bitmap.SetPixels() with a list I built using nested loops. Is there a better way?
...
I want a rectangle that doesn't cover the whole screen, only a small part.
Not necessarily better, but you can get an empty bitmap as I said before, and then add a translate component which gives you the ability to "move" an area on the screen.
It will look something like this, for example:
Code: csharp

var bitmap = factory.Graphics.GetBitmap(1000, 1000);
var mask = factory.Masks.Load("walkablemask1", bitmap, true);
var area = factory.Room.GetArea("walkablearea1", mask, _room, true);
area.AddComponent<ITranslateComponent>().X = 2000f;


Quote from: cat on Sun 23/09/2018 11:12:52
Sorry I have to correct you, but at least with version a4b22 the default pivot point for objects is 0.5, 0. I looked at it via debugger and when I reset the pivot to 0,0 the object is moved to the correct position.
I agree about the character pivot point and reasoning, though.
Ah, right, I think I changed it to all images after realizing the same logic applies, you can have multiple animations with different widths and it makes it easier to align by default (and also it's more consistent). I don't necessarily have too strong opinions on this, willing to discuss if you have a better suggestion.

Quote from: Crimson Wizard on Sun 23/09/2018 13:29:00
I think in the end it may be worth to not rely on engine's defaults and have a set of utility functions that init objects of different kinds. For example in the racing game I've referenced above I had function that setup a racing car object and it sets pivot to (0.5, 0.5), because it lets you to trivially apply rotation around sprite center.
This makes sense for a racing game, but I wouldn't want the average user to have to create utility functions for a point&click game. The engine should be geared with defaults that apply to the most common use-cases for point&click (or in the future, like we discussed, we might have templates with different defaults, geared to that specific template use case).
I think cat's struggle here stems for the fact that she's porting an existing game, I don't think she'd encounter this issue when creating a new game (we'll see when people actually create new games, though).

Quote from: Crimson Wizard on Sun 23/09/2018 13:29:00
Also, the Y axis pointing up makes it inconvenient to work with GUI, since you have to position, for example, menu items vertically in opposite direction (first item having largest Y). I wrote a class for the game menu that does calculations internally to simplify things for myself:
https://github.com/ivan-mogilko/MonoAGSGames/blob/master/Games/LastAndFurious/GameMenuComponent.cs#L169
Check out the built in Stack layout component which solves this problem (at least for laying out menu items). You add your buttons to a panel, then you add the layout component to the panel and it automatically lays them out for you (and you can set the spacing between the items).

Quote from: Crimson Wizard on Sun 23/09/2018 13:29:00
This reminds me, when I last saw (several months ago) both alignment and rotation was performed around pivot, and there was a suggestion to split properties into one determining position alignment and another for object's own transform operations:
https://github.com/tzachshabtay/MonoAGS/issues/284
Right, the jury is still out on this one. I'm keeping the issue open, but as I said, I'm not sure the added flexibility here is worth the added complexity.

Quote from: Crimson Wizard on Sun 23/09/2018 13:29:00
I think I was asking if it's possible to implement a surface with custom axis direction, but don't remember what was tzach's decision on that.
Same here, it can be done and it adds flexibility, but I'm again not sure the added flexibility is worth the added complexity.
#92
The pivot point is by default 0.5,0 for characters and 0,0 for objects. The reason it's 0.5,0 for characters is that it makes walk cycle animations align even when the front/back frames are in a different width from the side animations. Also I find it to be more intuitive when setting walk areas.

Also sorry that I haven't been more helpful lately, currently I'm on a 3 week vacation and a bit low on free time with proper internet..
#93
Quote from: cat link=topic=56055.msg636595179#msg636595179
I used Bitmap.SetPixels() with a list I built using nested loops. Is there a better way?
Well, if you only want a rectangle, then just getting an empty bitmap should be enough, I think: factory.Graphics.GetBitmap(width,height)

Quote
When I use this and click somewhere, nothing happens in the game but I see an exception in the output window:
Exception thrown: 'System.IndexOutOfRangeException' in AGS.Engine.dll
Ok, I'll look into it.
#94
Madam sky

//raises glass

To Applewick! And, to you, my darling Penelope!
#95
Madame Sky

Hello everyone! I'm Madame Sky, but I don't really feel I need to introduce myself.
Penelope, dear, thank you so kindly for inviting me. I'll have a glass, thanks.

This place, though. I'm getting some bad feelings. No premonitions yet, I'm afraid. Perhaps the glass of wine will warm me up. I feel I need my senses sharp today.

//Looks at Benny Green
I am sensing something about you, though, honey. I'm sensing you're confused, or I'm confused? I don't believe we've met before, have we?
#96
Quote from: cat on Tue 18/09/2018 21:02:01
Edit: I just realized, I can probably do it with GetBitmap and then CreateMask?
Edit2: Seemed to work! I cannot walk yet, but PlaceOnWalkableArea() moves the character to where the WA is supposed to be :)
Cool! Very happy you figured it out without any specific documentation :)
Another way (just for posterity, what you did sounds better) would have been to create "new AGSMask" and give it a 2d boolean array.

Quote from: cat on Tue 18/09/2018 21:02:01
I cannot walk yet
Ah, so I think your game uses left to interact and right to look, right?
I have an incomplete implementation of that scheme in: https://github.com/tzachshabtay/MonoAGS/blob/master/Source/Engine/AGS.Engine/Input/Schemes/TwoButtonsInputScheme.cs
Not sure if what's there is in a working state or not (haven't touched it in a while but from brief examination of the code walking at least should work), you can try it by writing:
Code: csharp

var scheme = new TwoButtonsInputScheme(game, game.Input);
scheme.Start();

If it's working you should be able to walk.

If you're feeling up for it, it should be relatively simple to complete the implementation (just hadn't gotten around to it yet).
It's basically just looking at how it's done in the rotating cursors scheme (https://github.com/tzachshabtay/MonoAGS/blob/master/Source/Engine/AGS.Engine/Input/Schemes/RotatingCursorScheme.cs) without the actual rotating cursors stuff.
If not, then I'll get to it soon enough, hopefully in the next few days.

Quote from: cat on Tue 18/09/2018 21:02:01
Oh, and since you are the moderator in this board: Do you prefer that I edit posts with additional info or should I create a new post to bump the thread?
Bumping is fine. If you edit there's a chance I won't see it. Also I'm susbcribed to the topic so I'm getting an email whenever you post and can give you a quicker response.
#97
It depends.

1. If you already have an image for the border which is the size of the entire screen, then you can do the same.
The equivalent of "A GUI" is a panel which you can get from the GUI factory (it's already "click-through" by default):

Code: csharp

factory.UI.GetPanel("MyPanel", myImage, x, y);


Note that unlike GUIs in AGS, if you want the panel to only be associated with a specific room and not all rooms, you can write it that like this:

Code: csharp

var panel = factory.UI.GetPanel("MyPanel", myImage, x, y, addToUI: false);
myRoom.Objects.Add(panel);


2. If you don't have a specific image you want for your border, you can use the "Border" property and set a built-in border (or you can code your own custom border rendering, but that's more involved and the API is not stable currently, the way it's done is very likely to change in the future).
Built in borders include a solid color border, a gradient border or a 9-slice image border (9-slice image border is similar to the 9 images you set on a border in AGS for message boxes, only a little more fancy, similar to a css border image: https://css-tricks.com/almanac/properties/b/border-image/).
So to create a transparent panel with a solid color border, for example, you can write:

Code: csharp

var panel = factory.UI.GetPanel("MyPanel", width, height, x, y);
panel.Tint = Colors.Transparent;
panel.Border = factory.Graphics.Borders.SolidColor(Colors.Blue, lineWidth: 3f, hasRoundCorners: true);


#98
Oh, that doesn't sound good. 
Can you send me your project? I'll investigate.
#99
There are no official release notes, yet, I'm afraid (I haven't technically released anything yet). My current plan is to have a functional editor (which like I said, gonna take a while) and then release a v0.1 and start making organized releases and release notes from there on (I'm guessing that's the point the project will start looking more interesting to people).

You can however look at the list of the merged pull requests (I make sure to create pull requests for everything, so it should have all of the changes): https://github.com/tzachshabtay/MonoAGS/pulls?q=is%3Apr+is%3Aclosed
Each PR in itself has a list of commits which you can browse (some are more detailed than others...).
Though currently I haven't (unfortunately) made any efforts in listing breaking changes.

The errors you get are because of 2 breaking changes:
1. Made changes to how a game is started, this is to allow having 2 games that live side by side (as the editor is in itself a game which hosts your game).
2. Moved some defaults into their own class, which you can access from game.Settings.Defaults.

You can follow the structure in the demo game to make this changes: https://github.com/tzachshabtay/MonoAGS/blob/master/Source/Demo/DemoQuest/Program.cs

The relevant lines with changes are: 10, 17, 28-30, 44-51.

And if you're interesting in examining the commits that made these changes:
https://github.com/tzachshabtay/MonoAGS/commit/f58e4bfc633a225b26b77e50601ecc4af8d2a8cf
https://github.com/tzachshabtay/MonoAGS/commit/84050bcb7d49e6a0a8d9b14f22fe7f5a266959ca#diff-f3b30bc060275a41bac549848c305912

Let me know if you're having problems, I can make the changes for you.


#100
8-0
Facepalm.
Sorry, they had packages for linux and I assumed they would have an installer/downloadable for windows.

Quote from: cat on Thu 13/09/2018 19:06:37
Why on earth can't they just provide a Windows installer?
Yeah, this is bizarre ???. I'm guessing everybody just uses VS on Windows and their main audience is mac & linux, but still...
I opened an issue on their repo: https://github.com/mono/monodevelop/issues/5961
SMF spam blocked by CleanTalk