Page 1 of 1

Sierra AGI Interpreter Update November 2024

Posted: Sun Nov 03, 2024 5:38 am
by Manannan
This post is to provide an update on the Sierra AGI Interpreter I’ve been working on, which I’ve previously shared.

The focus over the last three months has been on achieving a 3D effect. If you’re unfamiliar with these games, they were marketed as “3D” back in the day, though they are what we would now call pseudo-3D. In simple terms, this means that the character can move in front of or behind background objects based on the sprite’s y-position. Later Sierra games using the SCI engine included perspective, but this feature was never supported in AGI games.

For those interested in the technical aspects, here’s a link: http://agiwiki.sierrahelp.com/index.php ... ty_Screens

I’ve also prepared an animated GIF that illustrates this concept better than words. (Note the dithering effect is just an artifact of the animated gif tool)
3dDemo.GIF
3dDemo.GIF (5.53 MiB) Viewed 558 times
Currently, I am handling this 3D effect in the IRQ handler. This works in most cases, but there are occasional IRQ overruns with large split sprites, such as the credits in certain introduction sequences.

My major goals for the next three months are:

- To implement a 3D effect backbuffer to reduce the risk of IRQ overruns.
- To add sprite garbage collection to free up VRAM for the buffer. The introductions contain many large, short-lived sprites (e.g., credits in the King’s Quest III intro), so garbage collection could effectively reclaim VRAM.
- To implement a "wander" feature, so that the chickens in King’s Quest III will roam around their cage without leaving, and the crocodiles in the moats will move around naturally.

Re: Sierra AGI Interpreter Update November 2024

Posted: Sun Nov 03, 2024 12:14 pm
by desertfish
woah, is that gif from running on the x16? This has come a long way already! Amazing job

Re: Sierra AGI Interpreter Update November 2024

Posted: Sun Nov 03, 2024 11:25 pm
by Manannan
desertfish wrote: Sun Nov 03, 2024 12:14 pm woah, is that gif from running on the x16? This has come a long way already! Amazing job
Yes, this is running on the Commander x16!

Re: Sierra AGI Interpreter Update November 2024

Posted: Mon Nov 04, 2024 5:59 am
by voidstar
We had fun demo'ing KQ1 on the X16 in VCF earlier this year!!

Though - sound support? It was something the CoCo systems never tackled. The early Sierra games had subtle background audio effects, like birds. Then the ultimate was that organ in KQ4.

Re: Sierra AGI Interpreter Update November 2024

Posted: Wed Nov 13, 2024 2:38 am
by cosmicr
The engine is looking close to finished! Well done on the job! Are the views sprites or drawn to the bitmap layer? In my version I was using sprites which presents it's own challenges but I always assumed they'd be faster than a heap of pixel gets/sets.

I had sound working in my unfinished implementation of the AGI interpreter: https://github.com/cosmicr/astral_body/ ... in/sound.c

Feel free to steal it and butcher it how you like.
We had fun demo'ing KQ1 on the X16 in VCF earlier this year!!
You should have asked me for my Another World port - you could have demoed it too!

Re: Sierra AGI Interpreter Update November 2024

Posted: Sat Nov 16, 2024 12:07 pm
by Manannan
cosmicr wrote: Wed Nov 13, 2024 2:38 am The engine is looking close to finished! Well done on the job! Are the views sprites or drawn to the bitmap layer? In my version I was using sprites which presents it's own challenges but I always assumed they'd be faster than a heap of pixel gets/sets.

I had sound working in my unfinished implementation of the AGI interpreter: https://github.com/cosmicr/astral_body/ ... in/sound.c

Feel free to steal it and butcher it how you like.
We had fun demo'ing KQ1 on the X16 in VCF earlier this year!!
You should have asked me for my Another World port - you could have demoed it too!
Hi CosmicR,

Thanks for the encouragement!

I am using your excellent fill and line drawing algorithm, which is leagues better than my old version.

I am using sprites, although a little weirdly because those that move have to be reblitted according to the priority screen to get the 3D effect.

One of the biggest challenges it presents is memory management. I had to build a sprite memory allocator.

I have recently drafted a garbage collector to clean up the memory of disused sprites.

I certainly will look at your sound code, and I am sure it will save me a lot of time!