[bmx] Simple Rectangle Drawing by IKG [ 1+ years ago ]

Started by BlitzBot, June 29, 2017, 00:28:38

Previous topic - Next topic

BlitzBot

Title : Simple Rectangle Drawing
Author : IKG
Posted : 1+ years ago

Description : My first BlitzMax Program...

Code :
Code (blitzmax) Select
Graphics 640,480,0

ShowMouse()

SeedRnd MilliSecs()

While Not (KeyHit(KEY_ESCAPE))

'if right mouse button is down, draw rectangle
If MouseDown(1) Then
SetColor(Rnd(1,255),Rnd(1,255),Rnd(1,255))
DrawRect(MouseX(),MouseY(),10,10)
EndIf

'press spacebar to clear screen
If KeyHit(KEY_SPACE) Then Cls()

Flip()

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