xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
 
Reply to this topicStart new topic
> Anybuddy Want To Do A Yahtzee Clone
flattspott
post Oct 3 2004, 08:51 PM
Post #1


X-S Freak
*****

Group: Moderator
Posts: 1787
Joined: 14-April 03
From: Southern California
Member No.: 32293
Xbox Version: v1.0
360 version: v1 (xenon)



He what I got so far for a resourceless WIP. Like I said I a WIP. I was mainly doing the dice rolling,holding and drawing at the moment.

Stick it in $ActualPath$\whatever.xas to see it so far

CODE
// Yahtzee
MinimumBuild 1230

Set Mark 1
Set Players 1

:NewDice
For i = 1 To 5
Set Hold%i% 0
Next

Gosub RollDice

Set dL1 115
Set dL2 173
Set dL3 231
Set dL4 288
Set dL5 345
Set Data1 0000000000001000000000000
Set Data2 0000001000000000001000000
Set Data3 0000001000001000001000000
Set Data4 0000001010000000101000000
Set Data5 0000001010001000101000000
Set Data6 0000001010010100101000000

:GameLoop
SetFunc Input IQPeekMsgID
If %Input% != "" Gosub InputHandler
Gosub DrawGame
Goto GameLoop

:InputHandler
IQWaitMsg Any
Switch %MSG_ID%
Case UI_LF
 If# %Mark% != 1 Then
  Sub Mark 1
 EndIf
EndCase
Case UI_RT
 If# %Mark% != 5 Then
  Add Mark 1
 EndIf
EndCase
Case UI_SELECT
 If# %Hold{Mark}% == 0 Then
  Set Hold%Mark% 1
 Else
  Set Hold%Mark% 0
 EndIf
EndCase
Case MUSIC_NEXT
 Gosub RollDice
EndCase
Case UI_BACK
 Quit
EndCase
EndSwitch
Return



:RollDice
For i = 1 To 5
If# %Hold{i}% == 1 Goto NoRoll
Set Dice%i% %($rand%6+1)%
:NoRoll
Next
Return

:DrawGame
BeginDraw
Text 220 240 Center "Dice 1 : %Dice1% %Hold1%$EOL$Dice 2 : %Dice2% %Hold2%$EOL$Dice 3 : %Dice3% %Hold3%$EOL$Dice 4 : %Dice4% %Hold4%$EOL$Dice 5 : %Dice5% %Hold5%" Red

For i = 1 To 5
If# %Hold{i}% == 1 Then
Gosub HoldIt%i%
Goto Stop
EndIf
Set globalLeft %dL{i}%
Gosub Make%Dice{i}%
Set Z 0
For T = 0 To 4
For L = 0 To 4
 SetFunc ToDraw Mid %Z% 1 %Array%
 If# %ToDraw% == 0 Then
  Box %(L*10+globalLeft)% %(T*10+100)% 10 10 White White
 Else
  Box %(L*10+globalLeft)% %(T*10+100)% 10 10 Red Red
 EndIf
 Add Z 1
Next
Next
:Stop
Next

EndDraw
Return

:Make1
Set Array %Data1%
Return
:Make2
Set Array %Data2%
Return
:Make3
Set Array %Data3%
Return
:Make4
Set Array %Data4%
Return
:Make5
Set Array %Data5%
Return
:Make6
Set Array %Data6%
Return

:HoldIt1
Box 110 110 60 60 Orange Orange
Return
:HoldIt2
Box 168 110 60 60 Orange Orange
Return
:HoldIt3
Box 226 110 60 60 Orange Orange
Return
:HoldIt4
Box 283 110 60 60 Orange Orange
Return
:HoldIt5
Box 340 110 60 60 Orange Orange
Return
<Dice>
<Die Value="1" Data="0000000000001000000000000"/>
<Die Value="2" Data="0000001000000000001000000"/>
<Die Value="3" Data="0000001000001000001000000"/>
<Die Value="4" Data="0000001010000000101000000"/>
<Die Value="5" Data="0000001010001000101000000"/>
<Die Value="6" Data="0000001010010100101000000"/>
</Dice>

User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 19th May 2013 - 12:20 PM