Jump to content
IGNORED

Classic99 versus Classic99 head to head turn based game DEMO


Sinphaltimus

Recommended Posts

I did not have any crashes of MAME for a long time (I actually don't remember), neither was it required to reboot the machine during MAME runtime. Changes are committed on exit or when you change the medium (e.g. the floppy image). Yes, I'd expect data loss or corrupted images when you spontaneously stop the MAME process.

Link to comment
Share on other sites

Just a heads up that the latest version, when used with DropBox, depending on sync latency and how fast the players guess, there could be a file conflict created in dropbox which throws the game off.

I have already rearranged and cleaned up the code to prevent this from happening.

It occurs during the start of the game, I had both players creating the files locally on their machines at the same time. This could cause an issue with the random number in the PRIZE files.
So the way it will work now is player 1 (since player 1 goes first) will be the file creator. I've included a delay for player 2 that should be (need to test) long enough for player 1 to create the files and dropbox to sync them before player 2's first turn.

 

So yeah, the demo is buggy - I'm working on it here and there for anyone whom may show interest. Once I get to test it, I'll update with a new version containing bug fixes and a bit more optimization despite the delays. Not sure when, this time I want to test the hell out of it a lot to ensure I've got it solid before moving on to the next TIPIvsClassic99vsClassic99 game demo. Which will be a bit more interesting and have some graphics and sounds. :)

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

OK, I think I've got it pretty nailed down now. May not be as optimized as it can be but it's stable and so far working through all the tests I threw at it.

So officially, this is the final DEMO version unless someone reports a terrible BUG I need fixing.

I also took the time to add a ton of comments to the beginning of the TidBit SOURCE file as well as commenting on almost every single line.

This way, anyone getting started with TI XB can follow along a lot easier as to what each line is doing. Maybe OVERKILL I dunno.

I like commented code and i don't always do it so I'm kind of happy I took the time to here. It helped me alot stepping through the code with paper and pencil while bug fixing.

I hope ya'll like it and enjoy what I've done here. I plan to do more simple game demos like this. It works classic99 vs classic99 session on local LAN or over the internet via a file sync cloud service. It will also work TIPI console vs. classic99 session same as c99 v c99 and with some additional setup outside of the scope of this project, it will work TIPI console vs TIPI console on LAN or Internet if you incorporate a cloud sync service with your shared directories and mount/SymLink configs for the sync service. On a LAN with TIPI, you'll also need to setup and mount shares and SymLinks.

Here are the contents of the readme file also located at the top of the TidBit SOURCE file.

 

//****************************************************************************************************************************************************************************
//Best if viewed with notepad++ : https://notepad-plus-plus.org/
//****************************************************************************************************************************************************************************
// Head to head Number Guess Game by Leonard Rivera created for:
// .
// Emulated console vs emulated console using classic99 emulator - set both DSK1 to same network location via FIAD then OLD DSK1.NGCVCD23 on both emulated consoles to play.
// .
// TIPI enabled console vs emulated console using real TIPI equipped console and classic99 emulator - set both DSK1 to same network location.
// for TIPI use TIPICFG and in classic99 use FIAD for DSK1.
// Then OLD DSK1.NGCVCD23 on both emulated consoles to play.
// .
// TIPI enabled console vs TIPI enabled console. Using TIPICFG set both DSK1 to same network share.
// Network shares for TIPI require setting up mounting and linking the share to at least one TIPI shared subdirectory if the share exists on the other TIPI.
// Or mounting and linking the share to at least both TIPI consoles if the share exists on something other than one of the Pi computers attached to one of the TIPI cards.
// Then OLD DSK1.NGCVCD23 on both emulated consoles to play.
//****************************************************************************************************************************************************************************
// DISCLAIMER: This game was created during the TIPI beta. I make no claims that it will work for you with or without a TIPI or Emulation. 
// It is not designed to work on a real console using a real floppy drive - you could damage your drive(s) - maybe, probably not, probably impossible, just don't blame me.
// This is the original source code by Sinphaltimus at AtariAge / Classic Computing / TI-99/4a forums with help from the community.
// Use at your own risk. If you think you found a bug, drop a line at AA.
// Please only distribute this game with this source code included. Thank you.
// For more information or to contact Sinphaltimus - cut and paste below URL only into an Internet connected browser of your own choosing.
// http://atariage.com/forums/topic/273950-classic99-versus-classic99-head-to-head-turn-based-game-demo/
//****************************************************************************************************************************************************************************
//This source file is meant to be compiled using TidBit
// TidBit can be found here for running on local machine:
// http://atariage.com/forums/topic/172765-basic-xb-translator-tidbit/
// or here for ready to use web version:
// http://codehackcreate.com/archives/237
//****************************************************************************************************************************************************************************
//Information about TIPI can be found here:
// http://ti994a.cwfk.net/TIPI.html
//****************************************************************************************************************************************************************************
//Information about classic99 can be found here:
// http://www.harmlesslion.com/software/Classic99
//****************************************************************************************************************************************************************************
 

TI ready to use XB program (NGCVCD23) file, and 3 text files included in the ZIP (XB program with line numbers, TidBit source without line numbers, nicely formatted and commented to heck, readme)
  • Like 2
Link to comment
Share on other sites

Very neat!!! I havent played it, but the project looks like something weve talked about for yearsonly without the TIPI.

 

Look forward to getting one of my own!

 

 

This works without TiPi right now, in emulation only. So if you have classic99 on two different PCs, you can play it head to head without TIPI. As I demo'ed in the video, I had 2 classic99 sessions open on the same computer just for simplicity of demo'ing the demo...

 

So for emulation gameplay, it's pretty straightforward, you just have to be mindful of what you estimate each console is doing at any given time so you can hold one back while the other does disk IO functions. That was the hardest part of debugging. I even had to throw in at least one delay loop so that the player 2 instance of the program would be forced to wait and hopefully it was enough time for the player 1 instance to finish its job.

 

Just for simplicity in dealing with it all, I used one file per variable to be stored. And at least one of those variables control who's turn it is just at the start of the game with a separate variable to control who's turn it is during the game.

 

If it interests you, definitely check out the SOURCE text file. I did literally comment almost every single line of code (most of it redundant).

 

I mean, it's a lot of code for a simple number guessing game. I'm sure it could be optimized further, especially if done in RXB. And i know I can OPEN #1 then OPEN #2 do inputs and prints then CLOSE #2 then Close #1 and i probably used a lot more ON ERROR then I needed to but doing it that way helped me troubleshoot and manually trace the program step by step to figure out where a given player was in the code at any given time. Since it's stable - I left it that way.

 

On the other hand..... with TIPI, there is active development on the table for have server side functions to handle variables for multiplayer games over TCP/IP. That's where things get real interesting... because I think we'll be able to move from Turn Based to real time gaming then. But don't quote me on that. Right now we're testing the heck out of CHATTI. :)

 

