Jump to content

Follow the box game


Paulie
 Share

Recommended Posts

  • Replies 47
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

)" data-cid="207186" data-date="Jul 14 2006, 12:37 AM">

they need to make this game STICKY so all can enjoy and hack this marvolus game.

no... i don't think this game is quite sticky material

though it is fun

it would be a fun "hack challenge" game :D

Link to comment
Share on other sites

  • 1 year later...

having trouble finding the link to download. any suggestions?

Education: Francis Tuttle Technology Center adult full-time studentCourse of study: Network TechnologyCurrent Course: Microsoft Windows Server 2003, Enterprise EditionCompleted Courses: CompTIA A+ Hardware and Software, Windows XP Professional, Microsoft Office 2003, Desktop Support and Troubleshooting, and CompTIA Network+Remaining Courses: Linux Administration, Copper Cabling, Microsoft Windows Server 2003, Enterprise EditionAchievements: @17 years old, scored 98th percentile U.S. in Algebra 2 and Advanced Chemistry. [i.e. Ranked top 2% in the nation of High School students]

Link to comment
Share on other sites

Here is a version of the game.

I'm still trying to figure out a way to make it not flicker though

CODE

#cs

;============================================================

;Box Follow Game

;

;Created By: Paulie

;Assisted by: Simucal

;

;--Function list--

;Base Functions:

; -Menu()

; -ReadData()

; -ChangeAndCheck()

;Easy Difficulty:

; -GameBeginEasy()

; -StartGameEasy()

;Medium Difficulty:

; -GameBeginMed()

; -StartGameMed()

;Hard Difficulty:

; -GameBeginHard()

; -StartGameHard()

;=============================================================

#ce

#include<GuiConstants.au3>

Opt('MouseCoordMode', 0)

Global $x, $y, $MenuPlay, $instructions, $MenuGame, $box, $x2, $y2, $points, $pos[10], $menu, $menuEASY, $MenuMed, $menuHARD, $h_game, $diff, $time = 0, $beeps

Menu()

#cs

============================================================

Base Functions

============================================================

#ce

Func Menu()

$time = 0

AdlibDisable()

;$R_music = Random(1, 3, 1)

;If $R_music = 1 then

;soundPlay($song1,0)

;ElseIf $R_music = 2 Then

;soundPlay($song2,0)

;ElseIf $R_music = 3 Then

;soundPlay($song3,0)

;EndIf

$points = 0

WinMinimizeAll()

$menu = GUICreate("Select Difficulty", 200, 330, -1, -1)

$menuEASY = GUICtrlCreateRadio("Easy", 25, 65, 100, 50)

$MenuMed = GUICtrlCreateRadio("Medium", 25, 110, 100, 50)

$menuHARD = GUICtrlCreateRadio("Hard", 25, 160, 100, 50)

$menuGroup = GUICtrlCreateGroup("Difficulty", 20, 50, 120, 165)

$menuPLAY1 = GUICtrlCreateButton("Play", 50, 250, 100, 30)

GUISetState()

SoundSetWaveVolume(100)

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then Exit

If $msg = $menuPLAY1 Then ReadData()

WEnd

EndFunc ;==>Menu

;===========================================================

Func ReadData()

$StateEasy = GUICtrlRead($menuEASY)

$StateMedium = GUICtrlRead($MenuMed)

$StateHard = GUICtrlRead($menuHARD)

If $StateEasy = $GUI_Checked Then

GameBeginEasy()

ElseIf $StateMedium = $GUI_Checked Then

GameBeginMed()

ElseIf $StateHard = $GUI_Checked Then

GameBeginHard()

Else

MsgBox(0, "Please Select", "Please Select a Difficulty.")

EndIf

EndFunc ;==>ReadData

;===========================================================

Func ChangeAndCheck()

$starttime = TimerInit()

SoundSetWaveVolume(100)

$dist = Random(5, 200, 1)

$s_Temp = 0

$a_BoxPos = ControlGetPos("", "", $box)

