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.


Messages - AGKorson

Pages: [1] 2 3 ... 14
1
I think it means the Power Pack does all its stuff by altering memory locations specific to DOS AGI. One does not simply increase the resolution like that.

This! It's a hack using a classic buffer overflow attack to allow full access to the program memory. The structure Sierra used for it's data segment, combined with a bug (or feature, depending on your perspective) that allows you to set strings in memory that exceed the allocated string space make this all relatively simple to implement. If you know how to program in assembly, it then becomes trivial to make any changes you want.


2
Cool!!!

Do you plan to open source it and put it on Github?
Yes, I will make it open source once I've finished final round of testing and the Demo game is finished. I've already got it on Github but it's a private repository for now.

3
Here are two screen grabs from the demo game:


There may be some minor changes in the final version, but these two rooms are mostly complete. The artwork was done by klownstein. I think he did a great job.

This is all 'normal' AGI; no hacked interpreter needed, no additional data or program files needed. And it will run on any MSDOS version 2 or 3 interpreter. It demonstrates all the capabilities of the AGI Power Pack, which is a set of game logics you can insert into any AGI game that unlocks a tremendous amount of advanced capabilities. (The Power Pack will only run on a native MSDOS sytem, or in DosBOX- no other platforms are supported.)

I am ~50% done with the coding. Hopefully in the next month or so, the full demo game will be available for download.

4
SCI Community News / Re: Mad dash to move Hosting
« on: September 02, 2022, 02:23:09 PM »
Yeah, I noticed the last couple days of email were missing too. Not a big deal.

I think one of them might have had the cure for cancer in it that I just discovered. I forgot the details, but I'm sure someone else will probably discover it independently anyway.

5
Forum Support and Suggestions / Re: Seeing send PMs?
« on: August 31, 2022, 08:12:58 PM »
You can change the default behavior for saving copies of sent messages easily.

It's under "Home ┬╗Community ┬╗Personal Messages ┬╗Change Settings", second to last item, "Save a copy of each personal message in my sent items by default." Check that box, and you're good to go.



6
AGI Development Tools / WinAGI Version 2.2.5 Available for Download
« on: August 29, 2022, 11:35:30 PM »
While working on my latest AGI project, I fixed a few more bugs, and added a few minor enhancements. New version is available on the AGI wiki:
  http://agiwiki.sierrahelp.com/images/e/e5/WinAGI_2_2_5.zip

It just keeps getting better and better...


7
While working on my latest AGI project, I came across a bug in AGI that I don't think anyone has ever mentioned before. I wanted to place a series of views in a line, directly adjacent to each other with no gaps between them. But when I first added them, AGI moved them around, using the 'shuffle' function that gets applied when screen objects are found to be overlapping.

Which made no sense to me; the objects were all exactly 16 pixels wide, and I positioned them exactly 16 pixels apart; that should align them all right next to each other. So why did AGI shuffle them? 

I took a look at the code in the shuffle function and found that there is a bug in there that checks how objects overlap. When calculating the pixel value of the right edge of an object's baseline, the function adds the object's width to its position, which is actually one pixel PAST the right edge. It should decrement that value by one to get the actual position of the right edge. But it doesn't.

Because of this, AGI thinks objects overlap when they are placed adjacent to each other with the same Y value. And this bug exists in every MSDOS version of AGI, including all known v2 and all v3 interpreters.

Here is a graphical explanation to clarify:
Code: [Select]
Object A is 4 pixels wide with an X value of 4:
0         1
0123456789012345         
....AAAA........

Add new object B, also width of 4, and position it with an X value of 9, with same Y value as object A. It will look like this:
0         1
0123456789012345
....AAAA.BBBB...

Then try to position object B right next to object A, by using X value of 8. You would expect to get this:
0         1
0123456789012345
....AAAABBBB....
but the shuffle function thinks this is an overlap, and will shuffle object B, which (because of how the shuffle function works) will actually give you this:
0         1
0123456789012345
....AAAA........
.......BBBB.....

The shuffle function is used to check object movement as well, so if two objects are at the same Y value, they can never be moved so they touch each other; AGI forces a one pixel gap between them because of this bug.

If either object is set to ignore objects, then overlapping is allowed, and placement/movement is not affected. But that doesn't help if you can't use the ignore.objs command for other reasons.

I checked around, and I haven't seen any mention of this anywhere. I haven't seen any posts asking about this behavior, and there's nothing in any AGI documentation (Specs, help files, etc.)

It's surprising to me that after all these years, there are still new things to discover within the AGI code.

8
I'm working on a demo game to show off some advanced AGI coding techniques. But I need a bit of help with the art.

SPOILER ALERT: Imagine native support (i.e. no hacked interpreter files needed) in AGI for things like mouse support, 80 column text mode, MIDI and FM synth (e.g. Adlib, SoundBlaster) sound support, extended characters, full control of color palette, dynamic menus, data file input/output, customizable status line, and much more! Just drop the AGI Power Pack logic script into your game, and you get it all! Without using any resource memory!

