Hello, I just started learning Blitzmax and P_O told me people here are the best programmers he knows, and that you could give me good advice. I have no previous experience as a programmer, but i'm very interested in learning. I have two questions. When do I need to indent? I want to write readable code! And, when is the best time to comment on code? I'm a really messy person, so some advice will come in handy.
Here is the code product of P_O's lessons. Thanks in advance!
SuperStrict
Graphics(640, 480, 0)
Global ship_image:timage = LoadImage("ship.png")
Type ship
Field x:Int, y:Int
Method draw()
DrawImage(ship_image, x, y, 0)
End Method
Method move()
x = MouseX()
y = MouseY()
EndMethod
Method Update()
move()
draw()
End Method
End Type
Global my_ship:ship = New ship
my_ship.x = 10
my_ship.y = 20
my_ship.draw()
HideMouse()
While not keydown(key_escape)
Cls
my_ship.update()
Flip
Wend