Next I want to try my hand at a turn based slimmed down battleship type game where a player has 2 moves. One to move position once (adjacent to current location) and one to fire at a specific x,y coordinate. Any missed shots create a barrier the player opposing player cannot move to. I'm mulling ti over in my head before taking to pencil and paper so I haven't really started that yet.

 

I also have an idea for a turn based adventure game, along much of the same principle as table top RPG games where it can only be one person's turn at a time. And the turns would be limited to one move plus one action (like tunnels of doom in that sense but not at all like it in presentation).

 

So yeah, have a go at it....especially if you have more than one PC.Laptop for classic99.

 

My intent is to get others to think about maybe developing games in the same way, turn based head to head from two different console, yes emulated for now, but when TiPi comes, it'll probably be just a handful of adjustments to make it 100% compatible.

 

IF/When I make games for TiPi, I plan to make the emulated console vs emulated console as well. Perhaps start the program with "Are you emulated or TIPI'ed?" to kick off the proper code.

Edited by Sinphaltimus
Link to comment
Share on other sites

I have been planning to re-work Honeycomb Rapture with new game logic... randomizing the enemy movements a bit. it would make a cool two-player game. The code to change it from 1 player to 2, then to save the level progress to a save file on diskette would be fairly easy to do.

 

I have other irons in the fire currently, but it would be a neat project. :)

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...