Retrogamecoding(.org) > Examples

DoodleBot (PulsarLua)

<< < (2/2)


--- Quote from: Rick3137 on May 14, 2016, 06:41:11 pm ---      Yes, I could use a little help getting into that website.. I guess I need to study on centering my graphics. Different computer screens have a center point at a different coordinate.
      I think that the newest version works faster than what I had been using.

--- End quote ---

Yes, and my snapshot may have made the centering look worse than it is (not bad for someone new to SmallBASIC).

SmallBASIC is a little different with screens, you only get one choice that is xmax by ymax pixels big (best to use the editor and output screen in a maximized Window in Windows).

xmax and ymax are built in constants like ScreenWidth and ScreenHeight always available to your program.

So the center of the screen is simply xmax/2, ymax/2
I use constants cx=xmax/2 : cy=ymax/2 because I use them so much.

I try to write programs pretending I don't know what xmax and ymax are, so they will fit any SmallBASIC's user screen.

Rick, check your messages.


[0] Message Index

[*] Previous page

Go to full version