Should I use BlitzMax for my degree project?

BlitzMax Forums/BlitzMax Programming/Should I use BlitzMax for my degree project?

Czar Flavius(Posted 2009) [#1]
Hello everyone. I have to start my degree project, and I am really torn between using BlitzMax and C++(or#). Don't worry I'm still sticking with Blitz for games, but this project is important and I don't want to take any "risks".

First I'll briefly explain the project. It's an AI project to simulate a multi-agent system, where agents will need to compete and (more importantly) negotiate over limited resources. If anybody is remotely interested in the specifics of it I can provide them.. Something that I would definately like to add is multi-threaded support, so each agent can think on its own thread.

The main reason that I would like to use BlitzMax, is that I'm already comfortable with it, and know that I know enough to make a complete working application out of it. I've only ever made a few toy projects using C++, so I don't want to waste time going through all the trial and errors of learning how to use a language for something other than Tic Tac Toe. But I do have enough time if I want to, but need to decide soon. (I have 7 months starting now)

I know that BM now has multi-threaded support, but I don't know much about it (not having reason to bother before..) a quick search got me the original topic of its release.. and Mark's long list of "things to be improved/fixed". I really don't want to invest a lot of time into it to find there's something I can't do. So, is BM multi-threading reliable and complete now? And if there are any limitations, what are they in noob terms?

Last but not least, I'd like for the simulation to be usable by external programs, ie like a library. So anyone wanting to use a multi-agent system that needs to allocate resources... can plug in my abstract simulation, set up a few parameters/scripts for agent behavior, and away it goes. Not critical, but would be worth some brownie points I'm sure. Can BM do this easily, to integrate with say C++ code?

Of course there are other minor points, but these are less important.

BM - easy cross-platform, could make a fancy graphics representation of the simulation.

C++ - more people know about it, so could be more useful as a base for future projects (I'm vaguely concerned about the welfare of future students), would be a great opportunity to learn more C++, would be faster (dunno if speed would be a problem), if I find 3rd party code/libraries to use probably easier to integrate.

I can't think of anything else right now.. if anybody has any advice or suggestions I would appreciate your input :)


ziggy(Posted 2009) [#2]
For the explanation you're giving, I would recommend C#, vb.net or Java. Multithreading is ultra sexy great on the .net framework and on the Java VM. You can stick to .net 2.0 and make a mono-compatible development. BlitzMax is a great progamming language and could also be used very efficiently, but the current implementation of Threading on BlitzMax is just not as complete and flexible as the .net one (no delegates is a determinant thing IMHO).
Also C# has a very complete OO implementation, allowing proper encapsulation, multiple inheritance, properties, etc...
BlitzMax is best than C#, or Java in some scenarios (easier deplyments, no need for external libraries, built-in cross platform support, powerful graphics library, it's fast, etc etc...) but threading is not its strongest area, neither OS based GUI, except you use wxMax, but then again, the WindowsForms designer of Microsoft C# is a lot sexier nicer.


Czar Flavius(Posted 2009) [#3]
Thanks for your advice! I'm not sure if I'm impressed or worried that you use sexiness when judging programming languages ;)


Scienthsine(Posted 2009) [#4]
Blitzmax will probably be better for you since your more familiar with it, and it's alot easier to throw some quick graphics up there for an idea of whats happening. (Whether it be for debugging, or presentation.)

IMO multithreading is a bit of a waste for this. Since your 'agents' need to read and write shared data almost constantly, there is very little room for concurrent execution. If your 'thinking' takes _a lot_ of time, and I mean _A lot_, then allowing all threads to read data at once, think, then take turns writing could be beneficial.

I would go with something like bmax/c++ and lua. That is, code the simulation (rules, map?, resources, etc...) in the main language, and code the 'agents' as lua scripts. This allows you to easily add more/different 'agents' without the need to recompile. Also lua is pretty well suited to this sort of ai programming imo.

In the end, either one is a good choice... you can't really go wrong.

Edit> Ohh and I detest c#... so you won't get much from me there.


byo(Posted 2009) [#5]
My opinion is that you should consider C# only for web development. The Windows Forms editor is buggy and heavy-weight. I recommend Delphi 2009/2010 over Visual C# in this context.


Nate the Great(Posted 2009) [#6]
C++ is much more common but considering you are more familiare with bmax, if I were you, I would do it in blitz max. But if you feel comfortable with c++ then do it in c++ as it is much more populare/well known and you will get a lot more people that understand your code then and can make use of it.


ziggy(Posted 2009) [#7]
I would not considere Delphi 2009/2010 as a replacement of C# as byo says. Delphi is in most situations as good as C#, so I would use one or the other (not one instead of the other). Also, I would not expect to see a great diference on code complexity and performance. Delphi is a very very good programming language and it can access also all the .net framework if you want to take advantage of it.
That said, I would definitivelly never go the c++ route, unless you're writing an OS or a Driver... We're not in 1990, and we have much better alternatives (less complexity, less maintenance, better OO features and enough performance is what I would take into consideration). Also using a managed programming language is one of the best ways to easily get leak-free programs.


slenkar(Posted 2009) [#8]
if your teacher says its OK, use Blitzmax, its got the fastest development time of any language out there.


ziggy(Posted 2009) [#9]
if your teacher says its OK, use Blitzmax, its got the fastest development time of any language out there.
Except when you're developing regular GUI applicatoins, or working with threading. Then there are solutions that are several orders of magnitude faster and easier to work with, even syntax wise.


GW(Posted 2009) [#10]
I say go with Bmax.
Mutltithreading is only a benefit if your simulation update cycles are not aligned with the speed that you want update the visuals.
You know the language well and that is the biggest benifit of all.
I've done a lot of advanced Machine learning/A.I. projects in past for the financial industry and Bmax was the perfect choice for me. There was no real advantage for using c++ when compared to bmax. I was able to knock out projects and requested changes at faster rate than any other programing language.
As far as working with external languages, Bmax can make dlls easily. The docs give a good explanation of using bmax with cpp classes.
just my $0.02. Good luck.


dynaman(Posted 2009) [#11]
If your instructor is going to grade your code, not just your results, then I'd stick with C# or C++. No point in making an instructor go through the extra hurdle of grading something written in a language he does not know.