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 - Monsieur OUXX

#561
The Rumpus Room / Re: CJ is not Jesus
Fri 11/05/2018 14:12:36
Quote from: cat on Fri 11/05/2018 13:47:49
I'm really glad I'm one of the blessed ones that were able to talk to Him.
Do not corrupt His holy message ;) that's what apostles usually do.
#562
Quote from: cat on Fri 11/05/2018 12:50:55
I can install Autofac from the nuget manager, but this causes a change in the MonoAGS repository.

Is it a big deal? Are you planning on not only commiting your changes in the engine itself, but pushing them too?
If you just want to change things in the Demo Game, then really create your separate repository (I think it's what you've done).

Quote from: cat on Fri 11/05/2018 12:50:55
Also, could you explain what the difference is between dependencies (as seen in the solution explorer for AGS.Engine) and references (as seen for AGS.Engine.Desktop)?
Conceptually it's different but from your end-user perspective it's pretty much the same thing. From memory, if you right-click it takes you to the same "add reference" dialog anyways.
#563
Quote from: cat on Fri 11/05/2018 12:36:19
.nuget is a checked-in folder of MonoAGS, in my solution I don't even have one. I'm not sure how deleting it would help, besides, the config in there has nothing to do with autofac. I don't have a local .nuget file/folder in my project.

For testing purposes I checked out a clean copy of CW's MonoAGSGames repo and tried to build it. I get the same problem here.


If you don't have the folder it means that the NuGet packages are not there. Have you tried following the steps I described earlier about how to include Autofac and two other packages from the VS interface?
#564
The Rumpus Room / Re: CJ is not Jesus
Fri 11/05/2018 12:14:08
I was actually trying to find my (broken) short game "Chris Jones versus the evil cellphone games plunderers" but it seems to have disappeared forever in the old forum threads. Maybe after the change in URL or something. Sadness.
#565
The Rumpus Room / CJ is not Jesus
Fri 11/05/2018 11:13:50
I was searching for an old thread in Google and I found this gem.

So I'm reposting so that all of you can enjoy this old thread on all its glorious insanity.

The best part imho :
Quote
I'm going to be perfectly honest.
Your views on everything annoy me. (...)
So in conclusion, I don't like you at all, and even though I never actually used the CJ JC thing.... from now on, I'm going to start. Just for you. Just because it shows disrespect for you in a special way that I never knew existed before.

Oh, the AGS community knew how to have fun, back in the day.

=========

So I thought we could make use of modern technology to cast light on that diffiult question, just like Gilbert did in the thread back then.
It turns out that the answer is more cryptic than I expected. what do the Norwegians theologians know that we don't know?


#566
#3 Ha! ha! ha! ha! I couldn't stop laughing. 5 to 10 years later, the spector of Icey Games early works is still haunting these forums! Who wrote that? Is it monkey_05_06 or someone else? Come on!  :-D :-D:-D
#567
Quote from: cat on Fri 11/05/2018 10:43:48
I really don't know what happened to my VS installation. First I had problems with the SDK not installed, and now there is something wrong with nuget. In the options I have Allow NuGet to download missing packages and Automatically check for missing packages during build in Visual Studio checked but it is simply not done during build.

Have you deleted .nuget? I know I've said it several times but you've never confirmed that you tried. Sometimes it's not about the package being missing, it's about VS not expecting that specific file (with stuff like the encryption key jumping into the issue). So you need to delete it and force VS to re-download it.
#568
Quote from: Crimson Wizard on Thu 10/05/2018 23:42:40
You wouldn't have any tips by any chance on how to extend the ResourceLoader to, let's say, detect the list of subfolders

I'm getting a headache trying to do extend some classes functionalities without modifying directly MonoAGS's code. The reason is that tzachs used "private" everywhere instead of "protected"! Is there a specific reason? I thought that nowadays, "protected" was more common than the very punishing "private".
Because of that, I cannot derive any class from the engine's classes. Or if I do, I have to rewrite all the helper methods exactly as they are in the parent class instead of just calling them.
PS: if you read closely all the good practices about "protected" vs "private", people say "member variables should always be private, not protected"... but then they say "it's ok if accessors are protected". So I'd say : make everything but member variables protected.
#569
Quote from: cat on Fri 11/05/2018 09:10:43
The question is: Why did I have to do this in my new solution with the git submodule but not in the original checkout of MonoAGS?
To put it simply: NuGet is black magic ;) Sometimes the packages are considered "up to date", sometimes they need to be "restored" (9 times out of 10 : when you moved a solution or when it's your first build in a newly-downloaded repo). A bit like in the old days when you needed to Clean your VS solution from time to time, for mysterious reasons. (Well I'm sure it's not that mysterious for people who know things, but I'm sadly not one of those).

