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

#1
And also sometimes you don't want AGS to handle these stuff, specifically if you want to have things only be a single line and be able to detect if something that wasn't intended happened. In both my Fancy and ImGi modules I am handling string wrapping myself in the module because of their requirements and by having a simpler DrawString I can pickup anything that may be wrong on my code quickly.
#2
The camera script API in the manual gives some explanation on how they work

https://adventuregamestudio.github.io/ags-manual/Camera.html

You can imagine something like, your rooms can be "captured" with a camera and they are then be projected to a viewport. You can only see viewports on the screen.

By default AGS sets a camera to the size of the game resolution and "attaches" it to a viewport that also has the same size.
#3
Here's the PR for constructors  :) https://github.com/adventuregamestudio/ags/pull/2582

And here's the PR for "as VARTYPE" https://github.com/adventuregamestudio/ags/pull/2693

Note that c=(b as A).X doesn't work yet and it has to be written in two lines (A a = b as A; c = a.X;)

As temporary documentation before a proper documentation is written  :)
#4
I think both constructors and that type of cast exists in ags4 compiler
#5
Any idea if the thumbnails on disk would work better as either a dir with many little pngs or like a "thumbnail.db" where using some simple db format (SQLite? AGS's own spritefile?) it would store it? The critical things are both the rooms and the GUIs where creating the thumbnail is nontrivial for both.

Also I used a ListView in my example because I thought it was simple but I am not sure if it's the best way to go. Using it's virtual functionality is fast though and it can easily have thousands of items apparently without issue - though maybe this would require the memory cache to be limited. If there was some way to reuse the sprite cache and file from the engine it would be cool since it's a similar problem.

The other thing is that in my imaginary workflow I played with it as a dialog, but I wonder if having it as a panel is interesting or not - can't tell really, I am mostly a script centric person and showing a panel "disturbs" my workflow a bit. On the other hand it could perhaps be useful for say, having additional functionality there if ever required - don't know what though? Having it as a dialog meant to load quickly and go away quickly is practical though.

The other thing is I thought I could somehow copy the right click context menu that exists in the Explore Project panel so that you could also if there was something useful from there but I wasn't sure if that would be good, so I went with a two step approach where it's just a Go To.
#6
Wait, I don't really agree with this. Firstly, this is properly documented in the manual

https://adventuregamestudio.github.io/ags-manual/ScriptKeywords.html#protected

Here is my perception of AGS Script, note I started really using AGS in 2017, after a friend telling me about it in 2016, so I am going to talk about people I didn't meet and have never had a conversation, so it's just my perception, from looking at code and feel of the ergonomics... I believe CJ learned C at some point early on and had fun which then lead to the first version of AGS... I think the pile of actions to execute at some point lead him to learn about interpreters, and also at this point he may have learned about C++ - but it's like C++98, so it's terrible C++ without all the useful things we are used in the world post C+11 (from 2011, so after he left AGS entirely). Anyway, going into interpreters I guess it had some things based on C itself, but it's like only the minimum stuff for the minimum to make a game at the time. The Engine API also mimicked C style too. Then at some point not to late he learns about C# (it's like C# with .NET 1), and then he starts working on the idea of the Editor made using C#. The things he learns, he filters to AGS Script, the concepts, but again only the minimum to make a viable game, thinking what is the minimum to implement. So AGS Script evolves to this thing that is less formal than C# and it has some particular ergonomics, but I am not sure how much is natural from trying to keep things simple (for practical development reasons) and how much was thought through. But anyway, we get this cool interpreted, type safe, ref-counted language, that has some C#-like flavor.

Anyway, C# current accessors docs reads like this

https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers

Anyway so protected means it allows access from a derived class - in C#, that is the difference with private.

This SO comment is my exact feel of why it's not possible to do so with C#. Look, in C# I can still extend the class and get the access.

Now in AGS, I can extend the struct too, sometimes. I can't do so if it's like Character or some other type of built-in. But I can use an extension method.

Anyway, my feel to this is that protected bein accessible by extension methods, is fine if having this feature doesn't block anything is fine. If you want to have such restriction, it would be better to introduce a new private keyword.
#7
Recently I had to quickly find specific things by ID in AGS and implemented a Go To thing where you can type the number and it will navigate to it in the Project Explorer and open any respective pane if it exists. (you can see some of discussion on it in its PR here)

Anyway, now still an issue I have is sometimes I remember something graphically, and just want to quickly navigate a view of all the icons of things to find it... So my idea was to add an Overview command and an Overview dialog, focused on quickly looking for something graphically.

>> video of the thing <<

Now is this need something others have? Would this be useful?

Implementation wise, this uses a virtual list, an image thumbnail cache and it will get the sprites as needed as you browse, make the thumbnail and cache the thumbnail, which uses 96x96 px fixed size images which are not large enough that requires (I think) a cache size limit (at least for now???).

For Inventory Items the thumbnail image maybe is the obvious image of the item, for Characters and Views I pick the sprite in frame 0 of loop 0 of the corresponding view. I guess for GUIs and Rooms, it would require having a method that would assembly the thumbnail as needed when browsing somehow??? Not sure how to do that.

To explain, both rooms and GUIs would require to render more than the background image to be able to make sense of it, the GUI usually have buttons with images and the rooms may have large objects (like in a game with lots of parallax effects) that make up most of the room. Additionally for GUIs, Text GUIs require some special rendering too.

Anyway, I am curious for thoughts on this idea and if someone else needs to look for things graphically.

I use folders and organize things there by "game areas" in each of the nodes, but sometimes I want a quicker access (by memory?), this is why of this idea.
#8
I noticed the purple around the cursor, if you want to do these types of outlines and you are using ags4, and need to do it dynamically for some reason, these should be doable using shaders. I haven't actually done, but I imagine it should be possible to.
#9
In case you want to use all images for your books, including text, assuming your game has a low resolution so having many images is "cheap", you can just have the entire book as image and put the text either as layers in external software or generate the images using some python script and then you just import the images in ags and done. Make an int array in AGS for book inlets and put each sprite there or a managed struct with any data.

If you need strings that aren't too long in a managed struct you can use a fixed char array and it should work good enough, make sure that it has a char with "0" value at the end and I think you can even String.Format("%s", char_array) to retrieve back the string you stored there (I think for storing you need to use a for).
#10
Uhm, from looking at SerializeUtils (the last lines of the file), it looks like we manually insert the UTF8 declaration, but looking this stackoverflow answer, it looks like there is a way to set so itself will write such header somehow? Also, from the comments in this question in SO, it seems that .NET uses UTF-16 strings by default? (I may be misunderstanding)
#11
What property is TextProperties? Do you mean specifically Custom Properties? Where is the "é" character used? Is it in the value? Can you show a screenshot of what happens?
#12
Uhm, I guess the manual page on LipSync needs some update then (web, source file), but I haven't actually used lip sync and am not sure on what has to be updated.
#13
I have used different implementations of ImgBB for file hosting sometimes - I think one of those is https://imgbb.com/ ? It's like a hosted by someone Imgur basic clone like thing I think.

About the book GUI system, you need the images? If you want you can try using the Fancy module to see if it can handle images in the strings themselves and assign the resulting image (with text and sprites) in a button to be the page contents. Not sure how well that will go but it's an idea.

I once did a text only book system and used a directory that I packaged along the game (using the option from general settings) and had a bunch of "book_001.txt" text files which I edited in a different text editor that had spellcheck and made they be loaded by the game (using the $DATA file token). It worked nice but I didn't have images or any need for complex layouts so there wasn't much testing of the text of each book to get it to render correctly in the engine.
#14
One thing is in the sync dir there should be only the sync data and not the speech audio files, those should go in the regular speech directory following what's on the AGS manual.

I don't remember seeing games that used TotalLipSync module with LucasArts speech, but I leave the answer if that works or not for @Snarky .
#15
If you are trying to lipsync with voice, why not do that? Also I would suggest that with the TotalLipSync module. You need to prepare the lipsync files beforehand for the module if you go that way.
#16
I think in theory it shouldn't be hard to change the engine to support more rooms, save for checking how this should interact with backwards compatibility.

AGS doesn't save the state on rooms higher than 300, so you get 300 rooms that save state and the rest you have to manage yourself. I guess it could in theory be some build time property but not really sure how this would work. But my guess is right now for a simple extension it would just up from 999 to 2048 and leave at that.

I am curious, looking at the game it seems most rooms are rather empty, couldn't you just do the more complex rooms and have a few rooms that could be repurposed by changing graphics or something to do the simpler rooms?

But yeah, I think you are the first person to hit the limit in 25 years.
#18
I guess the original author of this game wouldn't mind (and I think he has said so in the past to me on LinkedIn).

https://github.com/ericoporto/concurrence_refactor/blob/24fddddd1b63f98422f557c721bd8d032f0f9661/Platformer.asc#L169

There is a sort of state machine here. The thing to notice is that this isn't a point and click, but anyway, the animation here is tied to the game play. I guess the state changing logic, which would require something like function as parameters if implemented solely in script if it was not specialized (specific) for this game.
#19
@Crimson Wizard , I don't know if it helps or not, but I shared with you a game on GitHub that has some interesting view animations in case it's useful.
#20
The cat has not left the bag, the way this works is that you can not actually violate copyright laws, but a bigger company, with a powerful team of lawyers can.

My prediction is that you will have to pay as a person to use the works from these models a forever increasing fee, and at some point that will include royalties too. At some point there will be models you can run locally and they will watermark their output in some way to be able to automatically force you to pay said royalties - some mechanism like what exists on YouTube.

Anyway, I think you are thinking about the individual benefiting, which frankly, I don't see it, and what I am seeing is that big companies will use this to get more from the individual while giving less. The individual usage is just crumbles given, while the big companies will be getting bigger and bigger, and try to insert themselves in everything until they will make you think you depend on them.
SMF spam blocked by CleanTalk