Naughts and Crosses Screenshot 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:
yesyesyesyesnonoyes
Suggest an update

Comments

If you can't get the download link to work, either try again or let me know. I've tried to be patient with my (free) web provider but the downtime in the last two weeks has been so high that it has now become unbearable. I'll be switching providers soon.
Re: Download problems posted by jamyskis on Oct 11 2005 11:50 AM
OK, sorted. I've set up a mirror with my own PC as a web server which can be accessed at http://www.jamyskis.bizz.cc.
The only winning move is not to play at all.

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).

Re: A Strange game. posted by anonymous on Oct 11 2005 5:52 PM
I don't know who would ever say we don't have good games for Linux! Just look at this! It's not just something that looks like an ACM problem, it's for Linux!
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)
Re: How did this get on the Tome? posted by jamyskis on Oct 11 2005 11:22 PM
This was actually a learning project, although I'm adding the one-player mode and a few other options (including bigger board sizes to add a bit of tactical scope, if even just a bit) just to make it a bit more enjoyable. I'd thought about using Allegro to create a bit of graphical pizazz, but after considering this, I thought that ncurses would be a better choice for a game like this. There's no need for posh graphics and a number of X Server based Tic-Tac-Toe games are already available on the Tome. This really is only a game to while away a spare five minutes, and I doubt it will ever expand beyond that. I'll go into the realm of flashier graphics and more complex concepts with my next project.
Wow must be slow in linuxgaming land if we have news posts of games like 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.
I'm sorry, I don't mean to sound harsh here, but that really is the type of thing you keep in the folder with your hello world program. . .
Re: Keep it to yourself. . . posted by anonymous on Oct 12 2005 7:20 AM
Not harsh, just the truth. I have a game I've created, but I know its no where near ready to be released on here. And I have simple ones as such that I know just aren't linux game tome material.
Re: Keep it to yourself. . . posted by jamyskis on Oct 12 2005 9:18 AM
I don't think it's harsh either, and I wrote the thing. I wanted to gauge opinion on the program, and the opinion is pretty clear. If you have a problem with it being on here, you should take it up with the Tome staff though.
.
It's the first ncurses based tic-tac-toe I've seen. I'll give it a download tomorrow and try it, and then I'll rate 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.
Re: Let he who is without sin... posted by jamyskis on Oct 12 2005 11:21 PM
Oooo, a positive comment. Thank you :-)

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 )

that game rocks!!! I loved it, i could play this game for hours and hours. it's tottaly uncredible, the gameplay is absolutly fabulous, the controls are very responsive. SO... it's like a good play with ADOM... thank you for this piece of code :)
Re: I love this game posted by jamyskis on Oct 12 2005 11:48 PM
lol
Re: I love this game posted by anonymous on Oct 21 2005 1:51 PM
k
Re: I love this game posted by anonymous on Oct 21 2005 1:53 PM
k
Re: I love this game posted by anonymous on Oct 21 2005 1:53 PM
k
Re: I love this game posted by anonymous on Oct 21 2005 1:53 PM
k
Re: I love this game posted by anonymous on Oct 21 2005 1:53 PM
k
How can a majority of people sit here and poke fun at a project? Sure, it is simple, but it is a project none the less. The creator said he/she plans on adding new features, and they never ruled out a graphical interface.

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.