I am not an artist. (If you've seen the WinAGI template game rooms you know what I mean.) So I'm looking for someone to help with 8 - 10 rooms so this demo will not look like a two-year old drew it with crayons.

The setting is an office building- I need some offices, a reception area, hallways, stairwells, a closet, stuff like that. If this is something you can help me with, send me a PM.

THX!!!

9
AGI Development Tools / WinAGI 2.2.3 goes International (sort of)
« on: June 04, 2022, 07:52:17 PM »
Here's the newest version of WinAGI: http://agiwiki.sierrahelp.com/index.php?title=File:WinAGI_2_2_3.zip

The big change in this version is support for non-English MSDOS codepages, which makes it much easier to edit resources in other languages. If you never intend on using extended characters or working in a language other than English, there's no reason to change from the default MSDOS codepage (437). (But I would still advise upgrading to this version; it also fixes a few more minor bugs, including the issue that causes it to fail on older versions of Windows.)

AGI doesn't contain any native support for non-English text/fonts. And showing extended characters on screen (other than in the text.screen mode) is not normally possible. So why bother adding this feature to WinAGI?

Using the string hack technique, it is possible to get AGI (when running on DOSBox, or on an actual MSDOS machine) to show all characters in whatever codepage the environment is set to. You can also get AGI to allow inputting letters with diacritics on the input line to let players use non-English words to play a game.

The logic code needed to make this work is very complicated, and formatting foreign words in your WORDS.TOK file is also quite complicated, but if you are interested in doing this, WinAGI now lets you edit your resources in the same codepage that your game will use, making translations (or creating new games in non-English) much simpler. It will also create word lists with non-English words (which are simply ignored in 'normal' AGI but work perfectly when paired with the codepage string hack technique).





10
I just finished testing on a Windows Vista system. The issue with the WORDS.TOK editor was there as well. After getting VB6 installed and running, I discovered that the icon property for one of the picture boxes is seen as corrupt in Vista, even though it works just fine in Windows 11. After deleting and re-loading that resource, everything seems to work fine. I have no idea why this was a thing, but there you go.

Version 2.2.3 is now available for download here: http://agiwiki.sierrahelp.com/index.php?title=File:WinAGI_2_2_3.zip

Hopefully this fixes the issue in all older versions of Windows. And Linux users should now be good to go again too.

11
That is an impressive amount of testing. I think I would have given up after 10 minutes.

I do see the irony in WinAGI being 100% compatible with Windows 10 and 11, but not running on earlier versions, given that VB6 was released around the time of Window 98.

To be fair, WinAGI makes extensive use of APIs, and I didn't intentionally look for backwards compatibility for any function calls; I chose whatever functions are currently available that met my needs.

I do have a couple of old cpus sitting around, and I have original install disks/CDs for most Windows versions (somehow I lost my MSDOS 6.22 install disks though- I kinda wish I still had those.) But I have so much stuff going on right now I don't know if I'll ever get around to doing any serious testing. It might be interesting to see if I could get the latest version to run in the VB6 dev environment on an older system to see if those issues could be debugged.



12
AGI Syntax Help / Re: Understanding how goto and else work
« on: May 05, 2022, 12:38:19 AM »
It would be nice to have scripting for the modern AGI IDEs/compilers use the same scripting as the original Sierra used, like Phil did with SCI.

Have you seen this post?

The original Sierra scripting syntax is completely known. 'else' and 'goto' are both supported. There are some significant differences between 'fan syntax' and 'Sierra syntax'.

And there are some really good reasons for not going back to 'Sierra syntax' for serious programming. Having that as an option for nostalgia and completeness might be worth doing at some point, but it's not a priority for me.

13
AGI Syntax Help / Re: Understanding how goto and else work
« on: May 05, 2022, 12:27:58 AM »
Hmm... isn't that just an if/else inside an if?

Sorry, my example was a bit too simple. I didn't specify that there are additional statements between the end of testA block and the destination for the goto statement. The code block should actually be
Code: [Select]
if (A)
{
  if (B)
  {
    statement1;
    goto(Label1);
  }  [endif B
  statement2;
} [ endif A
statement4;
Label1:
statement3;

Now you can see how it fails:
Code: [Select]
if (A)
{
  if (B)
  {
    statement1;
  }
  else
  {
  statement2;
} [ endif A
statement4;
  }  [endif B
statement3;
The closing curly brace for ending block A happens BEFORE the end of block B. If you tried to compile this, the compiler would think that the 'endif A' curly brace is 'endif B', and vice versa. Blocks have to be fully nested.

14
AGI Syntax Help / Re: Understanding how goto and else work
« on: May 03, 2022, 11:17:10 PM »
That particular 'goto' does not create a well formed 'else' block. If you tried to make it an 'else', the code between it and the 'end-if' would not align.

By 'well-formed', I mean a block of code that immediately follows the end of the 'if' block it's associated with, and that ends at the same block level as the original 'if' statement. An 'else' block can't 'jump' levels. A 'goto' can.

You are talking about logic 42 (rm.ShipSternInterior). Here's the fully decompiled section that contains that 'goto' statement:
Code: [Select]
[ go fishing
if ((said("go", "fish") ||
    said("go", "fishing") ||
    said("fish") ||
    said("acquire", "fish") ||
    said("catch", "fish")))
  {
  [ Jerrod has to be on the aft deck
  if (posn(ego, 40, 30, 65, 52))
    {
    [ if already fishing
    if (isset(fFishing))
      {
      print("You are already fishing.");
      goto(Done);
      }
     
    [ if sick
    if (isset(SickAtSea))
      {
      [ too weak to fish
      print("That is a wonderful idea, but you just can't muster the strength "
            "to do it!");
      }
    else
      {
      [ check for all the required pieces needed to fish
     
      [ paperclip for a hook
      if (PaperclipStatus != 1)
        {
        print("This is the place to fish, but how can you fish without "
              "something to use as a hook?");
        goto(Continue);
        }
      [ string for line
      if (StringStatus != 1)
        {
        print("This is the place to fish, but you are going to need some "
              "fishing line!");
        goto(Continue);
        }
      [ metal for weights
      if (MetalStatus != 1)
        {
        print("This is the place to fish, but you need some weight to attach to "
              "the fishing line!");
        goto(Continue);
        }
      [ ham for bait
      if (!isset(HasHam))
        {
        print("This is the place to fish, but the fish are going to want to see "
              "some bait at the end of that line!");
        goto(Continue);
        }
      [ shovel handle for pole
      if (HandleStatus != 1)
        {
        print("This is the place to fish, all you need now is something to use "
              "as a fishing pole!");
        goto(Continue);
        }
     
      [ ready to go fishing!
      print("Well you've done it!");
      print("You have found the perfect place to fish, and you have everything "
            "you need to do it!");
      [ move into position on the stern deck
      move.obj(ego, 56, 52, 1, fFishMoved);
      [ initiate fishing status
      vFishingStatus = 1;
     
      [ score 8 points
      if (!isset(ScoreFishing))
        {
        sound(s.AddToScore, fSoundDone);
        set(ScoreFishing);
        currentScore  += 8;
        }
      }
    }
  else
    {
    print("You're getting close to the ideal fishing spot, but you're not quite "
          "there!");
    }
  }
 
Continue:
.
.
.
.
Done:
[ call the main timing logic
call(lgc.CapeTripTiming);

return();


You will notice that the 'goto' statement jumps past the end of the if-block that it is inside of. So it can't be an 'else'. To reduce it to a simpler set of lines that are easier to see, this is what is happening:

Code: [Select]
if (testA)
  {
  if (testB)
    {
    statement1;
    goto(Label1);
    }  [endif testB
  statement2;
  } [ endif testA

Label1:
statement3;

If you try to make that an 'else' block, you would get this:
Code: [Select]
if (testA)
  {
  if (testB)
    {
    statement1;
    } else 
    {
******   
*  statement2;
*  } [ endif testA
******
    }  [ endif testB
statement3;

You can see how the block levels don't work. The testA block can't end inside the testB block. Blocks have to be fully nested.

For a more technical definition of 'else' vs. 'goto' in terms of actual code, you could take a look at the WinAGI source, in the 'LogDecode.bas' module.  Basically, decompiling is a two-pass process. The first time through, all jump points (labels), code blocks and their levels are determined, and stored in an array. Then the decompiler goes through the logic code a second time, identifying all commands and if tests. Using the information gathered during the first pass, labels are added as needed, and blocks are confirmed to be either 'else' or 'goto' depending on where they jump to.

WinAGI may not be authoritative, but it's pretty damn smart, and has a very good pedigree. It's based on original code from Peter Kelly's first AGI Studio. His decompiler code was pretty good, and since I did not know much about AGI at the time, I just copied what he had, porting it to VB but mostly following the same approach. I've made a few tweaks to it over the years, but the basic decompilation algorithm is pretty much the same as Peter's original.

And size doesn't matter (yeah, that's what she said...). Unless it's larger than an Integer. Then it would be a Long, and clearly, that would matter.

15
OK, thx.
I can tell from your video that WinAGI is able to open the WORDS.TOK file, because it shows the word and group counts in the properties window. I think there's a problem with the words editor form- maybe a control on it that is not compatible with Windows XP or a property being set incorrectly. But why it would do that in XP but not any other Windows versions, I don't know.

I might have access to a Windows XP machine. I'll try to do some testing to see if I can figure this out.


Pages: [1] 2 3 ... 14

SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.028 seconds with 20 queries.