Total newb working on a map building engine

Blitz3D Forums/Blitz3D Beginners Area/Total newb working on a map building engine

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

1) Your comments mostly are useless: "set coordinates x and y to 0 and make it a global variable" is pseudocode for "global x=0 : global y=0". Comments should describe, _why_ you do something, not what you do.
IMHO.

2) Your *map-variables are indeed not global and should either be passed (as an array or so) or be global. For CreateWorld(), they all are just 0. EDIT: I see you corrected this.

3) Your "Select y : Case 675" should be replaced by a while-loop over the whole function ("While y < 675"), until the DrawMapTile(). Your program just adds 64 to y once and exits. Select/Case isn't just the right thing.

4) LandArea doesn't have to be Global.

5) It's little bit crude calling StartWorld() inside CreateWorld() ...

6) "Select x : Case 768" - should be an If-statement.

7) With 3) in mind, you don't have to call CreateWorld() inside DrawMapTile(). It returns automatically.