Re: What? posted by jamyskis on Oct 13 2005 5:43 AM
I really don't mind. Some criticisms have been constructive and good (for example, the suggestion to use SDL) and I can understand that some people might have an objection to this appearing on the Tome, although I don't agree that only the best projects should be taken on. Like someone said here, it's about variety.

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.
Re: What? posted by Angelox on Oct 13 2005 12:22 PM
The games is nice, plays in Linux - and it works! I support my Linux game programmers , and even if i didn't like what they made, I tell them what I think is wrong , but always give them some stars even if it's just because it's a Linux effort.
Re: What? posted by anonymous on Oct 13 2005 2:58 PM
Oh, so this is Paul Panks and gang again? You already spammed the tome with HLA-A******** updates every second day to keep it on the frontpage, didnt you? Are you up to the same with this game?

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.
Re: What? posted by jamyskis on Oct 13 2005 3:02 PM
Eh?
Re: What? posted by emceelam on Oct 13 2005 3:01 PM
To be fair, the rating is honest. If you submit a game that is astoundingly below the standard of the average game tome game, you will attract one star ratings. Ultimately, you have to create something that feeds the need of your audience. We are your audience and we crave games. If you are not there to feed the game cravings of your audience, then you may want to publish somewhere else. Perhaps you should publish in some other place that is meant to guide new programmers. Then when your abilities have matured, we will welcome your entries to game tome and give you more stars.
Re: What? posted by anonymous on Oct 13 2005 6:08 AM
Probably because entries like this on the frontpage of happypenguin are fodder for the "there are no real games on linux"-Trolls. Anyway - no need to write essays about 188 lines of source code....
Well...I was just in the middle of submitting an update to the Tome until I saw the comment about "Paul Panks" (WTF?). I think this is pretty much the last straw. I won't bother submitting to the Tome again - I'm fed up with the bigotry and snobbery that I'm seeing not just here, but on posts to other games. It's no wonder that people are reluctant to develop for Linux commercially. Given that I'm not likely to see much coverage of the Linux ports of my games current or future without submitting them to the Tome, 0.32 will be the final version for Linux - I'm going to continue developing the Windows version for the time being until I start on my next project which is based on the Allegro library, and that too will be Windows only.
Re: Had enough posted by emceelam on Oct 13 2005 4:58 PM
Paul Panks has a reputation on game tome and unfortunately, it's not a very good one. You can read about Paul Panks on the HLA game. If I were you, I would not take the criticisms so lightly. Linux gamers have a higher tolerance for quality problems in games. Linux has historically been bereft of all the great games, most of which run on Windows and no other. If you go to Windows, your problems do not end, but will probably increase. Windows attracts the lion's share of top game programmers, and they set a quality level that is a lot higher than the average Linux game. If your game can't make it in the Linux world, there is little reason to believe it will make it in the Windows world.
Re: Had enough posted by jamyskis on Oct 13 2005 9:23 PM
Let me get one thing straight. This is what I consider to be a good comment:

"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?
Re: Had enough posted by jamyskis on Oct 13 2005 9:27 PM
The second comment, by the way, was meant to be:

"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)"