If I'm not mistaken, NuGet packages are excluded from the commits. That's one of the reasons why they're successful these days. That's by design, so that your commits don't mixup your actual code and the random changes in third-party binary libraries.

So, you ask "how to restore them"? There are some command line instructions that you can perform from the NuGet Console (Tools--> Nuget Packge manager--> Package Manager Console), but then again as I've said before, normally deleting the .nuget folder forces a clean restore. The .nuget folder is just a storage folder where VS puts the packages.
https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore

#570
Thanks for replying! Lovely.
#571
XAGE and even less MonoAGS are not random engines. They are meant to be pseudo-AGS engines, so much so that MonoAGS might one day become AGS. Therefore it's not the same thing to say "let's open the forums to Godot" and "let's open the forums to MonoAGS". I wouldn't want to open the AGS forums to Visionaire-made games, or Unity-made engines, etc. But I certainly do want to open them for MonoAGS games. XAGE is more of a gray area, as Clarvalon has his own plans for it.

I think there should be a subforum for MonoAGS, and a subforum for XAGE. Imagine something similar to the Reality on the norm forum, but for (AGS-related) engines.

I'm comparing with RoN because if we're lucky we'll have those two little communities (the MonoAGS community and the XAGE community) growing inside the AGS community, gaining experience, and when the time comes, maybe one of them will have grown enough that it could start blending into the legacy AGS forums.
The comparison doesn't stop there: just like RoN, forum visitors who have no idea what MonoAGS and XAGE are will never set foot into these subforums. But then one day maybe they'l get curious and dive in (and hopefully thrive there).

I agree with the 3 pre-requisites that Snarky listed, though. To avoid some abuse. But still, on top of being able to post in (some) existing AGS forums, a new subforum would be nice for hard core, MonoAGS-centered or XAGE-centered posts.
#572
Can you explain how the virtual file system works?
Basic questions:
- is the root folder the execution folder?
- is this file system before or after the resource was loaded? (in other words : is it a path to target a resource, or a path invented after the resource was loaded, made to give us a clue of where it was found?) OK this one is obvious, it's the path before loading, since it's the one you provide to Installfont.
- can you give a correspondance of a path for an embedded resource and this virtual file system? OK, InstallFont anwsers that question too : It turns the virtual path "../../whatnot" into an embedded resource path. I'm still not clear about the correspondance between the very real (and changing) execution folder (which requires to add "../.." to go back to the solution's root folder) and the resources root folder.
#573
Everything present in the quote below has been resolved by now.
Spoiler

About my issue with loading a resource.
Let's start the simplest way possible : what method should I call to open a single file present on the hard drive? I'm not talking about good old File.Open, Im' talking in the context of MonoAGS (where there's the resources system inbetween me and the files, and I don't know if I'm on a desktop or on an Android device).
Point me to that one single instruction.

Is it simply Game.Factory.Resources.LoadResource(path) ? But then how does the engine know if it's a resource on disk or an embedded resource? Can it be both in one game or is it resoved from the path or...?
EDIT: OK I see it : it's in ResourceLoadder.cs::LoadResource. Any resource that returns null from any resource pack is ignored. So it's definitely the path that tells a "proper" resource from an invalid resource. Could you give an example of path that allows to load from an embedded resource?
EDIT 2 : OK, by using breakpoints I found one : "DemoQuest.Desktop.Assets.Fonts.pf_ronda_seven.ttf". So that's an embedded resource. I don't know how they work. I see the resource in the Solution Explorer at DemoQuest.Assets.Fonts.pf_ronda_seven.ttf (no ".Desktop"). So at runtime the path is updated with the current system running the game. Oh well. I'll deal with that later.
[close]
EDIT 4 : This is actually still extremely confusing to me, because to load the font you call game.Factory.Fonts.InstallFonts("../../Assets/Fonts/pf_ronda_seven.ttf") (which is a physical path in the file system) but then with my breakpoint I see that it's the EmbeddedResourcesPack that ends up doing the job, using the embedded path I mentionned (DemoQuest.Desktop.Assets.Fonts.pf_ronda_seven.ttf). What's the point then?
#574
Quote from: cat on Thu 10/05/2018 20:47:35
I'm sure I just missed some documentation somewhere but I can't find it.
I created a new solution and added my game projects as well as Api, Engine and Engine.Desktop projects from the git submodule. But I get an error that autofac is missing. I don't have the packages folder that I have in my other checkout. What do I have to do to get it? It is not checked in, so there has to be some other package management.

