Project Management

BlitzMax Forums/BlitzMax Programming/Project Management

ImaginaryHuman(Posted 2005) [#1]
Perhaps people can offer up some suggestions for how to manage larger projects in BlitzMax. I know some third party IDE's help with project management but how about users of the standard IDE? I found it easy enough to split a program up into several `Included` files, but the `Import` and `Extern` technique seems somewhat more involved. Perhaps someone can explain further or provide other suggestions as to how to manage larger projects. What tricks tips do you use?


FlameDuck(Posted 2005) [#2]
I know some third party IDE's help with project management but how about users of the standard IDE?
Prayer?


Wayward(Posted 2005) [#3]
I've split my project into separate bmx files; one per object.

Each source file needs to import the modules and source files it uses.

You can only use 'Framework' once in your entire project, so use it in the main source file you use to build, not in the source files you import.

My project looks something like this:
'Main.bmx'

Framework BRL.GLMax2D
Import "TBoard.bmx"
Import "TCursor.bmx"
...

'TBoard.bmx'

Import BRL.GLMax2D
Import "TTile.bmx"

Type TBoard
...

'TTile.bmx'

Import BRL.GLMax2D
Import BRL.random

Type TTile
...

'TCursor.bmx'

Import BRL.GLMax2D

Type TCursor
...

In each of the source files I import I use Public and Private sections to control which constants, globals, and functions are exported and which are not. (I'd really like to able to use private with fields and members, but that's another matter).

If you are using the default IDE you can have all your source files open in tabs and lock the build file (Menu>Program>Lock Build File) so you can edit one file but always build the main file. Note that you don't build the source files you import directly, you build the main source file only and let Blitz build the rest when it needs to.

I'm sure an IDE with built-in project management would be better, but I find it quite painless with the default IDE.


ImaginaryHuman(Posted 2005) [#4]
I didn't know about the option to be able to lock which file is the build file. Useful!

The part I'm a bit confused with is that if you import a file, how do you then make functions, variables, type, globals, consts that are defined elsewhere available to a given imported file? Where do references to those things need to be made? Do you use `Public` to achieve it? Where and how?