Re: Had enough posted by anonymous on Oct 14 2005 3:02 AM
Its ok to submit a game, that is text-only to the tome. Even if it is simple. But you need to provide a vision - an idea of what you are up to, something original. And sorry, tic tac toe in C++ is not very new or original all by itself:
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.
Re: Had enough posted by jamyskis on Oct 14 2005 3:48 AM
That's fine...I can understand what you're getting at and I agree with you completely. I think I may have been a little vague when I said that "more features are planned". In fact, since I submitted this I'm already at version 0.33 (0.2 was not officially released, 0.3 added a few new features, 0.32 added colour and 0.33 fixed a rather embarrassing bug *lol*) but I'm going to wait until version 0.4 has a decent one-player mode before I resubmit and take another look at what direction the game should go or if I should just leave it at that and work on something more ambitious. What I wouldn't want to do is attempt some large project to impress people and end up turning out something with a load of bugs simply because I don't have the experience.

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.
Re: Had enough posted by anonymous on Oct 14 2005 12:01 PM
I believe the "Paul Panks" comment was directed at Angelox, not at you. Angelox has been posting all over the HLA page, saying "Hey everybody, why don't we try being nice to Paul Panks?" ... Which isn't going over so well. He then came over to this page and said the same thing about this project. I can understand Angelox's view, but Paul Panks won't be slowed by that; he just wants attention and whether it's positive or negative doesn't seem to phase him.
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?
Re: Had enough posted by jamyskis on Oct 17 2005 5:57 AM
Oops, my bad.

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 :-)
Thank you for sending your game to happypenguin. It's certainly not the best or most original game here, but the comments you've got are way too harsh. I'm glad you are doing GPL games, I hope you keep your products GPL in the future too when your skills and the quality of games improve. Like someone said already, this game can be an useful example for someone who's also a beginner coder. A beginner posting his game certainly doesn't hurt anyone, maybe we could have a section for simple games and tutorials/guides about their code here in Happypenguin, that might inspire people to start programming as well. A lot of the games here are not finished, a lot of the games here are amateurish, but there's nothing wrong with that. Instead of putting down the new talents we should encourage them to keep programming and learn some more. There's nothing wrong with fair critisism, but the author knew as well that his game is really simple, some ideas and suggestions would have made much better result than all the crap posted. I hope you'll have fun programming, don't mind the nasty comments.
Re: Naughts and Crosses posted by jamyskis on Oct 14 2005 3:52 AM
Thanks for your kind words. After reading what some people have written, together with a couple of e-mails I've received, I've decided that I'll keep submitting, although not at regular intervals. I might submit the working work-in-progress which has everything except one-player and network play later today, another version when those features are in, and then a final version with an ncurses interface before I put a lid on this and work on something else.

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
Re: Naughts and Crosses posted by jamyskis on Oct 14 2005 3:54 AM
By the way, my projects will always be GPL, you don't need to worry about that :-p
in its present form the game seems pretty useless. well, maybe with new versions to come, this may change. eventually. nevertheless, this submission inspired a pretty emotional discussion. quite amusing.
Re: Naughts and Crosses posted by anonymous on Oct 15 2005 12:28 PM
My hats off to him for having the "balls" to post something like this, and actually expecting all positive feedback. Of course we all knew that wasn't going to happen, but his heart was in the right place.
Re: Naughts and Crosses posted by jamyskis on Oct 17 2005 5:50 AM
I didn't actually expect any positive feedback, what I did expect was constructive feedback, which has been a bit more regular since the initial batch of "what is this doing on the Tome" comments. As it turns out, I'm grateful for the few positive comments that I've received.
I really feel ashamed the way people treat a starting developer in this discussion. Were all your first games fully polished original ones? If you are all so good at game programming give this guy a hand and help him in improving his skills.

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.
Re: lost for words posted by whybill on Oct 20 2005 5:37 AM
i agree... shame on you bad people, keep up the good work..
Re: lost for words posted by emceelam on Oct 20 2005 10:16 AM
There is no shame. One star is a very fair evaluation. Normally, games of this level of development are supposed to be shown to one's classmates and CS teacher. This is the type of program that a beginning programmer would write. Many game tome readers reject this tic-tac-toe game because they come here to play games. If the gamer sees the game as boring, then the gamer will say it is boring. This signals the author to try something else until he can satisfy the needs of the gamer. Personally, if I was the author, I would try a different genre. Tic-Tac-Toe is just not going to create the fun factor no matter how many variants are inserted. If one was trying to create a text-based game, I would recommend a text adventure or a rogue-like. Either of these genres still offers possibilities that have not been fully explored.
Re: lost for words posted by jamyskis on Oct 20 2005 11:42 AM
Thanks for the comments, guys. I agree that there's nothing wrong with one star. I can aim for better ratings when my skills in programming are accordingly better. I'm not short of ideas, but expressing them in C++ is another thing altogether. I didn't actually expect this game to generate as much controversy as it has - I expected it to be looked at, commented on a couple of times as crap, maybe receive a few comments on the code, and then forgotten. I've kept up with this project despite the criticism though because as a beginner developer I don't want to fall into the "OMG I AM MAEKING TEH BESTEST MMOPGR EVAR!" trap of starting a project with the best of intentions and abandoning it at the early stages. I want to get into the habit of finishing my projects, even if I cut a few features off to put an early lid on it like I will with this one. Although an experienced programmer might be able to knock up a game like this in a couple of hours, this project represents a month's hard research, learning, coding and trial-by-error for me, and it seems a shame to abandon the project - I might clean up the code and offer it as a tutorial to other people learning C++ as people have suggsted. I've had a couple of excellent ideas come in through e-mail (thanks Eric!) which I will implement, but after that I'm going to be slapping a 1.0 tag on the game, submitting it, call it a day with this and work on my next project with Allegro (which is a bit more sophisticated, you'll be glad to know) :-)
this isn't worth a dime. really, this doesn't interest anyone at all, no matter the effort? i made a better tic-tac-toe clone in my computer science classes for homework. it even had an ai player, the won whenever the human player made a mistake, and i NEVER EVEN cosidered showing off with it.
Re: wow! this sucks? posted by jamyskis on Oct 20 2005 11:45 AM
I'm not trying to be mean, but to answer this honestly, you didn't pay a dime for it, you got it for free. And to the title of "wow! this sucks?", a short extract from the game's FAQ:

* 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++.
OK you got it started. Now I reccomend you to try something different instead of polishing this one. Polishing is just hard work with little learning effect.
Re: Naughts and Crosses posted by jamyskis on Oct 20 2005 11:47 AM
I disagree. Polishing off, as well as project planning, and proper bug checking are as much important things to learn in programming as much as knowing the language itself. IMHO it's good practice to get into the habit of finishing projects - how many people here get fed up with seeing countless projects abandoned at the alpha stage?
Re: Naughts and Crosses posted by anonymous on Oct 20 2005 3:50 PM
But this isn't even a project we want to see in any other stages. Its playable now, it serves its purpose. Perhaps you should move onto a new concept(game) and practice your polishing techniques there.
Re: Naughts and Crosses posted by jamyskis on Oct 21 2005 1:35 AM
What's with the "we"? A sizeable majority indeed have decided that they don't want to play this, but the game is free-of-charge and GPL, so should they want to move on and ignore their game, they are entirely welcome to. Honestly, neither you, nor anyone else who hasn't offered anything constructive to the game, has any right to dictate what I or anyone else can write and release. As I've said before, anyone is welcome to query the placing of this game on the Tome, but take that up with the Tome's staff - don't try to block it by railroading me into stopping development of it or submitting it, especially when a number of visitors here are interested in seeing how this develops, and not just because they get a free game out of it.

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)
Re: Naughts and Crosses posted by scarlet on Oct 23 2005 4:41 AM
Code polishing and maintainance is a really good skill to learn, but I've read your code for this game and it really isn't worth building on. If you want to treat this as a learning experience you should probably start another program from scratch and think about one thing: how to make this game smaller. For example in the function check_entry_valid() you do input parsing using massive switch tables when you could simply subtract 'a' from the first character to get the x value and subtract '0' from the second. Your usage of global variables throughout your program is very harmful to the managability and extensibility of your program.
And that's not very much... I give it 1 star because it's playable, installation without problems, and continues support.