$WinPos = WinGetPos($h_game)

$timediff = TimerDiff($starttime)

ToolTip("Score: " & $points & @CRLF & "Time: " & Round($time / 10, 1), $WinPos[0] + 220, $WinPos[1] - 10)

If IsArray($a_BoxPos) Then

Do

$i_Rand = Random(00000, 40001, 1)

Select

Case $i_Rand < 10000 ; Move Box UP

If ($a_BoxPos[1] - $dist) > 25 Then

For $i = 1 To $dist step 3

$a_Info = GUIGetCursorInfo($h_game)

If $a_Info[4] <> $box Then ExitLoop

If $diff = "Hard" Then

Sleep(15)

GUICtrlSetPos($box, $a_BoxPos[0], $a_BoxPos[1] - $i)

Else

Sleep(20)

GUICtrlSetPos($box, $a_BoxPos[0], $a_BoxPos[1] - $i)

EndIf

Next

$s_Temp = 1

$points += 10

EndIf

Case $i_Rand < 20000 And $i_Rand > 10000 ; Move Box RIGHT

If ($a_BoxPos[0] + $dist) < 400 Then

For $i = 1 To $dist step 3

$a_Info = GUIGetCursorInfo($h_game)

If $a_Info[4] <> $box Then ExitLoop

If $diff = "Hard" Then

Sleep(15)

GUICtrlSetPos($box, $a_BoxPos[0] + $i, $a_BoxPos[1])

Else

Sleep(20)

GUICtrlSetPos($box, $a_BoxPos[0] + $i, $a_BoxPos[1])

EndIf

Next

$s_Temp = 1

$points += 10

EndIf

Case $i_Rand < 30000 And $i_Rand > 20000 ; Move Box DOWN

If ($a_BoxPos[1] + $dist) < 400 Then

For $i = 1 To $dist step 3

$a_Info = GUIGetCursorInfo($h_game)

If $a_Info[4] <> $box Then ExitLoop

If $diff = "Hard" Then

Sleep(15)

GUICtrlSetPos($box, $a_BoxPos[0], $a_BoxPos[1] + $i)

Else

Sleep(20)

GUICtrlSetPos($box, $a_BoxPos[0], $a_BoxPos[1] + $i)

EndIf

Next

$s_Temp = 1

$points = $points + 10

EndIf

Case $i_Rand < 40000 And $i_Rand > 30000 ; Move Box LEFT

If ($a_BoxPos[0] - $dist) > 25 Then

For $i = 1 To $dist step 3

$a_Info = GUIGetCursorInfo($h_game)

If $a_Info[4] <> $box Then ExitLoop

If $diff = "Hard" Then

Sleep(15)

GUICtrlSetPos($box, $a_BoxPos[0] - $i, $a_BoxPos[1])

Else

Sleep(20)

GUICtrlSetPos($box, $a_BoxPos[0] - $i, $a_BoxPos[1])

EndIf

Next

$s_Temp = 1

$points += 10

EndIf

Case $i_Rand > 40000

$s_Temp = 1

$points = $points + 10

EndSelect

Until $s_Temp = 1

$time += $timediff

EndIf

EndFunc ;==>ChangeAndCheck

#cs

============================================================

Easy Functions

============================================================

#ce

Func GameBeginEasy()

GUIDelete($menu)

WinMinimizeAll()

Global $diff = "Easy"

$MenuGame = GUICreate("", 500, 400, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)

GUISetBkColor(0x000000)

$label1 = GUICtrlCreateLabel("Follow the Box", 175, 0, 200, 100)

GUICtrlSetFont($label1, 20, 500, 2, "Arial")

GUICtrlSetColor($label1, 0xff0000)

$instructions = GUICtrlCreateLabel("Keep your mouse in the square and avoid touching the black background", 25, 100, 450, 100)

GUICtrlSetFont($instructions, 15, 500, 2, "Arial")

GUICtrlSetColor($instructions, 0xCCCCCC)