Because some of the projects have evolved since then and you need to add references to Autofacs and System.ValueTuple (and possibly Guilabs.Undo). These are not mentionned in the docs.
However they are not simple Assemblies/DLLs. They are NuGet packages, so to add them you need to right-click on "References" in Visual Studio, and select "Manage NuGet Packages" (please indicate if this option is not present). Then in the new panel that opens you need to select the "browse" tab, and in the search box type "Autofacs". Once you find the reseult, click on "Install". Do it again for the two other packages.

If you find that they are already installed, then you need to force Visual Studio to re-download them (because it doesn't like sources and packages to be moved around). The simplest way is to delete the ".nuget" folder from your project (not in Visual Studio, on the actual hard drive).
#575
Quote from: Crimson Wizard on Thu 10/05/2018 00:43:48
game.Factory.Resources <-- this is IResourceLoader.
Oh OK. Duh. I'll see how I can work with it.

Quote from: Crimson Wizard on Thu 10/05/2018 00:43:48
But you could make your loader class have a constructor that requires user to pass IResourceLoader to you
Well I'd still be stuck with the same issue, as I'm ultimately the user (I'm making the demo game too) and I don't know where to get the (implemented and constructed) IResourceLoader. See my commant about game.Factory.* below


Quote from: Crimson Wizard on Thu 10/05/2018 00:43:48
I believe it would be better if you draw some chart, or write dummy code
Well all I want to do really is to write a "XML.Load(path)" function, but to make sure that it uses the abstract resources system of MonoAGS instead of just hard-coding the reading of the file from the hard drive.


EDIT: dammit, this is just too abstract for me.
Let's take the simple example of how AudioClips are loaded, and now imagine that I want to do the same with an XML file, the only difference being that my classes are in my own library instead of MonoAGS project.

Here is how it's done in MonoAGS :

game.Factory.Sound.LoadAudioClipAsync(path)
  |
   -----> IAudioFactory implementation
            |
             ----->  LoadAudioClip(path)
                       |
                        ---->  loadSoundData(path)
                                |
                                 ----> IResourceLoader (or is it IResourcePack ? I don't even understand) implementation : _loader.LoadResource(path)
                                         |
                                          ---> Finally, the basic file-opening code.

I'm just not good enough to be able to mimic that cleanly (some of the interfaces being in the engine, the other being in the API project), without just writing a function that opens a file from the hard drive and reads it.

I don't even understand how game.Factory.* are populated, when and by who.
#576
You're using factories that already exist : "Object" and "Graphics". Both already have their resource-loading function : LoadImageAsync. That function, behind the scene, uses the IResourceLoader that has already been automatically provided to that factory.
I want to write my own class that loads resources (XML files) from the disk, and I don't know how to get the IResourceLoader instance.

Are you saying that I should just use "Object"? Isn't that only meant for room objects?

#577
I'm facing issues because the injection of dependencies makes some bits of code too abstract for me.
Let me explain what I'm failing to do :
- I want to load some XML files using a custom class of my making.
- For that, I need the Resource Loader (either the FileSystem one, or the other one)
- to get the actual instanciated object, I need the device instance
- All the device instances I see are int he factories, which are constructed automatically by the injection of dependencies (I guess! since I see their contructor get called nowhere in the code).
- But I don't want my class to be one of the built-in factories. I want it to be part of my custom library built on top of MonoAGS.

============

Also, pretty cool Facebook page : https://www.facebook.com/mono.ags
#578
Quote from: tzachs on Wed 09/05/2018 17:24:42
which browser and version are you using? any errors in the inspector?
IE11, in "non-Edge" mode. Pah, just ignore it, it's either my damn workplace firewall or that shit browser. That might explain how I knew that the articles exist while not being able to remember how I saw them earlier : probably because everything works as expected when I'm at home on Firefox.
#579
I'm very confused because none of the pages you mentionned have any links on the left, nor at the top, nor at the bottom. I only see the article. Maybe it's because they're iframes blocked by my current firewall at work (they have a very restrictive policy).

So anyways, don't spend any more time on that, it's not on you.

Spoiler


[close]

================

About repeatedlyExecute : the "warning" I was talking about is in AGSGame.cs :
Quote
177                 //Invoking repeatedly execute asynchronously, as if one subscriber is waiting on another subscriber the event will 
178                 //never get to it (for example: calling ChangeRoom from within RepeatedlyExecute calls StopWalking which 
179                 //waits for the walk to stop, only the walk also happens on RepeatedlyExecute and we'll hang.
180                 //Since we're running asynchronously, the next UpdateFrame will call RepeatedlyExecute for the walk cycle to stop itself and we're good.
181                 ///The downside of this approach is that we need to look out for re-entrancy issues.
182                 await Events.OnRepeatedlyExecute.InvokeAsync(_repeatArgs);

#580
My roadmap is as follows :
(IMPORTANT: I'm not trying to write a AGS-->MonoAGS converter, I'm just trying to have something that produces a basic game as fast as possible even without an actual Editor in MonoAGS)

1) I was going to write a small program that splits game.agf into xml fragments (definitions files) carefully organized into file-system subfolders, but then I got lazy when I realized that I have no idea how to read the acsripte file. So I got lazy and instead, for now, I'll export a game with the XAGE exporter plugin and see what files structure is produces. Maybe a combination of both methods. Anyway, for now, the quicker the better.
2) Write a few loader classes (factories, really) that load these XML fragments into configuration classes and then construct the corresponding classes (Character, Room, whatever).
3) Write a set of wrappers implementing ICharacter, IRoom, etc. that will perform the most basic initialization tasks (from the configuration files mentionned above), and, more interestingly, add a few overridable methods (the most obvious being : "RepeatedlyExecute") so that all a complete MonoAGS newbie has to do is to make their classes (Rooms, Characters, etc.) inherit from those classes. Then they will know instantly where to add custom code. I know it's not ideal (or possible) to make a MonoAGS game work exactly like an AGS game, but as I said the goal here is to have a prototype game as quickly as possible with as little hard-coded script as possible. From my perspective, the more code hidden under the hood (for a start), the better.

