A simple tic-tac-toe game - with a twist.
This is a simple tic-tac-toe game, with an extra mode designed to add a bit of strategy to the proceedings. It was originally written for the console, but has since undergone a minor rewrite to use the Allegro library. Classic-style tic-tac-toe is here, with one and two player modes, as well as variable AI difficulty and board sizes. A variant of the game is also available to play, where each player only has a limited amount of stones which have to be moved around to create a line.
There is also an Ubuntu repository where the game can be directly installed using Synaptic, info available on the website.
Comments and questions are extremely welcome via the forum on my website, via e-mail, or comments on the Linux Game Tome.
License: free
Requirements: Allegro (>=4.2.0)
| Sound: | Play in X: | Play in Console: | Multiplayer: | Network Play: | 3D Acceleration: | Source Available: |
|---|---|---|---|---|---|---|
| yes | yes | yes | yes | no | no | yes |
- Naughts and Crosses home page
- Download Naughts and Crosses
- Binary version of game
- Debian/Ubuntu package
- Info on the Ubuntu repository

How about a nice game of chess?
Seriously, though, do we really need a game like this on the tome, when people even complain about "real" games not being done yet? The AI alone is simple enough that most high school students are expected to make the unwinnable version in their intro programming class. If it were April 1, or if it had at least arbitrary board size, AI, and pretty graphics I might understand (although I'd still disapprove - I just wouldn't disapprove enough to comment about it).
For you negative types out there, try to keep the following in mind:
· It is the only tic-tac-toe game on this site that's for the console and uses ncurses.
· It was made under Linux and has a working windows port already.
· It is under the GPL.
· Variety is good.
· Constructive criticism is the best.
· At least the author didn't just write something, dump it on the site, and vanish into the night. There are future plans for it.
· The site's staff approved the submission.
Is it simple? Sure. Is it easy to write? Apparently, by all of you über programmers' standards. Does that make it bad? No.
Actually it's not based on the ncurses library, but I'm planning on porting it to it so I can make it look at least a bit nicer. I'm also almost finished with the latest version (0.3). I skipped 0.2 because apart from restructuring the program there weren't any major noticeable differences to the game itself. 0.3, however, will have a full one-player mode, variable board sizes and slightly improved presentation (including coloured text - the things we can do these days, eh? :-p )
All good projects must start somewhere, and at least this person is making an effort to create, improve, and release this code to others on this site.
Somehow i bet most of those who posted negitive comments on this project are those who cannot code themselves.
What I find sad are the snobby comments from people that seem to think that they, Linux or the Tome are somehow "too good" to pay attention to a piece of software like this. I know this is no Quake or Frozen Bubble. As it stands, it's no good for more than five minutes of attention, and if you don't like it, you don't have to download or play it. It does sit at the bottom end of the quality scale here. I've GPL'd it, so people can do pretty much what they want with it. Someone came up on the forum with the good idea that this could help other people who are learning C++. It's certainly easier than sifting through the Quake code.
Please, guys, if you have a simple game with a simple gameplay that everyone can/has already coded in less then an hour, thats fine. However, if you submit to the tome at least give a reason what you want to add to make you game special. Even with SDL this game wouldnt be better if you dont come up with an innovative gameplay idea.
"A computer version of a paper game for which no one plays after the age of five. What's the point? And how would we rate this game versus all the others on game tome? Let me think. The graphics are on the low end. The game play is unoriginal. No AI. Compared to the other games on game tome, I would have to say that this one can probably be ranked at the bottom."
or even this:
"A computer version of a paper game for which no one plays after the age of five. What's the point? And how would we rate this game versus all the others on game tome? Let me think. The graphics are on the low end. The game play is unoriginal. No AI. Compared to the other games on game tome, I would have to say that this one can probably be ranked at the bottom."
And while there have even been a few encouraging comments on here, the vast majority of the rest have been akin to the "the Tome is too good for this" or "Linux is too good for this". If you think the game is crap, fine - say so, I don't have a problem with that. If you have suggestions for improvement, brilliant, go ahead and say so. But it's become clear to me that many users on this site just expect great games to pop out of a hat. On Windows, the game would probably be ignored or slated in the way I said above, but it wouldn't get the kind of piss-taking I've seen on here. But maybe I should quit while I'm ahead on both fronts. I have better things to be doing with my time than taking abuse for things I make the effort to learn and work hard to put together in my free time.
Also, looking at the link you gave me (thanks), it's become clear to me what the anonymous coward who posted that message about Paul Panks meant. So you're accusing me of being a troll? Of artificially bumping up my ratings and submitting constant updates to keep the game on the front page? You perhaps didn't notice that this was the first submission? And the fact that I have attempted to reply honestly and upfront to all the criticisms, immature or not?
"I made something almost exactly like this first semester of my High School Sophmore year. At least mine had the option of one or two players (Very simple AI, but it works). You should at least learn SDL and attempt to make it somewhat graphical (my first experiences with SDL were with Tic Tac Toe) Tic Tac Toe is meant to be more of a learning experience than anything. (By the way, this looks almost EXACTLY like the one I made. It's sort of strange, but I guess its just generic)"
http://moonflare.com/code/tttwithoutloops.php
http://hem1.passagen.se/magmog/files/tictactoe.zip
http://www.programmersheaven.com/zone8/cat121/21876.htm
If you have an idea for something new or original, you are very welcome on the tome.
While I accept that this isn't the most original or the most technically astounding game going, I hope that somebody might find it of use, or even get a quick five minutes of fun out of it when it's in a more complete state.
OTOH, some of the posts here are a bit too harsh. I like text console games, and although this one is kind of limited, there's no valid reason to claim it shouldn't be here on Happy Penguin. People have posted their "OMG I AM MAEKING TEH BESTEST MMOPGR EVAR!" games that never even got off the ground here, so limited functionality is hardly a criteria. There are probably a dozen tetris, puyo-puyo, and puzzle bobble clones, so innovation isn't a criteria. Honestly this doesn't rate five stars, but if the author wants to post it, why bitch about it?
Well, to prove that I really don't mind the 1 star ratings, I'm going to give my own game one star - I certainly wouldn't get much fun out of this game as it is here, but I thought a few constructive comments about the programming or structure of the game, or even an idea for a feature would have been nice :-)
Everything up to version 0.32 is available on the website should anyone be interested, although there's a rather embarrassing bug in 0.3 upwards currently...I'll leave you all to figure out what it is *cringe* lol
Rating: one star for having the guts to submit this game, and one star for having the guts to rate your own game with only one star. Hey, that makes two.
Eric Sp.* This game sucks.
This isn't meant to be the latest technological innovation. Play something else if you don't like it, or e-mail me suggestions for changes, or even changes to the source if you're able to program in C++.
As a compromise, I'm going to cut short many of the features I had planned, including network support and an ncurses interface, and simply include some of the better suggestions I've received, before closing up the project with 0.9 FINAL. That will be the next and final submission before I start my next project in earnest (I've got hundreds of bits of paper with sketches and plan, as well as experimental code snippets using Allegro, but nothing concrete thus far)
He's a better programmer than I am, so thumbs up and keep up the good work! ;)
* The game is free-of-charge. You did not pay for it.
* If you have a constructive criticism to make, a suggestion for improvement, I'd be more than happy to hear it. In fact, I encourage them actively.
* If you have a problem with this being on the Tome, take it to the Tome staff.
* I am not going to stop development of this game on a dime at the behest of people who do not want to play it or examine the code. There are people, other than you, who are interested in how this game develops, and have offered support and/or useful suggestions for improvement.
* 1 star ratings do not bother me. I am well aware that this game is not top-notch material, and that the game has little or no lasting appeal.
Anyway, just wanted to offer my thanks to Scarlet and the anonymous person for the comments, which count among the most useful I've seen thus far. I guess it would be possible to include the variants that Anonymous mentioned without too much hassle and turn this into a compendium of board games, although whether it's worth the effort given the response here is another thing. I'll have a think about it anyway :-)
Re: Scarlet's comments - I already considered the possibility of a buffer overflow in the various "check" functions. The "entry" arrays are not the ones that receive the direct input - the user actually inputs into a string, which is then checked for its length, and if it is one then is copied to the char array that you saw, so this array (unless I've missed something) can never be longer than one. The comment about structuring though was very useful, I didn't know about that. Thanks :-)
The latest version looks like it has colored text! Exciting :D
I'm happy to see that this project is still progressing.
It would be nice if you could submit an update (with a list of changes) for the 0.8 version.
Good comments about the code in other posts.
I tried this, out of curiosity and it's been interesting to watch the reactions here for this.
First, the configure script does not seem to check for allegro, and because I didn't have it installed, building failed. Would be nicer if configure failed for that.
Secondly, when the game can't find the font, it crashes with a segmentation fault. It's not fatal, but it'd be nicer if it didn't cause segmentation fault when some file is missing.
Third, when installing anywhere else but the default location, the data files (font) can't be found. For example, I tried: ./configure --prefix=/tmp && make && make install && /tmp/bin/naughts_and_crosses
I usually use /tmp for temporary stuff.. After that, I gave up testing it and started to look at the source.
main.cc: the very first comment: "A simple console-based tic-tac-toe game to test my extremely poor C++ abilities", this is not a console based, and I think you shouldn't in any case say "my extremely poor", nobody is perfect or writes perfect code.
Looking at other source files, it's nicely organized and quite good looking, but I think you would benefit of using more spaces, everywhere. It's too thick now for my eyes.
I also like the comments, not too many and not repeating what the code says. Maybe few more functions could use short comments like the others, but not necessarily. I am fond of the way of "source code should be self-explanatory, comments should be high-level".
I can't see any C++ features being used, unless you count the few cout statements.. Maybe this would be better off using C, you'd get a bit faster compiling time..
Some files are missing the license information.
compile_settings.h would be better of being as compiler switches defined by configure script.
Your web-page's text is almost unreadable on my 17" TFT, it's too small for the contrast between background and text, I need to focus a lot to read it.
Other than that, good work, keep it up, and never get put down for comments that seem negative, IMHO negative comments are better than positive comments when learning, and I am personally always learning and doing stuff for my own pleasure.. :)
Oh, one more thing, you say something like "because of negative comments I will not continue to work with this", that's of course your decision, but did you really expect that you'd be cheered ? :) And if you did, I think you should think about it for a while.. What if everybody posted their first game here?
Anyways, I hope some of my comments are at least semi-useful for you or others. I'm glad that you had the guts to come here, and I see you have made other games as well, why not post them too, just don't take it personally if some people have different tastes and ideas of what constitutes of good game :)
Thanks for the useful comments. I wasn't actually the one that submitted this update and I was hoping that this game would quietly disappear into obscurity...no such luck as it seems :-p
As far as the makefile is concerned, it was generated automatically by Anjuta which is why it doesn't check for Allegro. I have very little experience with makefile scripts which is why (at least for the time being) I let Anjuta do all the hard work.
Up until version 0.7 the game was console-based until I started using the project to learn to play around with the Allegro library. I just forgot to change that in the code. I'll remember that with the spacing however, and I am trying to get my head around using classes at the moment. Help always welcome! :-p
As for the website, please let me know which browser and resolution you're using so I can see what's going wrong - a screenshot would also come in handy, which you can send to darryl (at) jamyskis.net. It's the first I've heard of this, but any reports on the website causing problems are more than welcome.
I'm always grateful for constructive negative comments (which have been flowing in more frequently of late), perhaps even more so than positive comments (although they're welcome too, hehe). What put me off working on the game originally was not the constructive criticism, but the sarky comments from a number of arrogant sods on here who saw fit to attack it just because it wasn't up to their standards of a professional-quality game. There were no suggestions for improvement, no comments on the code - just "what's this crap doing on the Tome".
Ultimately though I've decided to cease work on the game because I really felt it was going nowhere. It's playable, if extremely flawed, as is now, but I'd rather spend my time on something a bit more ambitious. I may come back to this from time to time out of nostalgia, but I think I'd rather concentrate on something that people genuinely do want to play.
Thanks again, anyway. The comments were good to read ;-)