I thought it was time to give an update to the progress of the AGI interpreter I am building.
I have hit some milestones, over the past few months I wanted to share.
- In King's Quest I, the player is now able to walk around the map and pick up objects.
- I have implemented a working text parser, and the game responds correctly to the commands
I have uploaded a video of this here. In summary the player is able to open the doors of the castle, walk through the halls and bow to the king. He then goes to the field to eat a 'tasty' carrot!
https://youtu.be/mmCgzXV5TwY
I am grateful to Voidstar for letting me show this off at VCF Dallas.
I met with CosmicR, over Skype a few months ago to discuss the integration of his excellent graphics drawing routine into my codebase. His scanline algorithm fills much faster than my diamond one, which I just ported from Meka.
See here: https://github.com/cosmicr/astral_body and viewtopic.php?p=33151&hilit=forgot#p33151
I hope to see this integrated as the next major piece of work.
Once this is integrated, then sprite to background priority can be worked on.
My repo is here: https://github.com/wizardmanannan/CX16A ... /README.md
June AGI Interpreter Update
Forum rules
This section is for testing Commander X16 programs and programs related to the CX16 for other platforms (compilers, data conversion tools, etc.)
Feel free to post works in progress, test builds, prototypes, and tech demos.
Finished works go in the Downloads category. Don't forget to add a hashtag (#) and the version number your program was meant to run on. (ie: #R41).
This section is for testing Commander X16 programs and programs related to the CX16 for other platforms (compilers, data conversion tools, etc.)
Feel free to post works in progress, test builds, prototypes, and tech demos.
Finished works go in the Downloads category. Don't forget to add a hashtag (#) and the version number your program was meant to run on. (ie: #R41).
June AGI Interpreter Update
Last edited by Manannan on Mon Jun 17, 2024 9:39 am, edited 1 time in total.
- desertfish
- Posts: 1094
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: June AGI Interpreter Update
Wow that flood fill code is very fast. What screen mode is this running in?
Re: June AGI Interpreter Update
Layer 0: 320x240 bitmap 2 bytes per pixel modedesertfish wrote: ↑Sun Jun 16, 2024 9:24 pm Wow that flood fill code is very fast. What screen mode is this running in?
Layer 1: 4 pixel per byte tile mode
Sprites: Enabled
That's not the whole story though.
The agi resolution is 160x168.
However the pixels are doubled horizontally which equals 320x168. That's why there are black bars at the top.
Thanks for the praise regarding the speed of the algorithm. I optimised it by unrolling all of the loops.
However, it is about to be replaced.
I haven't drawn the priority screen yet so if I kept this drawing algorithm the speed would be roughly halved.
I also mistakenly used the diamond algorithm inherited from Meka rather than a scanline algorithm which works very efficiently the VERA's auto increment.
Also my diamond flood algorithm uses 9 banks for a queue!
That is why I will be using CosmicR's algorithm as I mentioned in the post. It can draw both even faster and only takes a few hundred bytes of space for the queue.
- desertfish
- Posts: 1094
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: June AGI Interpreter Update
I wrote a scanline based flood fill routine (mainly for the Paint program)
Here you can see it
https://github.com/irmen/prog8/blob/mas ... x2.p8#L628
I never took the time to optimize it for vera optimized writes
Here you can see it
https://github.com/irmen/prog8/blob/mas ... x2.p8#L628
I never took the time to optimize it for vera optimized writes
Re: June AGI Interpreter Update
OPEN DOOR
BOW (to the king!)
PUSH ROCK
CLIMB TREE
TAKE EGG
Good times! At VCF, no one caught on that you had to actually type commands to interact with the environment (I mean, on their own).
It was tough "re-teaching" folks how those old Sierra games were a kind of hybrid "text adventure" (or "typing tutor?") and graphical adventure-game.
BOW (to the king!)
PUSH ROCK
CLIMB TREE
TAKE EGG
Good times! At VCF, no one caught on that you had to actually type commands to interact with the environment (I mean, on their own).
It was tough "re-teaching" folks how those old Sierra games were a kind of hybrid "text adventure" (or "typing tutor?") and graphical adventure-game.
Re: June AGI Interpreter Update
Thanks. I may reference this.desertfish wrote: ↑Mon Jun 17, 2024 4:37 pm I wrote a scanline based flood fill routine (mainly for the Paint program)
Here you can see it
https://github.com/irmen/prog8/blob/mas ... x2.p8#L628
I never took the time to optimize it for vera optimized writes
Re: June AGI Interpreter Update
Funny you should say 'typing tutor', as King's Quest III was my typing tutor. I learnt in touch type in Manannan's lab .voidstar wrote: ↑Tue Jun 18, 2024 5:04 am OPEN DOOR
BOW (to the king!)
PUSH ROCK
CLIMB TREE
TAKE EGG
Good times! At VCF, no one caught on that you had to actually type commands to interact with the environment (I mean, on their own).
It was tough "re-teaching" folks how those old Sierra games were a kind of hybrid "text adventure" (or "typing tutor?") and graphical adventure-game.
- desertfish
- Posts: 1094
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: June AGI Interpreter Update
TallLeroy over at the discord has been tweaking the fill routine mentioned here and has a version running that fills a hefty part of the 320x240 lo res screen in about half a second, very promising I thinkManannan wrote: ↑Tue Jun 18, 2024 12:20 pmThanks. I may reference this.desertfish wrote: ↑Mon Jun 17, 2024 4:37 pm I wrote a scanline based flood fill routine (mainly for the Paint program)
Here you can see it
https://github.com/irmen/prog8/blob/mas ... x2.p8#L628
I never took the time to optimize it for vera optimized writes
Re: June AGI Interpreter Update
Thanks DessertFish.desertfish wrote: ↑Wed Jun 26, 2024 5:09 pmTallLeroy over at the discord has been tweaking the fill routine mentioned here and has a version running that fills a hefty part of the 320x240 lo res screen in about half a second, very promising I thinkManannan wrote: ↑Tue Jun 18, 2024 12:20 pmThanks. I may reference this.desertfish wrote: ↑Mon Jun 17, 2024 4:37 pm I wrote a scanline based flood fill routine (mainly for the Paint program)
Here you can see it
https://github.com/irmen/prog8/blob/mas ... x2.p8#L628
I never took the time to optimize it for vera optimized writes
For others reading the post, I found it by going to the discord server and searching for the word fill.
I will have to analyse it and compare it to the other algorithm I mentioned to see which one requires the least memory and is fastest.
Kind of like examining final candidates in a recruitment round.
I wasn't expecting there to be an algorithm which could beat the 2 seconds of the other one.
Once I know which is the successful candidate I will post.
- desertfish
- Posts: 1094
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: June AGI Interpreter Update
If you would like to see the optimized fill routine in action, you can do so by toying around with the paint program:
viewtopic.php?p=34490
viewtopic.php?p=34490