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

If you've already fixed that issue from a year ago (by attaching metadata to each pointer) then the discussion is useless. Problem solved! Well done and hats off to you  :cool:
Github has removed all my ties to the AGS repo???? notifications, dicussions, forks, etc.
What the hell. Did the Microsoft acquisition reset everything???
Now it's impossible to search what I was referring to.
OK I'll have to dig it out. you don't remember ever saying : "We can't do _________ because in AGS VM pointers for _________ are the same as pointers for ________ and the VM can't technically tell the difference"?
I remember CW saying that one of the obstacles of easily "managing" managed objects inside the AGS virtual machine is that they share the same address space as basic pointers. I don't remember exactly which kind of difficulties it was causing but I clearly remember that it was creating a technical glass ceiling -- because in the end everything is a pointer. So this limitation was indirectly impeding some glorious steps towards engine modernity and dynamic objects. 

This message is not to ask "what is the problem exactly" but to suggest a solution. Maybe what I'm about to write is dumb and has nothing to do with the issue, but here goes nothing. I've done that successfully in some pseudo-VM I was writing in AGS :

Split the pointers address range in two. I mean, a pair of completely artificial "fake" addresses ranges. For example :
0x0000 --> 0xFFFF = old-style pointers, nothing changed.
0x10000 --> 0x1FFFF = managed objects. You generate those exactly like you used to (values from 0x0000 to 0xFFFF), but you immediately add 0x10000 for as long as they're passed around as value from C++ function to C++ function-

With a simple binary mask you can tell which value represents which type. <= 0xFFFF = regular pointer. >=0x10000 = managed pointer.
Whenever you need to actually read/write to memory, just remove the bogus offset : For example, convert managed pointer 0x100AA to 00AA, then do whatever you would normally do (pointers arithmetic, real address in memory, etc.)

Food for thought.

Miez, thank you for publishing this. It was important and the mature thing to do.

PS: Did you ask the other artists' permission to publish their share of the project too? This is too precious to rot on some hard drive (until it fails) or scattered away until no one remembers who has the last piece.
eErio what are you waiting for? Use your coding magic to rewrite this module from the ground up in AGS 3.5  ;)
You don't seem to have any ambient occlusion shading? Especially where the walls meet the ground that's essential.
I'm very excited by this game.
All the visuals and music are super tasteful yet not over-the-top, one can clearly sense the artistic sensitivity in this project. A real vibe of Monkey Island 1 -- except in VGA and with less shoehorned spoofs ;)
(About voicing)

I've been giving a lot of thought to this.
Two facts :
- Silent games are more and more out of place in nowaday's "all-talkie" game space.
- amateur games can't afford to have fully voiced games.

I've been thinking of doing this :
- Voicing only introductory sentences. For example, only that one "what's up?" at the very beginning of a conversation with an NPC. And their very first, short greeting back.
- I would also voice non-verbal things : loud scream, *oumpf!*, sighs, etc.
- Maybe (maybe!) the whole intro if possible. that's already in the realm of wishful thinking.
- Putting a lot of effort in the sound design for other things : music, object interactions, white ambient noise, wind, etc.

Wow this was buried in the forums but this needs to stay up!
I understand everything you wrote. For argument's sake, I'd simply like to say "yeah, ok, structs still exist out there but no one uses them in modern languages except for very specific, optimization-related reasons". And in any case their syntax is not different from classes.
The removal of the star is good enough for me.

That being said, the reasons you mentioned related to the byte code are solid. Always that same glass ceiling. Damn.
Maybe AGS 4 should be 64 bits and ditch retro-compatibility.

This is from 2018 :


96% of Windows installed were already 64 bits.
Quote from: Crimson Wizard on 22 Sep 2021, 13:01
Of course hashmap or btree may be somewhat slower than accessing objects directly, but

Indeed, if it's not for direct access but only for disposing and such it's no big deal.
I'm mostly talking about the script language being slow. It's a bit suicidal to iterate a lot on some data in AGS, or implementing processing that does a lot of function calls.  Both the stack and data access are rather slow.
Again, it's enough for a 320x200 game, but I'm only just wondering why it's not going at the speed of light.

