Jump to content
IGNORED

Tic Tac Toe for INTV


vprette

Recommended Posts

this is a working rom, with computer level set as medium hig

comments are welcome, as well as help and suggestions about the next step I want to implement: adding some audio effect when choosing the key number, and jingle/music in the background that you can swith on/off (do we have somejingle ready to be used?)

 

tac09

tac09.rom

Edited by vprette
  • Like 1
Link to comment
Share on other sites

I'd ask what kinds of "difficulty" you can have with Tic-Tac-Toe, given that it's a trivially-solved game, but... I'm ashamed to admit that I actually was beaten by a chicken once. Wasn't paying attention and started in a the "always lose" space.

well you can base the difficulty on 3 concepts: computer tries to make 3 in row to win (easy), computer check if you can make 3 in a row and try to stop you (medium) and computer knows what positions are better than others (in this case it's very difficult to beat, you likely draw)

 

I will code that in Tris

Link to comment
Share on other sites

Hi, Valter,

I just played your latest version now and I have a few comments (don't I always? :) ):

  • It is not clear how to select to be "X" vs. "O." I found by accident that pressing "Clear" on the keypad selected "X."
  • The computer always chooses the same moves in response to yours, without regard to the rest of the board. This makes it too easy. Perhaps you want to use a decision tree based on the current state of the game rather than on the last player's move.
  • Sometimes the game ends in a draw, and sometimes I win, but the game always jumps back immediately to the starting screen at the end. A "game over" screen showing the outcome and the score showed only once after a draw, but I never saw it again.
  • I found a way to beat the game every time: start at 1, then 5, and win with 8. The computer plays like an idiot:
X|.|.   X|.|.   X|.|.
-+-+-   -+-+-   -+-+-
.|0|.   X|0|.   X|0|.
-+-+-   -+-+-   -+-+-
.|.|.   .|.|0   X|.|0
  • Adding an element of randomness may give it a more organic feel to the game.
  • You may want to delay the computer's responses to make it "feel" like it's thinking.
Edited by DZ-Jay
Link to comment
Share on other sites

 

Hi, Valter,

 

I just played your latest version now and I have a few comments (don't I always? :) ):

  • It is not clear how to select to be "X" vs. "O." I found by accident that pressing "Clear" on the keypad selected "X."
  • The computer always chooses the same moves in response to yours, without regard to the rest of the board. This makes it too easy. Perhaps you want to use a decision tree based on the current state of the game rather than on the last player's move.
  • Sometimes the game ends in a draw, and sometimes I win, but the game always jumps back immediately to the starting screen at the end. A "game over" screen showing the outcome and the score showed only once after a draw, but I never saw it again.
  • I found a way to beat the game every time: start at 1, then 5, and win with 8. The computer plays like an idiot:
X|.|.   X|.|.   X|.|.
-+-+-   -+-+-   -+-+-
.|0|.   X|0|.   X|0|.
-+-+-   -+-+-   -+-+-
.|.|.   .|.|0   X|.|0
  • Adding an element of randomness may give it a more organic feel to the game.
  • You may want to delay the computer's responses to make it "feel" like it's thinking.

 

 

thanks for feedback

 

1- yes, Clear is X and 0 is O (I did not provide instructions because I have in my mind the overlay design)

2- I have to check better the code since this is not what I expected

3- this is a bug, thanks to find that

4- another bug, I probably deleted one control in that corner

5- not easy to make it random (at least according to my programming skills)

6- yes I did test this and will add something like that

Link to comment
Share on other sites

fixed bug 3,4

 

 

 

Nope. Bug #3 is still there. Bug #4 is fixed, though. :)

 

Whether I win, lose, or draw, it jumps straight to the start screen. Sometimes I see the "game over" status screen briefly, for about a single frame, before it switches.

 

-dZ.

Link to comment
Share on other sites

at least your version of tic-tac-toe also take up space in the rom, my version is around 14kb... When using intybasic things grow fast ;) but its fun to program, i am working on something else now :)

 

Im thinking about making Outlaw .. but dont know... almost finished Tris that I will show in separate thread

Link to comment
Share on other sites

 

 

Nope. Bug #3 is still there. Bug #4 is fixed, though. :)

 

Whether I win, lose, or draw, it jumps straight to the start screen. Sometimes I see the "game over" status screen briefly, for about a single frame, before it switches.

 

-dZ.

 

it is strange: this does not happen to me: game go back to restart when pressing the disk... seems to work properly

Link to comment
Share on other sites

 

it is strange: this does not happen to me: game go back to restart when pressing the disk... seems to work properly

 

Well, that's how it behaves on my end. Which emulator are you using?

 

I tested some more and I see that it is a problem with the way the controller I/O signal is tested: it's very unreliable. Sometimes I press a button and it registers it twice, sometimes it does not want to register it at all and I have to press it multiple times, and other times I have to press it for a longer period for it to be acknowledged.

 

If I "tap" the buttons very lightly, I can sometimes manage to see the end status screen.

 

-dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

 

Well, that's how it behaves on my end. Which emulator are you using?

 

I tested some more and I see that it is a problem with the way the controller I/O signal is tested: it's very unreliable. Sometimes I press a button and it registers it twice, sometimes it does not want to register it at all and I have to press it multiple times, and other times I have to press it for a longer period for it to be acknowledged.

 

If I "tap" the buttons very lightly, I can sometimes manage to see the end status screen.

 

-dZ.

 

do you use emulator on pc qith keyboard or you running on real intellivision?

I'm using a laptop

Link to comment
Share on other sites

do you use emulator on pc qith keyboard or you running on real intellivision?

I'm using a laptop

 

I'm using jzIntv on a Mac, with a keyboard. I must say that there is definitely something wrong with the way they program handles input and keeps state, for I do not see these problems in the other IntyBASIC games, and most definitely not in my P-Machinery v2.0 tests of the I/O driver.

 

It seems as if you are testing the variables without resetting them after. Typically, your game loop should have something like this:

 

gameloop:
  WAIT
  IF (cont1.key = 1) then GOSUB PRESSED_1
  IF (cont1.key = 2) then GOSUB PRESSED_2
  ...
 
  GOTO gameloop

If you are storing the controller value in a variable, you must remember to reset it after using it on every iteration.

 

-dZ.

Link to comment
Share on other sites

 

I'm using jzIntv on a Mac, with a keyboard. I must say that there is definitely something wrong with the way they program handles input and keeps state, for I do not see these problems in the other IntyBASIC games, and most definitely not in my P-Machinery v2.0 tests of the I/O driver.

 

It seems as if you are testing the variables without resetting them after. Typically, your game loop should have something like this:

 

gameloop:
  WAIT
  IF (cont1.key = 1) then GOSUB PRESSED_1
  IF (cont1.key = 2) then GOSUB PRESSED_2
  ...
 
  GOTO gameloop

If you are storing the controller value in a variable, you must remember to reset it after using it on every iteration.

 

-dZ.

 

I reset to 0 into the procedure at every call with this version, please check

tictac_v2.rom

  • Like 1
Link to comment
Share on other sites

 

I reset to 0 into the procedure at every call with this version, please check

 

Nope. Still glitchy, sorry. :(

 

Moreover, if the first key I press is the "Clear" button on the title screen, it jumps directly into the game, making me "X". This is consistent with the variables being re-used with older values.

 

-dZ.

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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...