Page 1 of 2
June AGI Interpreter Update
Posted: Sat Jun 15, 2024 5:27 am
by Manannan
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
Re: June AGI Interpreter Update
Posted: Sun Jun 16, 2024 9:24 pm
by desertfish
Wow that flood fill code is very fast. What screen mode is this running in?
Re: June AGI Interpreter Update
Posted: Mon Jun 17, 2024 9:47 am
by Manannan
desertfish wrote: ↑Sun Jun 16, 2024 9:24 pm
Wow that flood fill code is very fast. What screen mode is this running in?
Layer 0: 320x240 bitmap 2 bytes per pixel mode
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.
Re: June AGI Interpreter Update
Posted: Mon Jun 17, 2024 4:37 pm
by desertfish
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
Posted: Tue Jun 18, 2024 5:04 am
by voidstar
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.
Re: June AGI Interpreter Update
Posted: Tue Jun 18, 2024 12:20 pm
by Manannan
Thanks. I may reference this.
Re: June AGI Interpreter Update
Posted: Tue Jun 18, 2024 12:21 pm
by Manannan
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.
Funny you should say 'typing tutor', as King's Quest III was my typing tutor. I learnt in touch type in Manannan's lab
.
Re: June AGI Interpreter Update
Posted: Wed Jun 26, 2024 5:09 pm
by desertfish
Manannan wrote: ↑Tue Jun 18, 2024 12:20 pm
Thanks. I may reference this.
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 think
Re: June AGI Interpreter Update
Posted: Fri Jun 28, 2024 4:08 am
by Manannan
desertfish wrote: ↑Wed Jun 26, 2024 5:09 pm
Manannan wrote: ↑Tue Jun 18, 2024 12:20 pm
Thanks. I may reference this.
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 think
Thanks DessertFish.
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.
Re: June AGI Interpreter Update
Posted: Fri Aug 23, 2024 6:39 pm
by desertfish
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