The place to discuss the ADRIFT Interactive Fiction toolkit

Code Break / Mastermind Prototype

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Code Break / Mastermind Prototype

Postby ElliotM » Sun Aug 03, 2014 12:51 am

A fun and simple experiment for testing Asynchronous Multiplayer. Code Break is a text based Mastermind port for Adrift 5 which can be turned into a two player game by either playing hotseat or by sharing save game files over the internet like a Play By Email type game. While there are certainly easier ways to get in a game of Mastermind with a friend, this is just a simple experiment to see if its possible. If so, then more interesting experiences could certainly be created to take advantage of the new possibilities. You can still play solo by using the random option when generating a code to break.

To try it out, download the game file (taf). If you would like to try out 'multiplayer', download the zipped version which includes a sample save file (tas) that I have created. Run the game file in the Adrift 5 runner and then open the save file to begin making guesses to break the code I made. Feedback appreciated. If you want to share your own save file, you will need to put it in a zip file as uploading a tas as a forum attachment is currently prohibited.

I have left the game file unpassworded for anyone who wants to see how it all runs if people are interested in how I made the random code generator (it uses the OneOf() function and an array, so pretty simple I think). For the rest I make use of a lot of Arrays and FOR Loops. I also demonstrate a status bar message using custom User Functions that changes depending on which game mode you are in (Code Maker or Code Breaker/Play Mode). I also show how to check for win or lose conditions and how to print the contents of arrays.

I've tried my best to document my tasks using the <!-- Code Comment --> function. You can find these notes in the text boxes for message completion or in the restrictions I made while in the Developer. To begin digging around in the Developer, I suggest following the new code task for the Code Maker side and the guess task for the Code Breaker side. Total development time for this game was about two days as I relearned how everything worked. Let me know if I missed anything, as so far only I have played it.
Code Break V1 with Open
Zip file containing version one of Code Break and a save game file (tas) for testing Asynchronous multiplayer. Uploading a tas directly is currently prohibited by the Forum Upload dialog, so a zip file seemed to be the most universal option.
(21.8 KiB) Downloaded 127 times
Code Break for Adrift (Version1).taf
Code Break for Adrift, version 1. Game file only, not zipped. Version 1 currently throws an index out of bounds error for me but everything still works properly as far as I have seen. Please post if it doesn't work for you.
(20.65 KiB) Downloaded 138 times
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 2 guests