January 26, 2021, 06:09:42 AM

Author Topic: [bmx] Simple Rectangle Drawing by IKG [ 1+ years ago ]  (Read 491 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bmx] Simple Rectangle Drawing by IKG [ 1+ years ago ]
« on: June 29, 2017, 12:28:38 AM »
Title : Simple Rectangle Drawing
Author : IKG
Posted : 1+ years ago

Description : My first BlitzMax Program...

Code :
Code: BlitzMax
  1. Graphics 640,480,0
  3. ShowMouse()
  5. SeedRnd MilliSecs()
  7. While Not (KeyHit(KEY_ESCAPE))
  9.         'if right mouse button is down, draw rectangle
  10.         If MouseDown(1) Then
  11.                 SetColor(Rnd(1,255),Rnd(1,255),Rnd(1,255))
  12.                 DrawRect(MouseX(),MouseY(),10,10)
  13.         EndIf
  15.         'press spacebar to clear screen
  16.         If KeyHit(KEY_SPACE) Then Cls()
  18.         Flip()
  20. Wend

Comments :

Yan(Posted 1+ years ago)

 ...And why would this is useful to other people?

CS_TBL(Posted 1+ years ago)

 It obviously isn't.. I mentioned code-archives-abuse before in some topic somewhere. The CA should be for useful ready-made and fully tested code, extending functionality, preferably as modular as modular can be. Also one who submits has to be convinced that the posted code is actually a real addition that ppl didn't have yet. A real solution to a possible potential problem, so to say..Some CA-QA would be at place I'd say..

IKG(Posted 1+ years ago)

 Well then get it deleted :|I really don't care. It was helpful to me, so I added it. There's not nearly enough beginner source code out there. Where does it say this area is only for advanced coders such as you two?But like I said, get it deleted since I can't do anything about it now. I'm sorry I don't read every post on the forums.

CS_TBL(Posted 1+ years ago)

 Beginner-code is better showcased inside a beginner tutorial, in the tutorial section of the specific blitzversion ofcourse.CA is not advanced or for 'big code' perse; some small functions like 'Sector' (to read char-seperated parts of a string) are extremely handy, and are not present in blitz by default. That's what the CA is here for.So, it's not as if your code is bad in itself, it would make a good beginner-tutorial.. it's just not for the CA. :)

IKG(Posted 1+ years ago)

 So can a moderator please delete this?

adba(Posted 1+ years ago)

 I Like it ;-).. a perfect sample code to show someone how easy it can be to develop a programm in BMax.

IKG(Posted 1+ years ago)

 Thanks adba, that was the point of this :)


SimplePortal 2.3.6 © 2008-2014, SimplePortal