AlmarM Posted September 28, 2007 Author Posted September 28, 2007 Muhahaha 19.2 Seconds Im gonne add High score and script (Updated Script) -AlmarM- Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
qwer85 Posted September 28, 2007 Posted September 28, 2007 Nice done ^^ I just cant beat 19.5 10 years of playing FPS games... starting quake2
AlmarM Posted September 28, 2007 Author Posted September 28, 2007 10 years of playing FPS games... starting quake2Lol... Im only playing FPS games for like 4 - 6 years (And other like PVP, RPG etc) Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
JRSmile Posted September 28, 2007 Posted September 28, 2007 (edited) Fastest: 19,6 and still trying .... EDIT: 18,9 EDIT: 18,8 EDIT: 18,5 EDIT: 16,8 <<<< yes Edited September 28, 2007 by JRSmile $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
AlmarM Posted September 28, 2007 Author Posted September 28, 2007 Fastest: 19,6 and still trying .... EDIT: 18,9 EDIT: 18,8 EDIT: 18,5 EDIT: 16,8 <<<< yes Nice look at highscore ^^ Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
AlmarM Posted September 30, 2007 Author Posted September 30, 2007 Someone have some ideas to update the script ? Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
jvanegmond Posted September 30, 2007 Posted September 30, 2007 (edited) A few things to do: > Shorted the code by 80% by using arrays. > When you press highscore as soon as it loads the game crashes with an array error. > Less message boxes, they are a pain in the ass and you have plenty of room to write information to anyhow. > Make a difficulty setting, like difficult "Easy" has big boxes and few of them. "Medium" is like this and "Hard" has tiny boxes with huge spaces in between them. (Use tip 1 first, it will be a lot easier after that.) Edited September 30, 2007 by Manadar github.com/jvanegmond
AlmarM Posted September 30, 2007 Author Posted September 30, 2007 Added Lastest Example Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
jvanegmond Posted September 30, 2007 Posted September 30, 2007 I modified your version a bit. You can use this as the main one, or just keep your own. Either is fine. Changed: Rewritten to use arrays to make it faster. Improved timing, it is now more accurate in its results. Improvements in the about window, it now looks great with transparency! The next button to click is now completely random. It was static based on previous position. Fixed all crashes. I also removed a lot of pointless message boxes (except for the one that asks you to view the highscores on the website). expandcollapse popup#include <GuiConstants.au3> Global Const $sScrollText = 'How fast are u ?' & @CRLF & @CRLF & "Developers:" & @CRLF & @CRLF & "AlmarM" & @CRLF & _ "Manadar" & @CRLF & "alien13" & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & "Original design by: " & @CRLF & @CRLF & "AlmarM" & _ @CRLF & @CRLF & @CRLF & @CRLF & "Fanboys:" & @CRLF & @CRLF & "Bert" & @CRLF & "alexmadman" & @CRLF & "SmOke_N" & @CRLF & "qwer85" & @CRLF & "poisonkiller" & _ @CRLF & "JRSmile" Dim $Button[6][6] $Main = GUICreate("How fast are u ?", 370, 540) ; Given this GUI a name GUISetState(@SW_SHOW) For $x = 0 to 5 For $y = 0 to 5 $Button[$x][$y] = GUICtrlCreateButton("Click", 10+(60*$x),10+(60*$y),50,50) GUICtrlSetState($Button[$x][$y], $GUI_DISABLE) Next Next GUICtrlSetData($Button[0][0],"Start") GUICtrlSetState($Button[0][0], $GUI_ENABLE) $Quick_HighScore = GUICtrlCreateEdit("Your highscores:" & @CRLF, 10, 370, 350, 120,BitOr($GUI_SS_DEFAULT_EDIT,$ES_READONLY)) GUICtrlSetBkColor($Quick_HighScore,0xFFFFFF) $HighScores = GUICtrlCreateButton("High Scores", 140, 500, 80, 30) $About = GUICtrlCreateButton("About", 240, 500, 80, 30) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button[0][0] GUICtrlSetState($HighScores,$GUI_DISABLE) GUICtrlSetState($About,$GUI_DISABLE) GUICtrlSetData($Button[0][0],"Click") GUICtrlSetState($Button[0][0],$GUI_DISABLE) $tBegin = TimerInit() For $i = 1 to 25 $x = Random(0,5,1) $y = Random(0,5,1) GUICtrlSetState($Button[$x][$y],$GUI_ENABLE) While GUIGetMsg() <= 0 WEnd GUICtrlSetState($Button[$x][$y],$GUI_DISABLE) Next $dif = Round(TimerDiff($tBegin) / 1000, 1) GUICtrlSetState($Button[$x][$y],$GUI_DISABLE) GUICtrlSetState($HighScores,$GUI_ENABLE) GUICtrlSetState($About,$GUI_ENABLE) GUICtrlSetData($Button[0][0],"Start") GUICtrlSetState($Button[0][0],$GUI_ENABLE) GUICtrlSetData($Quick_HighScore, GUICtrlRead($Quick_HighScore) & @CRLF & $dif & " Seconds") Case $HighScores HighScores() Case $About About() EndSwitch WEnd Func About() GUISetState(@SW_HIDE,$Main) $sAbout = GUICreate("How fast are u ?", 270 ,370,-1,-1) GUISetBkColor(0xFFFFFF) GUISetFont(12,400,0,"Verdana") $sLabel = GUICtrlCreateLabel($sScrollText,10,370/3,250,10000,$ES_CENTER) $sTransHeight = 5 For $x = 0 to 15 $stemp = GUICreate("",270, $sTransHeight, 0, $sTransHeight * $x ,BitOR($WS_POPUP,$WS_CHILD),$WS_EX_MDICHILD,$sAbout) GUISetState() WinSetTrans($stemp,"",(255/15)*(-1*($x-15))) Next For $x = 0 to 15 $stemp = GUICreate("",270, $sTransHeight, 0, 365 - ($sTransHeight * $x) ,BitOR($WS_POPUP,$WS_CHILD),$WS_EX_MDICHILD,$sAbout) GUISetState() WinSetTrans($stemp,"",(255/15)*(-1*($x-15))) Next GUISetState(@SW_SHOW,$sAbout) $sTime = TimerInit() $sScroll = 5 $sFirstTime = 1 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch If ($sFirstTime AND TimerDiff($sTime) > 1000) OR (Not $sFirstTime AND TimerDiff($sTime) > 20) Then $sFirstTime = 0 $sTime = TimerInit() ControlMove($sAbout,"",$sLabel,10,(370/3)-$sScroll) $sScroll += 1 ConsoleWrite($sScroll & @CRLF) If $sScroll > 600 Then $sScroll = - 270 EndIf EndIf WEnd GUIDelete($sAbout) GUISetState(@SW_SHOW,$Main) EndFunc Func Highscores() If MsgBox(0x24,"How fast are u ?", "The highscores are only available online, do you wish to see them now?") = 6 Then ShellExecute("http://www.autoitscript.com/forum/index.php?showtopic=53962") EndIf EndFunc github.com/jvanegmond
AlmarM Posted September 30, 2007 Author Posted September 30, 2007 No srry not gonne use that... I dont even understand it Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
idusy Posted September 30, 2007 Posted September 30, 2007 That was easyThis is without editing the script, using a bot, or editing the screenshot...
jvanegmond Posted September 30, 2007 Posted September 30, 2007 No srry not gonne use that... I dont even understand it Your loss. github.com/jvanegmond
AlmarM Posted October 1, 2007 Author Posted October 1, 2007 That was easyThis is without editing the script, using a bot, or editing the screenshot... Lol i can see its fake...That time isnt in Quick Highscore View...And Start is Enable so you needed to push the Restart button and the time sould be at the Quick Highscore view so... Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
aslani Posted October 1, 2007 Posted October 1, 2007 (edited) No srry not gonne use that... I dont even understand it Manadar's code process' faster that yours. The buttons are enabled as soon as you click the last one. Your script has this short pause before enabling another button. After playing both, the difference in my time is about 5 seconds...and this is not because I'm slow, but rather the buttons in your script enables too slow. Just my 2 cents.My highscores (first try):Manadar's Version = 15.6AlmarM's version = 21.5EDIT:In addition, your script have a pattern rather than being random. Edited October 1, 2007 by aslani [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version
idusy Posted October 2, 2007 Posted October 2, 2007 Lol i can see its fake...That time isnt in Quick Highscore View...And Start is Enable so you needed to push the Restart button and the time sould be at the Quick Highscore view so...Negative. I pushed the High Scores button.
AlmarM Posted October 2, 2007 Author Posted October 2, 2007 Negative. I pushed the High Scores button.Dude... Cant... If you press the Stop button it will show your time but the Start button is disable then.. And the highscore button will show a GUICreate()So... Where are you talking about ?? Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
jvanegmond Posted October 2, 2007 Posted October 2, 2007 No srry not gonne use that... I dont even understand it I just added a few lines, to show you why you should use arrays. expandcollapse popup#include <GuiConstants.au3> Global Const $sScrollText = 'How fast are u ?' & @CRLF & @CRLF & "Developers:" & @CRLF & @CRLF & "AlmarM" & @CRLF & _ "Manadar" & @CRLF & "alien13" & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & "Original design by: " & @CRLF & @CRLF & "AlmarM" & _ @CRLF & @CRLF & @CRLF & @CRLF & "Fanboys:" & @CRLF & @CRLF & "Bert" & @CRLF & "alexmadman" & @CRLF & "SmOke_N" & @CRLF & "qwer85" & @CRLF & "poisonkiller" & _ @CRLF & "JRSmile" $Form1 = GUICreate("Choose a difficulty", 347, 118) $Button1 = GUICtrlCreateButton("Easy", 5, 5, 105, 105, 0) $Button2 = GUICtrlCreateButton("Medium", 115, 5, 110, 105, 0) $Button3 = GUICtrlCreateButton("Hard", 230, 5, 110, 105, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $sButton = 2 $sSpace = 18 $sSize = 100 ExitLoop Case $Button2 $sSpace = 20 $sButton = 4 $sSize = 50 ExitLoop Case $Button3 $sSpace = 30 $sButton = 6 $sSize = 20 ExitLoop EndSwitch WEnd GUIDelete() Dim $Button[$sButton+1][$sButton+1] $Main = GUICreate("How fast are u ?", 370, 540) ; Given this GUI a name GUISetState(@SW_SHOW) For $x = 0 to $sButton For $y = 0 to $sButton $Button[$x][$y] = GUICtrlCreateButton("Click", $sSpace+(($sSize+$sSpace)*$x),$sSpace+(($sSize+$sSpace)*$y),$sSize,$sSize) GUICtrlSetState($Button[$x][$y], $GUI_DISABLE) Next Next GUICtrlSetData($Button[0][0],"Start") GUICtrlSetState($Button[0][0], $GUI_ENABLE) $Quick_HighScore = GUICtrlCreateEdit("Your highscores:" & @CRLF, 10, 370, 350, 120,BitOr($GUI_SS_DEFAULT_EDIT,$ES_READONLY)) GUICtrlSetBkColor($Quick_HighScore,0xFFFFFF) $HighScores = GUICtrlCreateButton("High Scores", 140, 500, 80, 30) $About = GUICtrlCreateButton("About", 240, 500, 80, 30) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button[0][0] GUICtrlSetState($HighScores,$GUI_DISABLE) GUICtrlSetState($About,$GUI_DISABLE) GUICtrlSetData($Button[0][0],"Click") GUICtrlSetState($Button[0][0],$GUI_DISABLE) $tBegin = TimerInit() For $i = 1 to 25 $x = Random(0,$sButton,1) $y = Random(0,$sButton,1) GUICtrlSetState($Button[$x][$y],$GUI_ENABLE) While GUIGetMsg() <= 0 WEnd GUICtrlSetState($Button[$x][$y],$GUI_DISABLE) Next $dif = Round(TimerDiff($tBegin) / 1000, 1) GUICtrlSetState($Button[$x][$y],$GUI_DISABLE) GUICtrlSetState($HighScores,$GUI_ENABLE) GUICtrlSetState($About,$GUI_ENABLE) GUICtrlSetData($Button[0][0],"Start") GUICtrlSetState($Button[0][0],$GUI_ENABLE) GUICtrlSetData($Quick_HighScore, GUICtrlRead($Quick_HighScore) & @CRLF & $dif & " Seconds") Case $HighScores HighScores() Case $About About() EndSwitch WEnd Func About() GUISetState(@SW_HIDE,$Main) $sAbout = GUICreate("How fast are u ?", 270 ,370,-1,-1) GUISetBkColor(0xFFFFFF) GUISetFont(12,400,0,"Verdana") $sLabel = GUICtrlCreateLabel($sScrollText,10,370/3,250,10000,$ES_CENTER) $sTransHeight = 5 For $x = 0 to 15 $stemp = GUICreate("",270, $sTransHeight, 0, $sTransHeight * $x ,BitOR($WS_POPUP,$WS_CHILD),$WS_EX_MDICHILD,$sAbout) GUISetState() WinSetTrans($stemp,"",(255/15)*(-1*($x-15))) Next For $x = 0 to 15 $stemp = GUICreate("",270, $sTransHeight, 0, 365 - ($sTransHeight * $x) ,BitOR($WS_POPUP,$WS_CHILD),$WS_EX_MDICHILD,$sAbout) GUISetState() WinSetTrans($stemp,"",(255/15)*(-1*($x-15))) Next GUISetState(@SW_SHOW,$sAbout) $sTime = TimerInit() $sScroll = 5 $sFirstTime = 1 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch If ($sFirstTime AND TimerDiff($sTime) > 1000) OR (Not $sFirstTime AND TimerDiff($sTime) > 20) Then $sFirstTime = 0 $sTime = TimerInit() ControlMove($sAbout,"",$sLabel,10,(370/3)-$sScroll) $sScroll += 1 ConsoleWrite($sScroll & @CRLF) If $sScroll > 600 Then $sScroll = - 270 EndIf EndIf WEnd GUIDelete($sAbout) GUISetState(@SW_SHOW,$Main) EndFunc Func Highscores() If MsgBox(0x24,"How fast are u ?", "The highscores are only available online, do you wish to see them now?") = 6 Then ShellExecute("http://www.autoitscript.com/forum/index.php?showtopic=53962") EndIf EndFunc github.com/jvanegmond
crzftx Posted October 3, 2007 Posted October 3, 2007 (edited) well I saw the original script and felt compelled to write a better one. I was disappointed to see that I'm a bit late. I felt like I owe Manadar something, since he came up with the array idea, but I, too, had the idea, and didn't read his scripts before writing mine. I'm sorry if any of it looks similar, I did write it. I decided to leave the random pick out of the code, because depending on how the random buttons are picked, it could make the game very easy. I kept everything exactly the way AlmarM had it, except for the way it was written and how things are displayed. Take a look. I would enjoy feedback from experienced coders able to shorten up my code. So here it is: expandcollapse popup#include <GuiConstants.au3> Global $click[36],$temp,$current = 0,$time,$timer,$score = 0 Global $order[36] = [0,28,3,30,15,7,29,13,5,14,34,8,32,16,18,21,1,33,20,11,19,4,22,2,25,10,6,23,31,9,17,12,27,24,26,35] $gui = GUICreate("How Fast Are You?",370,540) For $z = 0 To 5 For $y = 0 To 5 Switch $z+$y Case 0 $temp = "Start" Case 10 $temp = "Stop" Case Else $temp = "Click" EndSwitch $click[$z+6*$y] = GUICtrlCreateButton($temp,10+60*$z,10+60*$y,50,50) GUICtrlSetState(-1,$GUI_DISABLE) Next Next GUICtrlSetState($click[0],$GUI_ENABLE) $editShowLastScores = GUICtrlCreateEdit("",10,370,350,120) $buttonHighscore = GUICtrlCreateButton("High Scores",60,500,95,30) $buttonAbout = GUICtrlCreateButton("About",215,500,95,30) GUISetState() For $z = 1 To 5 If IniRead(@ScriptDir&"\Scores.txt","Scores",$z,9999) = 9999 Then IniWrite(@ScriptDir&"\Scores.txt","Scores",$z,9999) Next While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $click[$order[$current]] If $current = 0 Then $timer = TimerInit() GUICtrlSetState($click[$order[$current]],$GUI_DISABLE) $current += 1 If $current = 36 Then $current = 0 $time = Round(TimerDiff($timer)/1000,4) If $time < IniRead(@ScriptDir&"\Scores.txt","Scores",5,0) Then IniWrite(@ScriptDir&"\Scores.txt","Scores",5,$time) $score = 5 For $z = 4 To 1 Step -1 $temp = IniRead(@ScriptDir&"\Scores.txt","Scores",$z,9999) If IniRead(@ScriptDir&"\Scores.txt","Scores",$z+1,9999) < $temp Then IniWrite(@ScriptDir&"\Scores.txt","Scores",$z,IniRead(@ScriptDir&"\Scores.txt","Scores",$z+1,9999)) IniWrite(@ScriptDir&"\Scores.txt","Scores",$z+1,$temp) $score -= 1 EndIf Next EndIf If $score Then GUICtrlSetData($editShowLastScores,$time&" seconds - Highscore "&$score&@CRLF,1) $score = 0 Else GUICtrlSetData($editShowLastScores,$time&" seconds"&@CRLF,1) EndIf EndIf GUICtrlSetState($click[$order[$current]],$GUI_ENABLE) Case $buttonHighscore GUICtrlSetData($editShowLastScores,@CRLF,0) For $z = 1 To 5 GUICtrlSetData($editShowLastScores,$z&". "&IniRead(@ScriptDir&"\Scores.txt","Scores",$z,9999)&@CRLF,0) Next GUICtrlSetData($editShowLastScores,@CRLF,0) Case $buttonAbout GUICtrlSetData($editShowLastScores,@CRLF&"Scripted by crzftx"&@CRLF&"Idea and concepts by AlmarM"&@CRLF,0) EndSwitch WEnd Back to Manadar, nice script, although you left out exit functionality during the game, and the ability to change modes once one is picked. I really enjoyed the About screen. I may have to use that in the rest of my scripts, your name of course included. Edited October 3, 2007 by crzftx
JustinReno Posted October 3, 2007 Posted October 3, 2007 (edited) HAHHAHAAAA: 14.something Edited October 3, 2007 by JustinReno
crzftx Posted October 3, 2007 Posted October 3, 2007 (edited) 17.9972 seconds using my version. I'll understand if you don't post it, even though the game play is exactly the same. Edited October 3, 2007 by crzftx
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now