He's a better programmer than I am, so thumbs up and keep up the good work! ;)

If anyone else would like to comment with something along the lines of "what is this doing on the Tome?", please consider the following:

* 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.
Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 9:27 AM
The game in its current stage is of course simplistic, but I guess people always has the right to ignore it if they want. It's childlish to insult or flame. Tic-Tac-Toe might be a child game but variations of it could be quite complicated and fun. I can think of auite a few that can keep an adult entertained for years: 1) Connect 4. I assume everybody understand what it is? It's played on a vertical board. You select which column to put your pieces. The pieces will always fall to the bottom and the one make four continuous pieces wins. 2) A game play on a Go board. The players put theirs stones (black and white, obviously) in turns. The first one to make *5* horizontally, vertically or diagonally connected patterns wins. 3) A child game commonly played in my home country. It's on a 9x9 board, which is usually just a pencil drawn grid). The two players put the same kind of piece, a cross, and therefore you can actually use your opponent's to your advantage. You scored by make three (3 pts), six (6 pts) or nine (9 pts) connected pieces. The players who has the higher score when the board is filled wins. 4) 3-Dimension of Tic-Tac-Toe or variants. So, I guess in turns of game play, you can: 1) make the board size variable; 2) implement the gravity option; 3) configurable winning condition; instead of 3, you might need 4; 4) 3-D (or 4-D :) board. In turns of graphic presentation, you can obviously has a lot of fun with it. Network is a must especially when you get to the more complicated games. AI? Tic-Tac-Toe is simple, I wrote one AI for it using a programmable calculator. You can basically listed all the possibilites of gameplay. But with larger board size and changing rules, it'll be quite an achievement. Programming... I guess if you want to generalize the program. It can be a network playable board with two players putting their pieces in turn. It's like a Go-Server... Is there any similar opensource program like that arround? Well, just a few ideas written in a hurry. Have fun programming Ying-Wan Lam
Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 9:27 AM
Sorry, it's a better formatted one: The game in its current stage is of course simplistic, but I guess people always has the right to ignore it if they want. It's childlish to insult or flame. Tic-Tac-Toe might be a child game but variations of it could be quite complicated and fun. I can think of auite a few that can keep an adult entertained for years: 1) Connect 4. I assume everybody understand what it is? It's played on a vertical board. You select which column to put your pieces. The pieces will always fall to the bottom and the one make four continuous pieces wins. 2) A game play on a Go board. The players put theirs stones (black and white, obviously) in turns. The first one to make *5* horizontally, vertically or diagonally connected patterns wins. 3) A child game commonly played in my home country. It's on a 9x9 board, which is usually just a pencil drawn grid). The two players put the same kind of piece, a cross, and therefore you can actually use your opponent's to your advantage. You scored by make three (3 pts), six (6 pts) or nine (9 pts) connected pieces. The players who has the higher score when the board is filled wins. 4) 3-Dimension of Tic-Tac-Toe or variants. So, I guess in turns of game play, you can: 1) make the board size variable; 2) implement the gravity option; 3) configurable winning condition; instead of 3, you might need 4; 4) 3-D (or 4-D :) board. In turns of graphic presentation, you can obviously has a lot of fun with it. Network is a must especially when you get to the more complicated games. AI? Tic-Tac-Toe is simple, I wrote one AI for it using a programmable calculator. You can basically listed all the possibilites of gameplay. But with larger board size and changing rules, it'll be quite an achievement. Programming... I guess if you want to generalize the program. It can be a network playable board with two players putting their pieces in turn. It's like a Go-Server... Is there any similar opensource program like that arround? Well, just a few ideas written in a hurry. Have fun programming Ying-Wan Lam
Re: A quick pointer for flamers & trolls posted by scarlet on Oct 21 2005 1:11 PM
I can see you're new at this, here's a few pointers:
  • You should never have functions in a header file, like you do with naughts.h. Header files are for telling .cc files what functions exist, not for containing the functions. You should retitle "naughts.h" into "naughts.cc". After you have done that, you should create a new file called "naughts.h" and copy all the function declarations into that, with a semicolon after each one. You now need to add naughts.cc to the list of files you want compiled in, I cannot remember how to do that in Anjuncta because I've only used it once. Once you rebuild your project, it will become a lot easier on the compiler and easier to debug once you learn how to use a debugger. I cannot stress how important splittling functions between .cc files is.
  • You have string arrays titled "playercount_entry" and "boardsize_entry", they both have a length of 1. If a long string is put into them it will cause your program to crash on many computers. There must be one in the length for every letter read plus one as a stopper. You must set them to a very high value to make it unlikely that it will be overran, I set it to 1000 on my computer. Even this solution will not be perfect in the long term but it will help you now. Alternatively you can learn to use the string class, which is nice and easy, and length doesn't matter. I hope I've been helpful
  • Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 1:56 PM
    k
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 1:56 PM
    k
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 1:56 PM
    k
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 1:56 PM
    k
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 1:56 PM
    k
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 1:57 PM
    k
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 2:00 PM
    sorry sigurd sent me a virus and my computer is going crazy
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 21 2005 2:33 PM
    delete my posts please i got a virus :(
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 22 2005 12:54 PM
    Take two linux cd's and call me in the morning. - Dr. Distro
    Re: A quick pointer for flamers & trolls posted by scarlet on Oct 23 2005 4:26 AM
    What is someone vulnarable to virii doing at a linux gaming site?
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 23 2005 7:57 AM
    It's not funny to stick Javascript code into your comment to make alerts pop up like that.

    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 :-)
    Re: A quick pointer for flamers & trolls posted by anonymous on Oct 23 2005 11:11 PM
    Jamyskis, although indeed I didn't pay for this, I personally don't consider your contribution to the Linux game world to be very valuable, since I can probably make an equivalient game in an hour or so. The only benefit I can think of is the educational value working with you on this project has for newbie programmers. So make sure that source code of yours really is a shining example of good craftmanship :-)
    Re: A quick pointer for flamers & trolls posted by jamyskis on Oct 23 2005 11:15 PM
    Will do ;-)
    I keep hearing people talking about the educational value of jamyskis's code. Can we get some validation on this? Is there anybody out there who has learned something from reading his code? A software author deserves feedback.
    Re: Educational value posted by jamyskis on Oct 24 2005 11:26 PM
    Actually the educational value is yet to be established. I'm going to recomment the code to explain to beginners why what has been done has been done and implement the changes that scarlet suggested together with a couple of gameplay improvements. That'll be the end of it then. But feedback is always appreciated :-)
    Hey, I was thinking, could we get an updated screenshot for this game?

    The latest version looks like it has colored text! Exciting :D
    I'm happy to see that this project is still progressing.
    Re: Old screenshot posted by jamyskis on Nov 1 2006 10:32 AM
    Actually I'd submitted a new screenshot every time since I started using Allegro until I gave up submitting updates to the game due to the panning it got on here. In any case, I am still periodically working on the game, including graphics worthy of the Allegro library :-), spurred on a little by the positive response that this game has gotten from Windows users (oh, the irony, the irony :-p)

    Re: Old screenshot posted by nath on Nov 8 2006 3:09 AM
    Hmm, never seen the screenshots submitted by you, sorry. I got an updated screenshot standing by though, just waiting for the next update.
    Re: Old screenshot posted by nath on Nov 8 2006 3:13 AM
    Ok, I just changed the screenshot to the coloured version.
    It would be nice if you could submit an update (with a list of changes) for the 0.8 version.
    I think it's well done. Though i didn't get too interested to play it much. The alternative mode could keep me try it again, maybe even play it little longer a boring day... Some one would probably like to play it with mouse.
    Good comments about the code in other posts.
    Hi,

    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 :)
    Re: some fixes would be nice posted by jamyskis on Jan 23 2007 1:30 PM
    Hi there,

    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 ;-)
    Re: some fixes would be nice posted by jamyskis on Jan 23 2007 1:35 PM
    Ah, by the way: I'll submit Open Invaders when it's a bit more complete, but everybody's welcome to try it ;-)

    Log in or register to rate this game or post a comment.