==========

Question 4: what core feature does not work in MonoAGS? Does save/load work? That's super duper important and that's the most difficult task. I would be pretty pissed off if I spent several months developing in MonoAGS only to realize that the difficulty of Save/load implementation was underestimated and the project stalled.

Question 5 : is there a more natural way of implementing "RepeatedlyExecute" than the one relying on recursive call (which is targetting specifially the splash screen, that is a room with very unstable framerate)? I've seen in one of the source files that you issue a warning about Repeatedly Execute, that might cause an infinite loop of calls/dependencies if not used properly. Can you produce a simple example of : a) such infinite loop issue, b) a proper way of doing things?
The naive, dirty approach that comes to mind would be for the scripter to define an arbitrarily stack storing the order in which to call the repeatedlyExecute method of each object, just like scripts in AGS can be moved up and down and that defines the order of execution.

=================

I would suggest to make the help articles (those ones : https://github.com/tzachshabtay/MonoAGS/tree/4f0189c1bebe15b4d36a0e8c34dea6c5f0120399/Docs/articles ) easier to find.
When you're here, you have no idea that they exist : https://github.com/tzachshabtay/MonoAGS/tree/4f0189c1bebe15b4d36a0e8c34dea6c5f0120399
When you're here, either : https://github.com/tzachshabtay/MonoAGS/blob/4f0189c1bebe15b4d36a0e8c34dea6c5f0120399/Docs/index.md
When you're here, you still don't know that they exist : https://tzachshabtay.github.io/MonoAGS/
And here either : https://github.com/tzachshabtay/MonoAGS/blob/4f0189c1bebe15b4d36a0e8c34dea6c5f0120399/Docs/articles/getting-started.md

I know I've stumbled upon a page where they were listed on the left, but I cannot find how to go back to that page.
SMF spam blocked by CleanTalk