Archive for the 'Gruepal' Category

Gruepal – Version 4 Progress

Pretty much all the code I had before is now version 4 compliant. All the opcodes that deal with objects and their properties are now fully v1-8 compliant. What I’m mostly doing now is dealing with the screen manipulation that is common to version 4 and higher z-machines. Earlier games were written to pretty much print to the screen in a continuous fashion, whereas 4 and above could split the screen into two windows, print in column/row format, adjust height, font style, etc.

Implementing Multiple Windows

I’ve beefed up the output buffer quite a lot – instead of just being a place to dump text that’s shown on the screen, its now sectioned into multiple areas, such as the status bar for v1-3 games, or windows 0-7 for v4+ games. Each buffer has a raw area the game writes to, and a render area that combines the raw text with CSS code derived from style data from the game to be shown on the browser.

Gruepal can now handle screen differentiation between v1-3 and 4, handle multiple windows on the screen (both splitting and joining), clearing certain windows, and space-based positioning (which a lot of games use). A Mind Forever Voyaging is looking better and better, the next two steps are keeping track of where the screen goes into reverse mode and rendering that via css, then taking care of positioning when position opcodes are used.

Gruepal – Version Support and Pre-Alpha Testing

Public Testing Soon!

Things are moving along, I haven’t found any further bugs when testing out version 3 games (I’m sure they’re there but things are looking fairly stable), so I’m calling Gruepal ready for people to pound away on for v1-3 games. Since my rented server is starting to get a little too big of a load, I found some cheap web hosting with fast processors and setup an account tonight. I will be installing Drupal on there and putting Gruepal builds on it for people to play around with within the next week.

With things looking good for versions 1-3, I wanted to start fleshing out v4-8 support before adding too many extra features – I want to ensure that the core of the engine is done, I may have to make a change that would affect extras and cause a lot of code rewrite.

Versions 4 and Up

I’ve starting working primarily on supporting version 4 stuff, but in the process it will fill in a lot of functionality required for versions 5-8 as well. I’m doing my version 4 work with “A Mind Forever Voyaging” – for two reasons. First, it’s a classic that I’ve heard great things about, and I haven’t had a chance to play it yet, so this will give me an opportunity. Also, it uses a lot of screen manipulation which I need to handle better anyway, so it’s a good game to work with.

Screen Manipulation

There are a lot of decisions I’ve had to make as far as screen manipulation since there isn’t really a screen in the classic sense – the game isn’t directly controlling what the user sees, its rendering to an output buffer which is printed in the user’s browser. Really, through the use of CSS it’s not too bad, I can recreate things – but I gave the user some functionality such as scrolling through the entire history of their game which isn’t part of the z-machine spec, so I need to balance that with things that don’t fit with that, e.g. a clear screen. Does it clear the whole history, or just put a lot of whitespace in so the screen being viewed is cleared, but the user can still scroll up? I’m thinking I’ll probably clear the whole buffer, as there may be times when the game simulates a control panel of some type and it wouldn’t make any sense to have previous renders of what the control panel had been showing in the output buffer.

Anyway, I’ve implemented enough version 4 code that A Mind Forever Voyaging doesn’t crash off the bat – it prints a lot of what it’s supposed to, but it definitely isn’t formatting the text right yet, and some of the text is wrong. My favorite is, instead of saying

“You have entered Communications Mode”

it says

“You have entered dinner.”

Definitely a lookup issue there. ;)

I will post the info here when the testing area is ready to go for the v1-3 code though.

Gruepal – Another bug squashed

Fixed the Moonmist bug that printed out a strange character when putting your favorite color in. This ended up actually being a biggie with the way I was performing the SREAD opcode, which is the standard opcode that reads in text and does all the parsing/lexical table construction.

There are two buffers you have to fill in that the game expects in a certain format – the text buffer and the parse buffer. The text buffer basically contains a copy of what the user typed, and the parse buffer contains an entry for each word and symbol parsed, entries consisting of what index in the dictionary the word is, how long the word was, and where in the text buffer the word appears.

I had actually made two errors in SREAD which kind of canceled each other out, only not canceling each other out in Moonmist during the favorite color question. One, I had read version 5+ of the SREAD specification by accident, and was off by 1 byte in where I was writing to in the buffer. Everything still worked, because I was also off by one byte in my position calculations within the parse buffer. I fixed both those issues, and everything worked, including the Moonmist issue.

I’ve run into a few more infinite loop bugs in Moonmist, but most of the bugs are ironed out now. After I kill the Moonmist bugs, I’m going to try a few more games, and if things go smoothly, I want to start filling out the code for versions 4-8 of the zmachines, then get Gruepal online for some alpha/beta testing.

Next Page »