Jump to content
MakeWebGames

Multiplayer Tic-Tac-Toe


seanybob

Recommended Posts

A partner and I have just finished coding several multiplayer games using a framework we developed. To highlight our new products, we specifically created a Tic-Tac-Toe mod using that framework that we are releasing for free to the McCode community.

Screenshot:

ttt.png

Download:

Tic-Tac-Toe.zip

Demo:

Demo Site

*Note - You'll need two people (or two browsers logged into two different accounts) to experience much in the demo.

Our other, paid products:

Multiplayer Mancala

Multiplayer Connect 4

Multiplayer Backgammon

Multiplayer Battleship

Multiplayer Othello

Multiplayer Checkers

Multiplayer Minesweeper

All available at:

[mp]198[/mp]

Link to comment
Share on other sites

There was a minor ascetic bug in this mod (as a result of an overzealous copy and paste session). It could not be exploited.

The files above have been updated, so if you download the files after this post, it will already be fixed.

If you downloaded the files before this post, to fix:

1) Open up ttt_play.php

2) Find

$db->query("INSERT INTO man_chat (man_room, timestamp, txt) VALUES($roomid, unix_timestamp(), '$txt')");

3) Replace with

$db->query("INSERT INTO ttt_chat (ttt_room, timestamp, txt) VALUES($roomid, unix_timestamp(), '$txt')");

Sorry about that. ;)

Link to comment
Share on other sites

I mean all in one PHP file.

Yes, of course. However, we choose not to. It's useful having the framework in separate files, so to create a new game we just have to create 3 new files. Oh, and the config file could be jammed into another file. The func file doesn't really have to be separate from the play file. Etc, etc.

However, it seems much more readable and easier to navigate that way (as well as making more logical sense in my mind), so that is the way we'll keep it.

Link to comment
Share on other sites

Seany Baby! Could you help me please?

I have converted this to use with v1/lite but I have an error.

My ttt_play.php file..

[expander]

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

[/expander]

But whenever I play it I get.. "1" printed on the screen. If you need me to post any other files I will...

Link to comment
Share on other sites

And Chat doesn't work.

This mod was not made for version 1, that's why.

You must have converted it wrong. It'd be fairly difficult to convert mate - I honestly wouldn't bother. You'd have to go through every file and restructure the queries, you'd have to change the global variables in all the functions from $db to $c, you'd have to change the headers in the files from the mcv2 to mcv1, and that's just what I remember off the top of my head.

There's a reason I didn't make a v1 version of this mate. I do wish you the best of luck though if you continue trying to convert it, but I really want no part in that - seems liike a waste of time to me.

Edit: As for the error you were getting in that file you posted, I have no way of knowing. I have no idea what's in your mysql.php file. However... it looks like perhaps a connection to the database isn't being established properly on that page, for one reason or another.

Link to comment
Share on other sites

Paddy is completely correct. The hall of fame is only functional for the other paid games, not this free game.

As for the surrender option - the person auto-loses if the game has started and they leave the table (which I guess is what you're looking for?).

For those who really like this mod, you should totally be checking out the other games - they are, quite simply, a lot better. I'm always willing to haggle a little on price.

Link to comment
Share on other sites

Ah, ok. If I buy another game will I get the hall of fame for tic-tac-toe?

Hehe :P

You're really intent on getting that Hall of Fame working for Tic-Tac-Toe.

I'd have to recode portions of Tic-Tac-Toe to make it fully compatible with the hall of fame... and... I really don't want to. I'll toss the idea to my partner though, see if he wants to do it. I just hate the idea of making a hall of fame for a "solved" game like Tic-Tac-Toe that people can ensure they always win or tie on.

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.

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.

×
×
  • Create New...