| QUOTE (koldfuzion @ Apr 21 2004, 03:18 PM) |
| I want connect 4, yahtzee, checkers, chess, backgammon and blackjack too |
| QUOTE (chilin_dude @ Apr 21 2004, 11:22 AM) |
| xlink support too |
| QUOTE (BenJeremy @ Apr 21 2004, 04:44 PM) |
| That's something I'll have to add into MXM sometime.... |
| QUOTE (chilin_dude @ Apr 21 2004, 11:57 AM) |
| Heh, although that isn't what I was meaning, that would be the best. That is one of the only features of any other dash that I think is a major plus compared to MXM, especially as my PC is on a different floor to my xbox! Glad to hear you have plans to implement it into the best dashboard!! |
| QUOTE (BenJeremy @ Apr 21 2004, 09:15 AM) |
| Gotta link to the specs for XLink/Kai? If it's not too much trouble, I can impelement direct support for that. Adding System Link support to MXM's ActionScripting would also be slick. |
| QUOTE |
| Anyway, it looks good, except maybe the blank boxes should be black. And how does the cursor work? |
| QUOTE (koldfuzion @ Apr 21 2004, 03:18 PM) |
| I want connect 4, yahtzee, checkers, chess, backgammon and blackjack too |
| QUOTE (BenJeremy @ Apr 21 2004, 05:15 PM) |
| Gotta link to the specs for XLink/Kai? If it's not too much trouble, I can impelement direct support for that. Adding System Link support to MXM's ActionScripting would also be slick. |
| QUOTE |
| I want to do a LightsOut clone. And a Super Collapse one too. For the latter I think some sort of rountine will be needed to jump the pointer/cursor to the the nearest set of colors that can be removed. This way you wouldn't be wasting time moving it manually. Or have both manual and auto move via a Shifted button |
| QUOTE |
| arkanoid |
| CODE |
// ###################### // Script: Tic Tac Colors // Author: flattspott // Version 0.1 // Disclaimer: WIP only // ###################### OnError Goto ErrorHandler Set Wins 0 Set Loses 0 Set Draws 0 Set Turn 0 // LoadImage Back $ActualPath$\ttcback.png Goto Start :NewGame :Start Set PointerLeft 272 Set PointerTop 195 // LEFT POSITIONS Set Left0 194 Set Left1 250 Set Left2 306 Set Left3 194 Set Left4 250 Set Left5 306 Set Left6 194 Set Left7 250 Set Left8 306 // TOP POSITIONS For T1 = 0 To 2 Set Top%T1% 94 Next For T2 = 3 To 5 Set Top%T2% 150 Next For T3 = 6 To 8 Set Top%T3% 206 Next // WIDTH AND HEIGTH For WH = 0 To 8 Set Width%WH% 48 Set Height%WH% 48 Next // COLOR ALL SPOTS TO UNOCCUPIED COLOR For C = 0 To 8 Set Color%C% BLACK Next // TEXT FOR UNOCCUPIED SPOTS For TX = 0 To 8 Set Text%TX% "" Next // DETERMINE WHO GETS THE FIRST MOVE If# %Turn% == 1 Then Set Text4 "O" Set Color4 RED EndIf GoSub SwitchTurn Goto RefreshScreen :RefreshScreen BeginDraw Box 0 0 640 480 DARKBLUE DARKBLUE Box 190 90 167 167 DARKGRAY DARKGRAY Box %Left0% %Top0% %Width0% %Height0% %Color0% %Color0% Box %Left1% %Top1% %Width1% %Height1% %Color1% %Color1% Box %Left2% %Top2% %Width2% %Height2% %Color2% %Color2% Box %Left3% %Top3% %Width3% %Height3% %Color3% %Color3% Box %Left4% %Top4% %Width4% %Height4% %Color4% %Color4% Box %Left5% %Top5% %Width5% %Height5% %Color5% %Color5% Box %Left6% %Top6% %Width6% %Height6% %Color6% %Color6% Box %Left7% %Top7% %Width7% %Height7% %Color7% %Color7% Box %Left8% %Top8% %Width8% %Height8% %Color8% %Color8% Text 216 110 Center "%Text0%" Text 272 110 Center "%Text1%" Text 329 110 Center "%Text2%" Text 216 163 Center "%Text3%" Text 272 163 Center "%Text4%" Text 332 163 Center "%Text5%" Text 216 220 Center "%Text6%" Text 272 220 Center "%Text7%" Text 329 220 Center "%Text8%" Text 221 275 Left "Scoreboard" Text 221 300 Left "Wins: " Text 333 300 Right "%Wins%" Text 221 320 Left "Loses: " Text 333 320 Right "%Loses%" Text 221 340 Left "Draws: " Text 333 340 Right "%Draws%" Box 217 271 120 96 0x00FFFFFF 0xFFFFFFFF // Image Back 0 0 640 480 Box %PointerLeft% %PointerTop% 5 5 WHITE WHITE EndDraw If# %Retrieve% == 1 Then Return EndIf // INPUT HANDLER IQWaitMsg ANY IF %MSG_ID% == "UI_VIRTKB" Goto StealSpot IF %MSG_ID% == "SYS_MENU" Goto Help IF %MSG_ID% == "MUSIC_NEXT" Goto Options IF %MSG_ID% == "UI_UP" Goto MovePtrUp IF %MSG_ID% == "UI_DN" Goto MovePtrDown IF %MSG_ID% == "UI_RT" Goto MovePtrRight IF %MSG_ID% == "UI_LF" Goto MovePtrLeft IF %MSG_ID% == "UI_SELECT" Goto Click IF %MSG_ID% == "UI_BACK" Goto End Goto RefreshScreen :SwitchTurn If %Turn% == 1 Then Set Turn 0 Else Set Turn 1 EndIf Return :StealSpot GoSub GetCurrent If %Text{Current}% == "O" Then Set Text%Current% "X" Set Color%Current% BLUE EndIf Goto RefreshScreen :MovePtrUp If# %PointerTop% == 139 Goto RefreshScreen Sub PointerTop 56 Goto RefreshScreen :MovePtrDown If# %PointerTop% == 251 Goto RefreshScreen Add PointerTop 56 Goto RefreshScreen :MovePtrRight If# %PointerLeft% == 328 Goto RefreshScreen Add PointerLeft 56 Goto RefreshScreen :MovePtrLeft If# %PointerLeft% == 216 Goto RefreshScreen Sub PointerLeft 56 Goto RefreshScreen :Click GoSub GetCurrent If %Text{Current}% == "" Then Set Text%Current% "X" Set Color%Current% BLUE Set Retrieve 1 GoSub BlockMove GoSub RefreshScreen Set Retrieve 0 EndIf Set Retrieve 1 GoSub RefreshScreen GoSub WinCheckX Set Retrieve 0 GoSub WinCheckO GoSub CheckForDraw Goto RefreshScreen :CheckForDraw Set Temp 0 For DrawCheck = 0 To 8 If %Text{DrawCheck}% > "" Then Add Temp 1 EndIf Next If %Temp% >= 8 Then Goto DrawGame EndIf Return :GetCurrent // CHECK POINTER POSITION AND SET THE CURRENT BOX ACCORDINGLY If# %PointerLeft% == 216 Then If %PointerTop% == 139 Then Set Current 0 EndIf EndIf If# %PointerLeft% == 272 Then If# %PointerTop% == 139 Then Set Current 1 EndIf EndIf If# %PointerLeft% == 328 Then If# %PointerTop% == 139 Then Set Current 2 EndIf EndIf If# %PointerLeft% == 216 Then If# %PointerTop% == 195 Then Set Current 3 EndIf EndIf If# %PointerLeft% == 272 Then If# %PointerTop% == 195 Then Set Current 4 EndIf EndIf If# %PointerLeft% == 328 Then If# %PointerTop% == 195 Then Set Current 5 EndIf EndIf If# %PointerLeft% == 216 Then If# %PointerTop% == 251 Then Set Current 6 EndIf EndIf If# %PointerLeft% == 272 Then If# %PointerTop% == 251 Then Set Current 7 EndIf EndIf If# %PointerLeft% == 328 Then If# %PointerTop% == 251 Then Set Current 8 EndIf EndIf Return :BlockMove Set BlockMade 0 If %Text0% == "" Then If %Text1% == "X" Then If %Text2% == "X" Then Set Text0 "O" Set Color0 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text0% == "X" Then If %Text1% == "" Then If %Text2% == "X" Then Set Text1 "O" Set Color1 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text0% == "X" Then If %Text1% == "X" Then If %Text2% == "" Then Set Text2 "O" Set Color2 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text3% == "" Then If %Text4% == "X" Then If %Text5% == "X" Then Set Text3 "O" Set Color3 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text3% == "X" Then If %Text4% == "" Then If %Text5% == "X" Then Set Text4 "O" Set Color4 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text3% == "X" Then If %Text4% == "X" Then If %Text5% == "" Then Set Text5 "O" Set Color5 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text6% == "" Then If %Text7% == "X" Then If %Text8% == "X" Then Set Text6 "O" Set Color6 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text6% == "X" Then If %Text7% == "" Then If %Text8% == "X" Then Set Text7 "O" Set Color7 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text6% == "X" Then If %Text7% == "X" Then If %Text8% == "" Then Set Text8 "O" Set Color8 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text0% == "" Then If %Text4% == "X" Then If %Text8% == "X" Then Set Text0 "O" Set Color0 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text0% == "X" Then If %Text4% == "" Then If %Text8% == "X" Then Set Text4 "O" Set Color4 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text0% == "X" Then If %Text4% == "X" Then If %Text8% == "" Then Set Text8 "O" Set Color8 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text2% == "" Then If %Text4% == "X" Then If %Text6% == "X" Then Set Text2 "O" Set Color2 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text2% == "X" Then If %Text4% == "" Then If %Text6% == "X" Then Set Text4 "O" Set Color4 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf If %Text2% == "X" Then If %Text4% == "X" Then If %Text6% == "" Then Set Text6 "O" Set Color6 RED Set BlockMade 1 Goto EndBlockMove EndIf EndIf EndIf :EndBlockMove If# %BlockMade% == 1 Then Return Else Set WinMade 0 If %Text0% == "" Then If %Text1% == "O" Then If %Text2% == "O" Then Set Text0 "O" Set Color0 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text0% == "O" Then If %Text1% == "" Then If %Text2% == "O" Then Set Text1 "O" Set Color1 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text0% == "O" Then If %Text1% == "O" Then If %Text2% == "" Then Set Text2 "O" Set Color2 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text3% == "" Then If %Text4% == "O" Then If %Text5% == "O" Then Set Text3 "O" Set Color3 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text3% == "O" Then If %Text4% == "" Then If %Text5% == "O" Then Set Text4 "O" Set Color4 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text3% == "O" Then If %Text4% == "O" Then If %Text5% == "" Then Set Text5 "O" Set Color5 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text6% == "" Then If %Text7% == "O" Then If %Text8% == "O" Then Set Text6 "O" Set Color6 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text6% == "O" Then If %Text7% == "" Then If %Text8% == "O" Then Set Text7 "O" Set Color7 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text6% == "O" Then If %Text7% == "O" Then If %Text8% == "" Then Set Text8 "O" Set Color8 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text0% == "" Then If %Text4% == "O" Then If %Text8% == "O" Then Set Text0 "O" Set Color0 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text0% == "O" Then If %Text4% == "" Then If %Text8% == "O" Then Set Text4 "O" Set Color4 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text0% == "O" Then If %Text4% == "O" Then If %Text8% == "" Then Set Text8 "O" Set Color8 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text2% == "" Then If %Text4% == "O" Then If %Text6% == "O" Then Set Text2 "O" Set Color2 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text2% == "O" Then If %Text4% == "" Then If %Text6% == "O" Then Set Text4 "O" Set Color4 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf If %Text2% == "O" Then If %Text4% == "O" Then If %Text6% == "" Then Set Text6 "O" Set Color6 RED Set WinMade 1 Goto EndWinMove EndIf EndIf EndIf EndIf :EndWinMove If %WinMade% == 0 GoSub SeekEmpty Return :SeekEmpty // HOW THE XBOX WILL DECIDE WHICH SPOT TO MARK SetFunc XboxMove Left 1 $rand$ If# %XboxMove% > 8 Goto SeekEmpty If %Text{XboxMove}% == "X" Goto SeekEmpty If %Text{XboxMove}% == "O" Goto SeekEmpty Set Text%XboxMove% "O" Set Color%XboxMove% RED Return :WinCheckX // CHECK ROW 1 If %Text0% == "X" Then If %Text1% == "X" Then If %Text2% == "X" Then Goto HumanWins EndIf EndIf EndIf // CHECK ROW 2 If %Text3% == "X" Then If %Text4% == "X" Then If %Text5% == "X" Then Goto HumanWins EndIf EndIf EndIf // CHECK ROW 3 If %Text6% == "X" Then If %Text7% == "X" Then If %Text8% == "X" Then Goto HumanWins EndIf EndIf EndIf // CHECK COLUMN 1 If %Text0% == "X" Then If %Text3% == "X" Then If %Text6% == "X" Then Goto HumanWins EndIf EndIf EndIf // CHECK COLUMN 2 If %Text1% == "X" Then If %Text4% == "X" Then If %Text7% == "X" Then Goto HumanWins EndIf EndIf EndIf // CHECK COLUMN 3 If %Text2% == "X" Then If %Text5% == "X" Then If %Text8% == "X" Then Goto HumanWins EndIf EndIf EndIf // CHECK DIAGONAL 1 If %Text0% == "X" Then If %Text4% == "X" Then If %Text8% == "X" Then Goto HumanWins EndIf EndIf EndIf // CHECK DIAGONAL 2 If %Text2% == "X" Then If %Text4% == "X" Then If %Text6% == "X" Then Goto HumanWins EndIf EndIf EndIf Return :WinCheckO DelayMS 200 // CHECK ROW 1 If %Text0% == "O" Then If %Text1% == "O" Then If %Text2% == "O" Then Goto XboxWins EndIf EndIf EndIf // CHECK ROW 2 If %Text3% == "O" Then If %Text4% == "O" Then If %Text5% == "O" Then Goto XboxWins EndIf EndIf EndIf // CHECK ROW 3 If %Text6% == "O" Then If %Text7% == "O" Then If %Text8% == "O" Then Goto XboxWins EndIf EndIf EndIf // CHECK COLUMN 1 If %Text0% == "O" Then If %Text3% == "O" Then If %Text6% == "O" Then Goto XboxWins EndIf EndIf EndIf // CHECK COLUMN 2 If %Text1% == "O" Then If %Text4% == "O" Then If %Text7% == "O" Then Goto XboxWins EndIf EndIf EndIf // CHECK COLUMN 3 If %Text2% == "O" Then If %Text5% == "O" Then If %Text8% == "O" Then Goto XboxWins EndIf EndIf EndIf // CHECK DIAGONAL 1 If %Text0% == "O" Then If %Text4% == "O" Then If %Text8% == "O" Then Goto XboxWins EndIf EndIf EndIf // CHECK DIAGONAL 2 If %Text2% == "O" Then If %Text4% == "O" Then If %Text6% == "O" Then Goto XboxWins EndIf EndIf EndIf Return :DrawGame MsgBox "This game is a draw" Add Draws 1 Goto NewGame :HumanWins MsgBox "You win, Xbox loses" Add Wins 1 Goto NewGame :XboxWins MsgBox "Xbox Wins, You lose" Add Loses 1 Goto NewGame :Help MsgBox "Help$eol$Not done yet" Goto RefreshScreen :Options MsgBox "Options$eol$Not done yet" Goto RefreshScreen :ErrorHandler RAISELASTERROR :End // CloseImage Back |
| QUOTE (geniusalz @ Apr 22 2004, 06:48 AM) |
| You do know that your win-checking could be done in about 1/3 of the code Other than that, I'd test it if I had a working xbox... |
| QUOTE (geniusalz @ Apr 23 2004, 08:37 PM) |
| Yeah, little accident playing around with it... but I've got a spare one now. |
| QUOTE (BenJeremy @ Apr 23 2004, 09:00 PM) |
| If anybody's interested, I just posted a link in Comedy.... about a phone "Conversation" I had tonight. It is Xbox related, and even related to MXM, in a way, since I was doing research when the idea hit me. It was a very evil prank. Good thing my buddy has a sense of humor. |
| QUOTE |
| It is Xbox related, and even related to MXM, in a way, since I was doing research when the idea hit me |
| QUOTE (flattspott @ Apr 24 2004, 10:40 PM) |
| Hmm, as BJ always says, ... I look into it. Yes I am aware of the freezing issue, it's happened to me also. As to the gray right side, I dunna what you mean there, can you link me to a screen cap? Feel free to do up a back ground if you'd like. I suck at that stuff. |
| QUOTE |
| Ok I will get a screen cap soon, about the background, do you know the specs of it? Like what size it has to be and the position of the squares? |
| QUOTE |
| I want connect 4, yahtzee, checkers, chess, backgammon and blackjack too |
| QUOTE (flattspott @ Apr 25 2004, 10:06 PM) |
| How about a text based Blackjack Game? Specifically this one...BlackJack |