Nordwind Posted January 20, 2007 Share Posted January 20, 2007 Ok, here the bees-demo including a refresh of the background via WM_PAINT. expandcollapse popup#include <GUIConstants.au3> #include <Prospeed.au3> #include <Math.au3> Opt("MouseCoordMode",0) ;Opt("GUIOnEventMode", 1) HotKeySet("{Esc}","_exit") $gui = GUICreate("Prospeed",800, 400, -1, -1,$WS_POPUP) GUISetState() Background(@scriptdir & "\Hintergrund.jpg", 0, 0) $POSX = 0 $POSY = 0 $SprOfX = 0 $SprOfY = 0 $SpWid = 24 $SpHgt = 18 $SpFrms = 4 $SpStFrm = 1 $SpFrmSpd = 6 $SpPosX = -30 $Sprite1 = @scriptdir & "\Sprites.gif" $Sprite2 = @scriptdir & "\Sprites2.gif" $SprSpdX = 4 $SprSpdY = 4 $Bee1 = sprite($Sprite1,$SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX,40) DllCall($S_DLL,"long","SetSpriteMovingMode","long",$Bee1,"long",1) $NumOfSpr = 160 $EndDim = $NumOfSpr -1 Dim $CopyBee1[$NumOfSpr] For $i = 1 to $EndDim $CopyBee1[$i] = CopySprite($Bee1) DllCall($S_DLL,"long","SetSpriteMovingMode","long",$CopyBee1[$i],"long",1) SetSpriteSpeed($CopyBee1[$i], $SprSpdX, $SprSpdY) SetSpriteAnimMove($CopyBee1[$i], 1, 0, 0) SetSpriteAnimMove($CopyBee1[$i], 2, 0, 0) SetSpriteAnimMove($CopyBee1[$i], 3, 0, 0) SetSpriteAnimMove($CopyBee1[$i], 5, 0, 32) SetSpriteAnimMove($CopyBee1[$i], 6, 0, 32) SetSpriteAnimMove($CopyBee1[$i], 7, 0, 32) next Global Const $WM_PAINT = 0x000F GUIRegisterMsg($WM_PAINT, "PaintNew") GUISetState() Func PaintNew() DllCall($S_DLL,"long","CopyExtBmp","long",$hDC,"long",0,"long",0,"long",$S_WIDTH[0],"long",$S_HEIGHT[0],"long",$S_fensterkopie1[0],"long",0,"long",0,"long",0) EndFunc $Size = 20; vars for circle $OrgX = 400; $OrgY = 200; $Stp = 10; $n = 0 While 1 For $i = 1 to $EndDim - 1 $pos = MouseGetPos() $R = _Radian ($n) $X = Sin($R)*$Size * 3 + $OrgX $Y = Cos($R)*$Size * 1.5 + $OrgY moveSprite($CopyBee1[$i], $X, $Y) $n = $n + 10 if $n > 360 then $n = 0 $Size = $Size + 10 If $Size > 200 then $Size = 20 Endif Sleep(10) Next WEnd Func _exit() Exit EndFunc Link to comment Share on other sites More sharing options...
jpam Posted January 20, 2007 Author Share Posted January 20, 2007 WM_PAINT allready included in prospeed.udf Many thanks to Frank ! jpam Link to comment Share on other sites More sharing options...
jpam Posted January 21, 2007 Author Share Posted January 21, 2007 Udf Updated ! added MouseOverSprite added SetSpriteMovingMode added Image effect "Smooth" (Like blur but with mask picture) Screenshot bug removed (Wrong HDC) Wm_paint in udf ,thanks to Frank Better demo of backgroundscroll download @ post 1 Link to comment Share on other sites More sharing options...
jpam Posted January 23, 2007 Author Share Posted January 23, 2007 Udf updated ! added SetSpriteAnimMode() ; play sprite anim once or loop Starfield functions added Stars() added OptionStars() added StatusStars() added NoStars() have fun ! Link to comment Share on other sites More sharing options...
Will66 Posted January 24, 2007 Share Posted January 24, 2007 can prospeed.dll do image resize or resample? Link to comment Share on other sites More sharing options...
Lakes Posted January 24, 2007 Share Posted January 24, 2007 Spelling bee? Getting bees to spell is hard, there`s always the odd one or two that act up... expandcollapse popup#include <GUIConstants.au3> #include <Prospeed.au3> #include <Misc.au3> $dll = DllOpen("user32.dll") Opt("GUIOnEventMode", 1) Opt("MouseCoordMode",2) HotKeySet("{Esc}","_exit") $NumOfSpr = 91 $Spd = 5 $RectW = 780 $RectH = 390 $EndDim = $NumOfSpr - 1 $SprWd = 24 $SprHgt = 18 Dim $Copybee [$NumOfSpr] Dim $CopybeeX [$NumOfSpr] Dim $CopybeeY [$NumOfSpr] $Delay = 5000 $GUI = GUICreate("Prospeed",800,400,-1,-1,$WS_POPUP) GUISetState() Background(@scriptdir & "\Hintergrund.jpg", 0, 0) $Sprite1 = @scriptdir & "\Sprites.gif" $bee1 = sprite($Sprite1, 0, 0, $SprWd, $SprHgt, 4, 1, 6, -30, 15) For $i = 1 to $EndDim $CopyBee[$i] = copysprite($bee1) next For $i = 1 to $EndDim SetSpriteAnimMove($Copybee[$i], 1, 0, 0) SetSpriteAnimMove($Copybee[$i], 2, 0, 0) SetSpriteAnimMove($Copybee[$i], 3, 0, 0) SetSpriteAnimMove($Copybee[$i], 5, 0, 32) SetSpriteAnimMove($Copybee[$i], 6, 0, 32) SetSpriteAnimMove($Copybee[$i], 7, 0, 32) Next For $i = 1 to $EndDim SetmovingRectangle($Copybee[$i], 0, 0, $RectW, $RectH) next For $i = 1 to $EndDim SetSpriteMovingMode($Copybee[$i], 1) next For $i = 1 to $EndDim SetSpriteSpeed($Copybee[$i], $Spd, $Spd) Next For $i = 1 to $EndDim Movesprite($Copybee[$i], Random(-10, -20,1), 800) Sleep(10) next SetSpriteSpeed($bee1, $Spd, $Spd) Sleep($Delay) ;========================= A ======================== $i = 1 $X = 120 For $Y = 140 to 250 step $SprHgt MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $Y=140 For $X = 120 to 200 step $SprWd MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $X = 200 For $Y = 140 to 250 step $SprHgt MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $Y = 200 For $X = 120 to 200 step $SprWd + 2 MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next ;================================================== Sleep($Delay) ;======================= U ======================= $X = 230 + 10 For $Y = 140 to 250 step $SprHgt MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $Y=250 For $X = 230 + 10 to 300 + 10 step $SprWd MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $X = 300 + 10 For $Y = 140 to 250 step $SprHgt MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next ;================================================== Sleep($Delay) ;======================== T ======================= $Y = 140 For $X = 340 to 425 step $SprWd MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $X = 375 For $Y = 140 to 250 step $SprHgt MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next ;================================================= Sleep($Delay) ;======================== O ======================== $X = 450 For $Y = 140 to 250 step $SprHgt MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $Y=250 For $X = 450 to 525 step $SprWd MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $X = 525 For $Y = 140 to 250 step $SprHgt MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $Y=140 For $X = 450 to 525 step $SprWd MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next ;==================================================== Sleep($Delay) ;======================= I ========================= $X = 580 For $Y = 140 to 250 step $SprHgt MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next ;==================================================== Sleep($Delay) ;======================== T ======================= $Y = 140 For $X = 590 + 20 to 670 +20 step $SprWd MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next $X = 630 + 20 For $Y = 140 to 250 step $SprHgt MoveSprite($Copybee[$i], $X, $Y) $i = $i + 1 Sleep(1) Next ;================================================= Sleep(1000) For $i = 1 to $EndDim GetSpriteInfos($Copybee[$i]) $CopybeeX[$i] = $current_X $CopybeeY[$i] = $current_Y Sleep(100) Next While 1 For $i = 1 to $EndDim Movesprite($Copybee[$i], Random(-10, -20,1), 800) Sleep(200) Next Sleep(100) For $i = 1 to $EndDim Movesprite($Copybee[$i], $CopybeeX[$i],$CopybeeY[$i] ) Sleep(100) Next Sleep($Delay) WEnd Func _exit() Exit EndFunc Enjoy! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
jpam Posted January 25, 2007 Author Share Posted January 25, 2007 (edited) New Update ! added Extra options for LoadImage() to define new Width and height image will be resized to new Width and height added MouseButton() Capture mousebutton Clicks added SetMouseXY() Set mouse Position added SetMouseRect() Set mouse Rectangle Have fun! Edited January 25, 2007 by jpam Link to comment Share on other sites More sharing options...
jpam Posted January 25, 2007 Author Share Posted January 25, 2007 Small demo with psa.dllText effectshttp://home.wanadoo.nl/jpamvanderouderaa/psa.exehope people like it Link to comment Share on other sites More sharing options...
XxXFaNtA Posted January 25, 2007 Share Posted January 25, 2007 Damn! You are making a great job! Can't wait to see the first ArcadeGames in AutoIt Good Job Greetz, FaNtA /[center][/center] Link to comment Share on other sites More sharing options...
Nordwind Posted January 25, 2007 Share Posted January 25, 2007 Psa-Demo crashes without message. Testet on WinXP HE. Link to comment Share on other sites More sharing options...
Lakes Posted January 25, 2007 Share Posted January 25, 2007 Yep same here, crashes out... 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted January 25, 2007 Share Posted January 25, 2007 great work, one suggestion your first post links to multiple files, could you archive these for easier download.. thnks Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
jpam Posted January 26, 2007 Author Share Posted January 26, 2007 psa.exe install 3 files in your c:\temp prospeed.dll psa.dll fixed.clf look if they exist Link to comment Share on other sites More sharing options...
Lakes Posted January 26, 2007 Share Posted January 26, 2007 psa.exe install 3 files in your c:\tempprospeed.dllpsa.dllfixed.clflook if they existYes, all there. 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
jpam Posted January 27, 2007 Author Share Posted January 27, 2007 psa demo problem solved ! you can redownload @ post 1 Link to comment Share on other sites More sharing options...
jpam Posted January 28, 2007 Author Share Posted January 28, 2007 New Update !added CollideMore()added CollideUnknown()added SetBackAutoCollision()added GetSpriteX()added GetSpriteY()Demo SetBackAutoCollision() onlinehttp://home.wanadoo.nl/jpamvanderouderaa/backcollision.zipDocumentation in udf updatedHave fun ! Link to comment Share on other sites More sharing options...
XxXFaNtA Posted January 28, 2007 Share Posted January 28, 2007 WOW...now that was really cool Next I want to see a game! ^^ Greetz, FaNtA /[center][/center] Link to comment Share on other sites More sharing options...
_Kurt Posted January 28, 2007 Share Posted January 28, 2007 WOW...now that was really cool Next I want to see a game! ^^Me too! I am eagerly awaiting one really cool game that I know someone will make with all these functions. In the futur I hope to create a game myself Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Lakes Posted January 28, 2007 Share Posted January 28, 2007 I`m working on a simple Breakout game, but was having problems with collision detection, maybe the latest UDF will help... Of course if someone else is doing the same thing, let me know.... 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
XxXFaNtA Posted January 28, 2007 Share Posted January 28, 2007 Yeah BreakOut sounds nice Btw...You could also do some nice stuff if you've got a G-15 Keyboard from Logitech..You could Hook the VolumeWheel to use it to move the Paddle Greetz, FaNtA /[center][/center] Link to comment Share on other sites More sharing options...
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