Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Reversi
Index -> Programming, Turing -> Turing Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
pavol




PostPosted: Sun Mar 05, 2006 1:34 pm   Post subject: Reversi

this is probably one of the most complex things i've ever done in turing. thought i'd post it and get some feedback. Very Happy the font, if you don't have it, is included in the zip file. Enjoy.


Reversi.zip
 Description:
Reversi

Download
 Filename:  Reversi.zip
 Filesize:  343.97 KB
 Downloaded:  181 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
cool dude




PostPosted: Sun Mar 05, 2006 3:37 pm   Post subject: (No subject)

i'll give u a lot of credit for this one! Smile thats the same game from the junior contest and i had some difficulty with it. how long did it take u to do this? good job!!!
pavol




PostPosted: Sun Mar 05, 2006 3:48 pm   Post subject: (No subject)

Thanks. Very Happy that's what inspired me to make this game, the last question in the contest. during the contest i got it to work partially and then i went home and made it into a game. it took me about 3-4 days (i wastn't programming 24 hours a day though Sleeping )
Delos




PostPosted: Sun Mar 05, 2006 3:52 pm   Post subject: (No subject)

Very nice. I like it.

- Error trap your input. Ctrl+Z crashes it. This is not too serious, but hey, might as well be complete.
- Presentability could have been improved. Setting it so that initial instructions are displayed at the top left-hand corner is practical, but just not very pretty. Again, a minor point aside from the engine.
- When selecting Starting Board, you may want to consider incorporating the mouse in addition to keyboard-selection.

- Gameplay was smooth, no errors with mouse control.
- Graphics were good, nothing too fancy and all within Turing's intrinsic limitations.
- AI was not that difficult to beat though. I would suggest providing several levels of AI, for instance:
+ Random - chooses a random move out of a list of possible moves. Unpredictability is more difficult to play against than most think.
+ Recursive search - similar to what you have, I'm guessing. Looks at all possible moves, determines best (most conversions). 'Recursive' part comes in, in that it starts considering moves further down the line (nesting itself a set number of times), and finally returning the most expediant move.
Read zylum's tut on Recursion if you're not familiar with it.

Overall good stuff.
+bits
pavol




PostPosted: Sun Mar 05, 2006 4:06 pm   Post subject: (No subject)

thanks a lot for all the suggestions, i'll surely look into it all and post an update later on. Very Happy
pavol




PostPosted: Sun Mar 05, 2006 4:13 pm   Post subject: (No subject)

"Ctrl+Z crashes it"
i'm not sure how that happens or why it happens. does this mean ill have to do something like use getch() and get the user to type in 'c' for comp and 'h' for human? or is there another way to prevent this?
Delos




PostPosted: Sun Mar 05, 2006 5:58 pm   Post subject: (No subject)

Ctrl+Z is an error based on ASCII input. Turing interprets it as the EOF marker. You could use a getch() sequence to filter it out (not too difficult), but you may end up with iffy input anyway. This would be the easiest way.
I might suggest looking into an Input.KeyDown() based approach, but this would likely end up being quite a bit more than you really need for this programme.
batman




PostPosted: Sun Mar 05, 2006 6:22 pm   Post subject: Game

Awesome game! When I was writing the junior contest I had some difficulty writing this program. I managed to finish it though, but mine is nothing compared to yours. Nice Game! Very Happy
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Sun Mar 05, 2006 7:03 pm   Post subject: (No subject)

Great game, good AI, good playability.

-The AI was completely crushing me until I got a corner, after which it was an easy win for me. The second game was quite even. Either I suck or Delos is really good. Smile Overall score: 2-1 for me. The AI should handle corners better.
-Text could be improved a bit, but as it is isn't bad.
-Didn't get any errors while playing.

Delos, I'm pretty sure Ctrl+Z is supposed to crash the program, like an Alt+F4 for Turing (it wasn't error proofed). At least, that's how it was for the DOS Turing.

Definately one of the more worthy non-Catalyst submissions!
Booya




PostPosted: Sun Mar 05, 2006 7:10 pm   Post subject: Game

Awesome game its even better then the one on my computer!
pavol




PostPosted: Sun Mar 05, 2006 7:59 pm   Post subject: (No subject)

thanks to everyone for the replies. Very Happy as for the crashing part i fixed it in the beginning where you choose to play human or computer just by simply using getch() but as for where you enter your name Delos, i think im gonna have to try your suggestion of Input.KeyDown. for now i just hope nobody wants their name to be ^Z, and for some reason Ctrl+D does the same thing and when i look at the input it says that i pressed ^Z Confused
jamonathin




PostPosted: Mon Mar 06, 2006 10:46 am   Post subject: (No subject)

Good game. One thing you may want to change is the scale of your program. Seems a little big for a 800x600 monitor.

One problem/error aside from the others.

- If there's one space left and its the user's turn (black) and the user cant place his "circle" there, nothing happens. It just kinda sits there and waits for you to do something, whereas you cant.

Other than that, good work. Smile
Delos




PostPosted: Mon Mar 06, 2006 4:49 pm   Post subject: (No subject)

800x600?! What age are you living in! Laughing.
Though he has a point. As a challenge:
- determine the absolute dimensions of the monitor. Yes, Turing can do this, it's a hidden piece of code somewhere in F10.
- create an algorithm to resize your screen to fit any monitor.
- if the monitor is *really* small or *really* big, resize your pieces as well.

This will give you a taste of what its like to programme in dynamic environemtns, where you control absolutely everything and have next to no constant, hard-coded values. This can be quite useful in many cases, and is often a good habit to attain.
pavol




PostPosted: Mon Mar 06, 2006 5:22 pm   Post subject: (No subject)

to address the problem you encountered jamonathin, all i can say is "that's weird", because i do have the game check if the user or computer has no more moves left. if you could describe as close as possible where you wanted to place the piece or what pieces were around it that would help a great deal. Very Happy
and i'll look into the screen resolution thing.
thanks guys
im almost done the beginning where you select all the options, i think it's almost error proofed and looks a bit better
MysticVegeta




PostPosted: Mon Mar 06, 2006 6:55 pm   Post subject: (No subject)

Good game, nice graphics. No bugs here visible right now to me.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 18 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: