

[Edit] Here is the binary with the image. Also the path was changed for the image.
Thanks for the version tip, it functions much better. I'm still a little confused about why it malfunctions with v4.50b2 (well, it is a beta I guess).Nituvious wrote:oops, this was for 4.40!! sorry!![]()
[Edit] Here is the binary with the image. Also the path was changed for the image.
I didn't want to drive you away...Nituvious wrote:I do get "it". But I will refrain from posting anything else in this section.Applications, Games, Tools, User libs and useful stuff coded in PureBasic
yes, this was what I meant.Nituvious wrote:Here is the binary with the image. Also the path was changed for the image.
Code: Select all
Enumeration
#MWindow
#MLoadImage
#MImage
EndEnumeration
Global xScore.l,ImgX = Random(350),ImgY = Random(350)
Global sSeconds.l = 30000
; UsePNGImageDecoder()
; LoadImage(#MLoadImage,"C:\Code\Projects\Catchme.png")
CreateImage(#MLoadImage, 50, 50 )
StartDrawing(ImageOutput(#MLoadImage))
Box( 0,0, 50,50, $FFFFFF )
DrawingMode(#PB_2DDrawing_Outlined)
Circle( 24,24, 23, $000000 )
Circle( 24,25, 23, $000000 )
Circle( 25,24, 23, $000000 )
Circle( 25,25, 23, $000000 )
Circle( 16,16, 6, $000000 )
Circle( 16,16, 5, $000000 )
Circle( 33,16, 6, $000000 )
Circle( 33,16, 5, $000000 )
LineXY( 15,35, 34,31, $000000 )
LineXY( 15,36, 34,32, $000000 )
LineXY( 15,37, 34,33, $000000 )
StopDrawing()
OpenWindow(#MWindow,0,0,400,400,"Score: 0",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
ImageGadget(#MImage,ImgX,ImgY,50,50,ImageID(#MLoadImage),#PB_EventType_LeftClick)
Procedure sTimer()
sSeconds.l-10
Debug sSeconds.l
If sSeconds.l <= 0
ImgX = Random(350)
ImgY = Random(350)
ResizeGadget(#MImage,ImgX,ImgY,50,50)
If xScore >= 1
sSeconds = 30000/xScore.l+1
Else
sSeconds.l=30000
EndIf
EndIf
EndProcedure
Procedure sRandomMove()
sTimer()
Select EventType()
Case #PB_EventType_LeftClick
Delay(5)
xScore.l+1
ImgX = Random(350)
ImgY = Random(350)
SetWindowTitle(#MWindow,"Score: "+Str(xScore.l))
ResizeGadget(#MImage,ImgX,ImgY,50,50)
If xScore >= 1
sSeconds = 30000/xScore.l+1
Else
sSeconds.l=30000
EndIf
EndSelect
EndProcedure
Repeat
EventID = WaitWindowEvent(10)
sRandomMove()
Until EventID = #PB_Event_CloseWindow
The forum section is called "Applications - Feedback and Discussion".UserOfPure wrote:Do I expect too much for a showcase app?
Fluid Byte wrote:Applications != Sourcecode
What he made would go under the game category and with or without source code it is still a "game".Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Purebasic makes it possible!Nituvious wrote:Hi, this is something I threw together in a few minutes. I wanted to see if I could divide by zero... (+Infinity!?)