$menuPLAY1 = GUICtrlCreateButton("Play", 225, 350, 100, 30)

GUISetState()

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

If $msg = $menuPLAY1 Then StartGameEasy()

WEnd

EndFunc ;==>GameBeginEasy

;===========================================================

Func StartGameEasy()

GUIDelete("$MenuGame")

$diff = "Easy"

$h_game = GUICreate("", 500, 500, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)

GUISetBkColor(0x000000)

$box = GUICtrlCreateLabel(" ", 250, 250, 100, 100)

GUICtrlSetBkColor($box, 0xCCCCCC)

GUISetState()

$pos = ControlGetPos("", "", $box)

If IsArray($pos) Then

MouseMove($pos[0] + $pos[2] / 2, $pos[1] + $pos[3] / 2, 0)

EndIf

Sleep(1000)

AdlibEnable("ChangeAndCheck", 50)

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Sleep(100)

$a_Info = GUIGetCursorInfo($h_game)

If $a_Info[4] <> $box Then ExitLoop

WEnd

AdlibDisable()

GUIDelete($h_game)

Beep(100, 200)

Beep(200, 200)

Beep(300, 200)

Beep(400, 200)

Beep(300, 200)

Beep(200, 200)

Beep(100, 200)

GUICreate("Whoops!", 200, 120)

GUISetState(@SW_SHOW)

$Play_again = GUICtrlCreateButton("Play Again", 0, 100, 70, 20)

$Close_me = GUICtrlCreateButton("Exit", 70, 100, 70, 20)

GUICtrlCreateLabel("Your mouse left the box!" & @CRLF & @CRLF & "Difficulty: " & $diff & @CRLF & "Your Score: " & $points & @CRLF & "Time: " & Round($time / 1000, 1) & @CRLF & @CRLF & "Good Job!! Play Again!", 0, 0, 450, 100)

While 1

$msg = GUIGetMsg()

Switch $msg

Case $Play_again

GUIDelete("Whoops!")

Menu()

Case $Close_me, $GUI_EVENT_CLOSE

GUIDelete("Whoops!")

Exit

EndSwitch

WEnd

EndFunc ;==>StartGameEasy

#cs

============================================================

Medium Functions

============================================================

#ce

Func GameBeginMed()

GUIDelete($menu)

WinMinimizeAll()

Global $diff = "Medium"

$MenuGame = GUICreate("", 500, 400, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)

GUISetBkColor(0x000000)

$label1 = GUICtrlCreateLabel("Follow the Box", 175, 0, 200, 100)

GUICtrlSetFont($label1, 20, 500, 2, "Arial")

GUICtrlSetColor($label1, 0xff0000)

$instructions = GUICtrlCreateLabel("Keep your mouse in the square and avoid touching the black background", 25, 100, 450, 100)

GUICtrlSetFont($instructions, 15, 500, 2, "Arial")

GUICtrlSetColor($instructions, 0xCCCCCC)

$menuPLAY1 = GUICtrlCreateButton("Play", 225, 350, 100, 30)

GUISetState()

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

If $msg = $menuPLAY1 Then StartGameMed()

WEnd

EndFunc ;==>GameBeginMed

;===========================================================

Func StartGameMed()

GUIDelete("$MenuGame")

$diff = "Medium"

$h_game = GUICreate("", 500, 500, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)

GUISetBkColor(0x000000)

$box = GUICtrlCreateLabel(" ", 250, 250, 75, 75)

GUICtrlSetBkColor($box, 0xCCCCCC)

GUISetState()

$pos = ControlGetPos("", "", $box)

If IsArray($pos) Then

MouseMove($pos[0] + $pos[2] / 2, $pos[1] + $pos[3] / 2, 0)

EndIf

Sleep(1000)

AdlibEnable("ChangeAndCheck", 50)

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Sleep(100)

$a_Info = GUIGetCursorInfo($h_game)

If $a_Info[4] <> $box Then ExitLoop

WEnd

AdlibDisable()

GUIDelete($h_game)

Beep(100, 200)

