Sunday 16 October 2016

Developer Diary: Caren and the Tangled Tentacles (Commodore 64)

Following on from our previous 'Developer Diary' write-up (where we looked at the forth-coming Amiga version of Powerglove), Dr. Martin 'Enthusi' Wendt took some time out from his long-term 'Caren and the Tangled Tentacles' project to discuss some of the technical aspects of what is arguably the most impressive point 'n' click adventure game ever made for the Commodore 64.

You can download the latest public version (1.1) HERE.

Since the initial competition version of Caren and the Tangled Tentacles much has happened. The deadline for that was quite a disaster and great fun at the same time! Adding massive content and applying major changes literally in the last seconds. Fortunately, we all came out of this alive.

Oliver 'Veto' Lindau did an amazing job with all those rooms pixeled in multicolor mixed charmode the C64 has to offer. That means 40x17 tiles for the room graphics for each screen. But only around 220 different tiles available and each of them limited to up to four colors per 8x8 pixel tile. Three of those four colors are the same for the whole screen! There goes your freedom of choice :)

Making maximum use of the one color not set globally, while adding extra detail with two-color hires tiles every now and then. Those contain only two colors.

The global background plus one color selected from the first 8 of the c64 palette (so quite limited). While this is always possible in the mode that by far most C64 games operate in, it is rarely put to use. While you see it for separate objects such as the white hires clouds against the blue sky in The Great Giana Sisters or the water falls in Turrican (with the same color scheme!), mixing those is a barely seen. In Oliver's art, however, this is rather the rule than the exception.

The way we mask Caren to the scenery, there were also tight restrictions on all objects that were to become foreground or at least something Caren would potentially walk behind. The approach is known in the demo scene as 'cookie cutter' and was -to my knowledge- never applied in games before. It utilizes the fact that the 8 hardware sprites are displayed in a strict priority order while each of them can additionally be flagged as 'foreground' or 'background' which controls if the VIC draws them above or behind the tile graphics. This is very unique to the Commodore 64.

It now happens that a sprite is drawn in front of another but behind the background. The net result is that the sprite with lower priority gets clipped by the mask-sprite and the bitmap shines through. So whenever part of Caren is supposed to be covered, we place a sprite with the proper mask-shape in front of her but behind the background.

In the image you can see the sprite-mask layer in red, green, blue and the same scene in-game with 'Caren' behind the windows of the bus. You can also spot areas of hires pixels around the tires and luggage bins. There are almost twice as many sprites needed than shown here though as we need one for transitions in between those that are shown. Whenever Caren walks in front of the bus, these sprites are simply disabled all together. It is not quite that simple as the background itself is 'half transparent' and the masking sprite itself shines through. In fact two of the four bitmap colors per tile are transparent.

We win one color back by giving the mask sprite itself that very color. So every gfx that will eventually cover Caren can only have three colors. The global background color as well the the first global multicolor charmode color are always transparent. Veto can select one color for that char as well as the color for the mask-sprite. Using sprites as mask limits the size of masking objects notable but the engine can setup masks dynamically
(and does so all the time). They are in hires mode and depending on the needs X- and/or Y-expanded.

To be able to fully cover Caren i.e. behind columns, there is a dynamic multiplexer that re-uses Caren's head for any mask below her shoulders. Two Y-expanded masks are always sufficient. There are screens where Caren walks behind a six-foot fence or the windows of a bus she entered. While she walks, the two masks are moved along with her and their shape (pointers) are adjusted to match the part she currently stands behind.

Using this somewhat unintuitive way of hardware masking saves a lot of CPU time in comparison to software clipping. The masking is one of the main reasons why the scrolling in Maniac Mansion and Zak McKracken was rather slow and also why the characters always moved in steps of a whole char in horizontal direction (you probably never noticed that until now, though. Sorry!) This enables us to run the game at 50 FPS (or 60 on NTSC) without any buffering of either sprites or graphics.

Even before we submitted the game to the initial competition it was our intention to polish it up in the days to come after the compo. Version 1.1 (up to now the latest public version) contained several fixes, many enhanced dialogues (thanks to Robert Megone), a few new sound fx, tunes and even changes in the puzzles as well as a new flashback scene with 100 new sprites for animation.

People who played and finished version 1.1 might have noted the cliff-hanger-like ending :)

Of course we wanted to continue the story and improve the game experience at some point. Early this year, Sam Dyer and James Monkman came up with the plan to include a special version of 'Caren' by as extra stretch goal of Sam's 2nd C64 Visual Commpendium book, as an emulator image as well as 100 physical boxes. James did all the organization and what a wonderful job he did, indeed:

By now, the game logic scripts surpassed 12,000 lines and there are more than 650 lines of text and 13 SID tunes with 40 sound effects.

We already had great feedback and everyone on board agreed to continue Caren's quest! The available version will remain part of the extended game, with some changes here and there. New locations are based on a actual city map and there already is a bus connecting certain areas.

We demoed that version at the world's largest gaming event Gamescom 2016 in Cologne with almost 350,000 visitors. The retro-gaming hall included a large area from the German RETURN retro magazine, who invited us and a couple of other active developers to demonstrate their games including Caren and the Tangled Tentacles and to have people play it. We were quite positively surprised by the great feedback we got (the year before, Oliver got overwhelming feedback on an very early version of our game from Ron Gilbert -the maker of Maniac Mansion- himself at Gamescom 2015).

Despite the fact that the genre of point-and-click adventures is not exactly ideal to play on passing by, our stand was almost always occupied (and so were we). It was amazing to see the large variety of players. Grandpas showing their nephews that 'old machine', people that could not believe that what they saw ran on their childhood computer as well as folks considerably younger than the hardware they were playing on.

To us it was also a great opportunity to finally meet up with Robert Megone who helped a lot with proof-reading, translation in general and of course play testing :) Robert is the lead tester of Ron's current project ThimbleWeedPark and also involved in ScummVM and approached us via facebook and IRC -yes, really :)- offering his invaluable help. Thanks again Rob! We had a great time and kept on discussing ideas and concepts for Caren's future.

That was extremely motivational, though quite frankly, we never had a lack of that during the last almost two years of development of Caren. Only few weeks later we had the wonderful opportunity to show the game to the more retro-hardware-focused community at Classic-Computing in Nordhorn, Germany. There we had more time for detailed discussions with interested people but also brainstorming further about ideas what to include in the large game project that this has become.

These two events helped also to further polish and improve the engine as well as converging the story of the game further. Thanks to everyone who paid a visit and actually played the game so far! Some did send in the generated code shown at the final scene of the book-version which contains information on the total amount playing time as well as the number of room changes till completion. Thanks for that as well !

It was and is a great time and I am very confident that it will continue to be :) All of this is merely possible with such good friends around us and of course the fact that Veto and I have the same vision and plans for Caren and agree so well on all parts. Kamil 'Jammer' Wolnikowski did a great job with his tunes and unparalleled sound effects, while Sam Dyer had all the trust in us. James 'RGCD' Monkman accompanies the project with all his passion and Frank Erstling of the RETURN magazine supported us all along from day one. Naturally all of this would fall apart without the persistent testing of Robert Megone and Janne 'lemming' Granberg.

The future holds so much more to explore - for us and of course: for you! This is not it!

No comments:

Post a Comment