the annoying game

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Nituvious
Addict
Addict
Posts: 1027
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: the annoying game

Post by Nituvious »

oops, this was for 4.40!! sorry! :oops: :oops:

[Edit] Here is the binary with the image. Also the path was changed for the image.
▓▓▓▓▓▒▒▒▒▒░░░░░
User avatar
Demivec
Addict
Addict
Posts: 4257
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: the annoying game

Post by Demivec »

Nituvious wrote:oops, this was for 4.40!! sorry! :oops: :oops:

[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). :)

Have you posted this before, it seems a little familiar?
Nituvious
Addict
Addict
Posts: 1027
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: the annoying game

Post by Nituvious »

No, this is the first "game" I've created. I think there are Flash games out there like this though.
▓▓▓▓▓▒▒▒▒▒░░░░░
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: the annoying game

Post by Kaeru Gaman »

Nituvious wrote:
Applications, Games, Tools, User libs and useful stuff coded in PureBasic
I do get "it". But I will refrain from posting anything else in this section.
I didn't want to drive you away...
Nituvious wrote:Here is the binary with the image. Also the path was changed for the image.
yes, this was what I meant.

If you put something into the showcase, it should be runnable.

it could be tiny, neat, work-in-progress or even deep alpha state with tons of bugs to find...

but it should not try to load an image from an absolute path and come without the image.
I felt jackassed when I F5ed your code.

-------------------------------------------------------------------------------

I adapted your first code with some on-the-fly-drawing, now that I know what the Image was meant to look like.
something like that in your first post would have been completely sufficent.

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
oh... and have a nice day.
Nituvious
Addict
Addict
Posts: 1027
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: the annoying game

Post by Nituvious »

Oh okay :)
The image was just something I doodled on gimp while I waited for a phone call haha.
And sorry for the first post. I take 100% fault for it. I will edit the original.
▓▓▓▓▓▒▒▒▒▒░░░░░
UserOfPure
Enthusiast
Enthusiast
Posts: 469
Joined: Sun Mar 16, 2008 9:18 am

Re: the annoying game

Post by UserOfPure »

Okay, because I obviously don't "get it", what's so show-casy about it? I click the face, and it moves away? So what? What's the big deal here? Do I expect too much for a showcase app?
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: the annoying game

Post by Kaeru Gaman »

in the german forums, the T&T section is named "Code, Tips & Tricks", so you can post little codes there.
here is no special showcase section for little codes here, so where else to put it?
oh... and have a nice day.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Re: the annoying game

Post by Joakim Christiansen »

UserOfPure wrote:Do I expect too much for a showcase app?
The forum section is called "Applications - Feedback and Discussion".
I see no problem here... he made a simple game and wanted to show it and get some feedback, and that is what this forum section is for! To show what you have made and get feedback.

So WHAT if it isn't much to showcase... we should treat everybody with respect even if they are new to PB and not as talented as some of us. If people don't like this "game" then they can just avoid replying here, the rudeness has to stop.
I like logic, hence I dislike humans but love computers.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: the annoying game

Post by Fluid Byte »

Applications != Sourcecode
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Re: the annoying game

Post by Joakim Christiansen »

Fluid Byte wrote:Applications != Sourcecode
Applications, Games, Tools, User libs and useful stuff coded in PureBasic
What he made would go under the game category and with or without source code it is still a "game".

Where else should he post this? (just asking)
Maybe a new forum section called "First creations showcase" should be made where users can post whatever without being ridiculed.
I like logic, hence I dislike humans but love computers.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: the annoying game

Post by Fluid Byte »

No one is "ridiculed". Stop being dramatic :roll:
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
epidemicz
User
User
Posts: 86
Joined: Thu Jan 22, 2009 8:05 am
Location: USA
Contact:

Re: the annoying game

Post by epidemicz »

Pretty impossible around 80 :D. Nice job man.
Image
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Re: the annoying game

Post by El_Choni »

Nituvious wrote:Hi, this is something I threw together in a few minutes. I wanted to see if I could divide by zero... (+Infinity!?)
Purebasic makes it possible! :D
El_Choni
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: the annoying game

Post by netmaestro »

...Wha..??? If El_Choni's back anything's possible!! :D :D :D
BERESHEIT
Perkin
Enthusiast
Enthusiast
Posts: 504
Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK

Re: the annoying game

Post by Perkin »

Anything is possible
Anagram: His noisy PB genitals :shock: :lol:
%101010 = $2A = 42
Post Reply