Beep(200, 200)

Beep(300, 200)

Beep(400, 200)

Beep(300, 200)

Beep(200, 200)

Beep(100, 200)

GUICreate("Whoops!", 200, 120)

GUISetState(@SW_SHOW)

$Play_again = GUICtrlCreateButton("Play Again", 0, 100, 70, 20)

$Close_me = GUICtrlCreateButton("Exit", 70, 100, 70, 20)

GUICtrlCreateLabel("Your mouse left the box!" & @CRLF & @CRLF & "Difficulty: " & $diff & @CRLF & "Your Score: " & $points & @CRLF & "Time: " & Round($time / 1000, 1) & @CRLF & @CRLF & "Good Job!! Play Again!", 0, 0, 450, 100)

While 1

$msg = GUIGetMsg()

Switch $msg

Case $Play_again

GUIDelete("Whoops!")

Menu()

Case $Close_me, $GUI_EVENT_CLOSE

GUIDelete("Whoops!")

Exit

EndSwitch

WEnd

EndFunc ;==>StartGameMed

#cs

============================================================

Hard Functions

============================================================

#ce

Func GameBeginHard()

GUIDelete($menu)

WinMinimizeAll()

Global $diff = "Hard"

$MenuGame = GUICreate("", 500, 400, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)

GUISetBkColor(0x000000)

$label1 = GUICtrlCreateLabel("Follow the Box", 175, 0, 200, 100)

GUICtrlSetFont($label1, 20, 500, 2, "Arial")

GUICtrlSetColor($label1, 0xff0000)

$instructions = GUICtrlCreateLabel("Keep your mouse in the square and avoid touching the black background", 25, 100, 450, 100)

GUICtrlSetFont($instructions, 15, 500, 2, "Arial")

GUICtrlSetColor($instructions, 0xCCCCCC)

$menuPLAY1 = GUICtrlCreateButton("Play", 225, 350, 100, 30)

GUISetState()

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

If $msg = $menuPLAY1 Then StartGameHard()

WEnd

EndFunc ;==>GameBeginHard

;============================================================

Func StartGameHard()

GUIDelete("$MenuGame")

$diff = "Hard"

$h_game = GUICreate("", 500, 500, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)

GUISetBkColor(0x000000)

$box = GUICtrlCreateLabel(" ", 250, 250, 50, 50)

GUICtrlSetBkColor($box, 0xCCCCCC)

GUISetState()

$pos = ControlGetPos("", "", $box)

If IsArray($pos) Then

MouseMove($pos[0] + $pos[2] / 2, $pos[1] + $pos[3] / 2, 0)

EndIf

Sleep(1000)

AdlibEnable("ChangeAndCheck", 50)

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Sleep(100)

$a_Info = GUIGetCursorInfo($h_game)

If $a_Info[4] <> $box Then ExitLoop

WEnd

AdlibDisable()

GUIDelete($h_game)

Beep(100, 200)

Beep(200, 200)

Beep(300, 200)

Beep(400, 200)

Beep(300, 200)

Beep(200, 200)

Beep(100, 200)

GUICreate("Whoops!", 200, 120)

GUISetState(@SW_SHOW)

$Play_again = GUICtrlCreateButton("Play Again", 0, 100, 70, 20)

$Close_me = GUICtrlCreateButton("Exit", 70, 100, 70, 20)

GUICtrlCreateLabel("Your mouse left the box!" & @CRLF & @CRLF & "Difficulty: " & $diff & @CRLF & "Your Score: " & $points & @CRLF & "Time: " & Round($time / 1000, 1) & @CRLF & @CRLF & "Good Job!! Play Again!", 0, 0, 450, 100)

While 1

$msg = GUIGetMsg()

Switch $msg

Case $Play_again

GUIDelete("Whoops!")

Menu()

Case $Close_me, $GUI_EVENT_CLOSE

GUIDelete("Whoops!")

Exit

EndSwitch

WEnd

EndFunc ;==>StartGameHard

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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