Quote from: eri0o on 21 Sep 2021, 21:28
object references could be direct but they use a hashmap/btree

AGS script is slower than many other scripting languages, because it's compiled to generally inefficient bytecode; it emulates x86 asm, but have many repeating operations that are redundant in a scripting language. I wrote a post about this many years ago:
Interesting read. Thanks!
Engine Development / Why is AGS slow?
21 Sep 2021, 12:50
I sometimes ask myself why AGS is slow, or at least not lightning fast.
Having very little knowledge of the engine's code, I can't seem to come up with a reason :
- It uses SDL, which is very close to the hardware. If not the fastest possible option, it's pretty close.
- It's written in C/C++
- The virtual machine is running pre-compiled code, literally just byte code.

So, what is slow in all this?
Is it that the VM's instructions are not mapped directly to the underlying CPU instructions? Is it that the engine uses simple data structures with a lot of overhead and lookups? Etc.

Reviving this, september 2021.

- What is the current status of AGS games running on ScummVM?
- Who is involved from the AGS forums?
- What is the best place to talk about it?
- What are the current limitations? (theoretical ones -- Not talking about performance and such)

ScummVM as the de facto AGS engine has a tremendous potential because... It is signed and downloadable from stores. Lol, ScummVM on iOS/MacOS expreriences the same roadblock as many other open source apps on Mac recently : it requires to be built with XCode and ...the critical features of a Mac Developer account (related to signing) is no longer free.
Quote from: Crimson Wizard on 20 Sep 2021, 21:44
They are marked as "Build Action = Embedded Resources"
That's the thing I forgot existed.

I'm not allowed to change the value?
I can see the Properties of each and every icon, but it appears in dark gray : I cannot modify the value...
I'm using Visual Studio Professional 2019.
I see that there seems to be some Resources somehow connected to AGS.Editor.Resources.ResourceManager but I fail to see how to view/edit them? When I open the "Resources" tab of the AGSEditor project's properties (or simply when I open Resources.resx) I don't see any of the icons.
I want to add a new sort of "Component" in the AGS project tree.

- I duplicated "ScriptsComponent" and named it "FooComponent".
- I replaced the word Script/script/Scripts everywhere relevant.
- I did "AddComponent" in ApplicationController.cs
- Finally, I duplicated "scripts.ico" and "script.ico" in the Resources folder and named the new files "foos.ico" and "foo.ico".
- I added those files to the Resources folder in the project ("Add existing item").

Everything compiles, but when the Editor starts, ResourceManager.GetIcon crashes. It says that "System.ArgumentException: 'Resource 'foo.ico' cannot be found in class 'AGS.Editor.Resources.ResourceManager'.'

Again, I did everything like ScriptsComponent does it, except with "Foo" in place of "Script".

So, my question : Do new resources (icons) need to be added explicitly to some sort of Resources manifest file or some list that I failed to locate?
Why are the new icons not found? Not found in what? (in the file system? In some list?)

The end of your message is overthinking it. I don't really need to reposition the file. I just want to know "what would happen".
You wrote that File* is never saved. So, what happens to the variable f in this situation if the game gets saved then restored in-between some of the repeatedly_execute:

Code: ags

File* f; //global variable

void game_start() {
    f = File.Open("file.txt", eFileRead);

void repeatedly_execute() {
    if(!f.EOF) {
      String s = f.ReadRawLineBack();

Does f become null? Does it have a value that will make the game crash? Etc.

"Go try it yourself, you lazy bum" is an accepted answer.

Also, you wrote that the game cannot quit in the middle of a script.
So does that mean that the game would hang (or at least refuse to quit) if I clicked Windows' "close" cross while this is running :
Code: ags

noloopcheck void Hang()
   while(true) {
      int i; //arbitrary no-op

void repeatedly_execute_always()
SMF spam blocked by CleanTalk