View Full Version : Tic-Tac-Toe!
Dameria
12-07-2009, 03:53 PM
I got the idea from another user about 2 days ago to make a tic-tac-toe game, and I have just now finished it fully! I am very proud of this game I created because as far as I know there are no flaws. This includes no multiple wins, no playing after someone won, and so on. It even surprisingly works on both Alice 2.2 and Alice 2.0!
So here it is. I even have a few ideas for a Tic-Tac-Toe 2.0 (hey that rhymes!), in which more things will be added.
Please tell me what you think about the game, tell me if there is anything I missed, or maybe some ideas for 2.0, thanks!
Download Tic-Tac-Toe 2.0 below for the latest and best version.
I have taken the first version of Tic-Tac-Toe off because it has been getting more views than version 2.0 just because it is the first in the list. I do not want this to happen, so I have moved the version 1 download to the post where I originally introduced version 2.0, just in case you do want to download it.
x2495iiii
12-07-2009, 06:41 PM
Well Done! The only thing I could think of to add would be a cat's game notification. Good stuff!
Dameria
12-07-2009, 06:51 PM
Thanks! But whats a cat's game notification?
I was thinking of adding these things into Tic-Tac-Toe 2.0:
An option at the end to play the game again, where it would reset everything back to default places and you could play again.
A scoring board telling which player has how many wins.
A box showing who's turn it is.
A method that would run at the start of every new game randomly picking the first player to start (and the players would know who is first from the "Player's Turn" box).
The colors of the X's or O's that the person won by will flash from red to black.
Do you think this is good so far? Should I make more things to add in, or should I just take out one of my ideas that I am planning to put in?
x2495iiii
12-07-2009, 07:31 PM
A cat's game is a tie, where nobody wins.
And those ideas sound great, go ahead and add them all.
Dameria
12-09-2009, 11:39 AM
Over the next week or so I am going to be working on Tic-Tac-Toe 2.0. I will be posting my progress here and I will edit this post whenever I finish a certain part of the game. Here is the progress on the game:
A cat's game (tie) message. DONE
An option at the end to play the game again, where it would reset everything back to default places and you could play again. DONE
A scoring board telling which player has how many wins. DONE
A box showing who's turn it is. DONE
A method that would run at the start of every new game randomly picking the first player to start (and the players would know who is first from the "Player's Turn" box). DONE
The colors of the X's or O's that the person won by will flash from red to black. DONE
An option to enter the names of the people playing the game that would appear on the scoreboard. DONE
When I am done with everything, I will post Tic-Tac-Toe 2.0. Until then feel free to download version 1 and try it. If you have any more ideas for version 2.0 or comments please reply to this thread. Thanks
Dameria
12-09-2009, 04:43 PM
After working for about 5 hours today on this, I have finally created Tic-Tac-Toe 2.0!!! It has all of the add-ins listed in the above post, and I really hope that you enjoy it.
PLEASE tell me what you think by leaving a comment, I have worked very hard on this game, and although it was challenging at some times, I eventually got it all to work.
The only real thing that I want to change but cannot, is the number of wins text. When you get a win, instead of displaying "1", it displays "1.0", and so on. I cannot find how to turn this variable into an integer instead of a double. Other than that, everything else should work great. Tell me what you think!
I will also provide the version 1 here for whoever wants to see it, but if you are just looking to play the game version 2 is much better.
x2495iiii
12-09-2009, 06:32 PM
At the moment, it's impossible, unless you use a nested if/else if statement for each number and set the text directly to each number instead of the variable as a string (not worth it, in my opinion).
Nice job on the game! The work you put into it shows, good stuff!
Dameria
12-09-2009, 07:03 PM
Thanks, I tried to make it as fun as possible, and I learned a lot while making some of my methods, and also used what I have learned to perfect them and make them run to the best of their ability.
rockstar442
12-09-2009, 07:07 PM
hey i enjoyed it
dubastot
12-09-2009, 07:10 PM
Another incredible world by Dameria. Suddenly I feel like I haven't made anything good for quite a while (probably because of school).
rockstar442
12-09-2009, 07:15 PM
Dameria,x2495iiii they are inspiration to me there my idols in programming
Dameria
12-09-2009, 08:56 PM
lol, thanks rockstar442, but I don't think I am going to every make a game as good as Resident Penguin. I am thinking of making a shooting game next though.
zarfang8
12-15-2009, 08:11 PM
When you get a win, instead of displaying "1", it displays "1.0", and so on.
[/i]
Yeah, That happened in my Yahtzee game to, the dice would always show 1.0 instead of 1.
cooki3monst3r77
06-02-2010, 07:35 PM
This dude stole this file from a classmate of mine and didnt even bother to change the fricken COLORS! Your a Lame O.
Dameria
06-02-2010, 07:41 PM
Haha, woooow. Check the date of publication, I published this game waaaay before your classmate used it in class. I don't think I am the one you should be calling a thief.
I remember making this game step by step, and I believe I even made a version 1 before I made 2.0. Don't worry, I am not mad that your classmate stole my program and used it for his final or whatever he did, but you should just inform him that now you know that he did not actually do the program and that he stole it from me.
I published the game on 12-07-2009, even check page one of this thread and look at the date.
dubastot
06-02-2010, 08:43 PM
I find this situation quite funny. I guess some people stand up for their friends and get others in trouble.
Dameria
06-02-2010, 08:48 PM
I find this situation quite funny. I guess some people stand up for their friends and get others in trouble.
Lol it is pretty funny. Im actually more proud that my game is good enough for people to steal for their programming class than I am mad that someone would steal my work that I spent hours on.
x2495iiii
06-03-2010, 04:03 AM
Ha, nice. I wonder what program HE used for his final (it obviously wasn't a working calendar).
Honestly, sometimes I wonder if my old worlds are being stolen and used for other peoples' credit. I do believe I'll put a scripted command (can't be deleted by lazy students using everyday Alice) that flashes my name at the end of my worlds or something along those lines. Imitation is the greatest form of flattery, but thievery is nothing short of degrading and insulting, especially to the thief.
(Plus, the thought of outsmarting plagiarists is very appealing to me).
cooki3monst3r77
06-03-2010, 01:30 PM
I apologize. There was a misunderstanding between the friend and I. Apparently he got it from a teacher who couldnt explain how things worked on it and my friend was trying to turn it in as a project in my school, saying that he was the one that created it. Now I feel like a real douche. I am truly sorry. We are trying to recreate this tic tac toe in school and I am f#@#$# STUMPED. Even looking at your code. GOOD JOB.
Dameria
06-03-2010, 04:06 PM
I apologize. There was a misunderstanding between the friend and I. Apparently he got it from a teacher who couldnt explain how things worked on it and my friend was trying to turn it in as a project in my school, saying that he was the one that created it. Now I feel like a real douche. I am truly sorry. We are trying to recreate this tic tac toe in school and I am f#@#$# STUMPED. Even looking at your code. GOOD JOB.
Its alright. I agree that my tic-tac-toe is hard to understand because I made almost all of the methods on separate objects, making you locate all of the methods by clicking on different objects. It is very efficient however because it does not use infinite loops, it only runs methods once you click on a square. I think that this is one of my best games so far, and other than the awkward method placements, it is my most well-programmed game.
So your teacher is assigning you to figure out how my tic-tac-toe works? Or is he making your class create a tic-tac-toe, and he has mine as an example that he cannot understand? It seems like a lot of teachers have been assigning their students to look at my work lately. First the collision detection and timer on my maze game, and now my tic-tac-toe game, I am flattered :)
x2495iiii
06-04-2010, 01:26 AM
I apologize. There was a misunderstanding between the friend and I. Apparently he got it from a teacher who couldnt explain how things worked on it and my friend was trying to turn it in as a project in my school, saying that he was the one that created it. Now I feel like a real douche. I am truly sorry. We are trying to recreate this tic tac toe in school and I am f#@#$# STUMPED. Even looking at your code. GOOD JOB.
Very honorable of you.
chinchli57
12-04-2010, 08:46 PM
Dameria I loved your dice game! Very nice and neat.
I am having to do a dice game and am trying to figure out how to include lists or arrays. When putting in all of the squares and numbers I ran out of room and can no longer see the details window! Not sure how to get that back, but what I wanted to know is this, on your dice game you put everything in it's own folder, how did you do that? Also, do you have to add the folder name when you are calling out a square for instance. This probably all sounds silly to you but I am new to Alice this semester. Thanks.
Dameria
12-04-2010, 09:03 PM
Dameria I loved your dice game! Very nice and neat.
I am having to do a dice game and am trying to figure out how to include lists or arrays. When putting in all of the squares and numbers I ran out of room and can no longer see the details window! Not sure how to get that back, but what I wanted to know is this, on your dice game you put everything in it's own folder, how did you do that? Also, do you have to add the folder name when you are calling out a square for instance. This probably all sounds silly to you but I am new to Alice this semester. Thanks.
To add a folder you right click in the object list and press on the "Add Folder" option. You can then drag any options you want into that folder to organize the object panel like I did. By the way I do not have a dice game, I have a tic-tac-toe game. Lists and arrays are not that hard, and they do allow you to do everything you want with a lot less coding, but they can get tricky, so unless you have more than 10 objects that you all want to do the same type of thing, then I suggest you don't use lists. If there are more than 10, than you can, and you use the "For All in Order" a "For All Together" blocks on the bottom to call lists. You then use methods with parameters from there to do the action that you want to with that list.
Shibble
10-18-2011, 11:13 AM
Not sure if you will read this because this thread is pretty old, but how did you manage to get the world.playerturn variable to the setSquare method. I have a assingment for school which looks a bit like this, but i can't seen to make a "universal" variable that changes througout the game.
Dameria
10-18-2011, 01:24 PM
Not sure if you will read this because this thread is pretty old, but how did you manage to get the world.playerturn variable to the setSquare method. I have a assingment for school which looks a bit like this, but i can't seen to make a "universal" variable that changes througout the game.
To make a universal variable you have to create the variable underneath the "World" tab in the object list, the one where every other object branches off of. If you create the variable here, it can be used in any method or object in the program. If you create the variable in any other object, then that variable will only work within that object's methods.
Shibble
10-18-2011, 03:27 PM
To make a universal variable you have to create the variable underneath the "World" tab in the object list, the one where every other object branches off of. If you create the variable here, it can be used in any method or object in the program. If you create the variable in any other object, then that variable will only work within that object's methods.
With "underneath" the world tab, do you mean, select World and then click variable. Or really create one underneath is so that it's stands on it's own.
(Sorry to bother you, but i'm new to this)
Edit : Looking at you're code, you have a world.playerTurn in your setsqaure method, but i just can't seem to get that to work. Alice won't let me drag the variable into a if/else stament.
http://imageshack.us/photo/my-images/843/problemqs.png/
http://img843.imageshack.us/img843/7530/problemqs.png (http://imageshack.us/photo/my-images/843/problemqs.png/)
Uploaded with ImageShack.us (http://imageshack.us)
Dameria
10-18-2011, 05:06 PM
With "underneath" the world tab, do you mean, select World and then click variable. Or really create one underneath is so that it's stands on it's own.
(Sorry to bother you, but i'm new to this)
Edit : Looking at you're code, you have a world.playerTurn in your setsqaure method, but i just can't seem to get that to work. Alice won't let me drag the variable into a if/else statement.
You should always be able to drag a world variable into an if/else statement. Just make sure you create the variable in the "world" tab and not in any other object. You click on "world" then you go to "variables" then you create a new variable, and that is a world variable. You can then drag and drop that variable into any if/else statement and compare whatever you want with it.
Shibble
10-19-2011, 04:29 AM
Well i guess Alice is srewing me over then :P
I've been trying that the whole time, but it just won't let me. I'll keep trying ..
Dameria
10-19-2011, 08:23 AM
Well i guess Alice is srewing me over then :P
I've been trying that the whole time, but it just won't let me. I'll keep trying ..
If you want you could upload your file as a post here and I'll look it over when I get home and try to fix it. Just tell me what method and comment on the if/else statement that you are trying to get the variable into.
Also there are some glitches with using the copy/paste feature in Alice, make sure that the if/else statement is newly dragged into the code and not just a copy from somewhere else, that might do it.
Shibble
10-19-2011, 02:05 PM
If you want you could upload your file as a post here and I'll look it over when I get home and try to fix it. Just tell me what method and comment on the if/else statement that you are trying to get the variable into.
Also there are some glitches with using the copy/paste feature in Alice, make sure that the if/else statement is newly dragged into the code and not just a copy from somewhere else, that might do it.
Thanks for the offer, but i just managed to get it working :)
I used a fuction that keeps track of the variable. And i was able to combine that function with a variable within the method. Maybe a bit of a detour, but it works :)
Thanks again!
GameKid
11-04-2011, 03:05 PM
Very nice! I played a few games with my sister.
Maybe someday you could add an AI to play against.
Until then: Four stars.