Quick Blitz Questions

BlitzMax Forums/BlitzMax Programming/Quick Blitz Questions

Drey(Posted 2005) [#1]
Hey, I own Blitz3D now and I'm wondering how other owners of Blitz3D feel about BMX. I can't use the demo because i DLed it already, but didn't end up having the time to use it..(30 day limit..lame) So when i finally had some freetime to mess around with it...the time expired.

I love pointers. When I read that BlitzMax has pointers for variables and functions..i was pretty excited. How is that working out? Have anyone used them with arrays?
You can create a pointer for Modules right?

From what i've seen, it looks like you can impliment C++ libraries into BMX and it'll understand. So does that mean you could say get DirectX library and it work?

Does the OpenGL have shader support?

Did he improve the sound library so you can pause and play sound. Understanding rewinding effect might be asking for too much. I mostly did graphics programming in Blitz3D, but it seemed like the sound didn't have an option of controlling where you want the sound wave to start or end or gettin info on where the sound is currently(like half way through or something). Can you now? Can you say "PlaySound(Sound, Millisecs)"

Does it have pretty solid documenting on OpenGL commands?

What IDE have you found to be solid for BlitzMax/Blitz3D?

I use windows XP.

Thanks Guys.


kfprimm(Posted 2005) [#2]
I don't own Blitz3D but i do own BlitzPlus. I find BlitzMax much much much more enjoyable to program in than in BlitzPlus.

I love pointers. When I read that BlitzMax has pointers for variables and functions..i was pretty excited. How is that working out? Have anyone used them with arrays?
You can create a pointer for Modules right?

Dont use them.

From what i've seen, it looks like you can impliment C++ libraries into BMX and it'll understand. So does that mean you could say get DirectX library and it work?

BlitzMax can link to C++ libraries but its a little bit of work and can make your code a bit messy. It also has a DirectX module, though I havent attempted to use it.

Does the OpenGL have shader support?

Not sure.....but BlitzMax only has support for OpenGL 1.1 at this point.

Did he improve the sound library so you can pause and play sound. Understanding rewinding effect might be asking for too much. I mostly did graphics programming in Blitz3D, but it seemed like the sound didn't have an option of controlling where you want the sound wave to start or end or gettin info on where the sound is currently(like half way through or something). Can you now? Can you say "PlaySound(Sound, Millisecs)"

The sound has been updated a bit in the next update(1.12). No, you can't contol where the track starts from.

Does it have pretty solid documenting on OpenGL commands?

Absolutely no documentation on OpenGL whatsoever.

As for an IDE, i just use the standard IDE.


Robert(Posted 2005) [#3]
I love pointers. When I read that BlitzMax has pointers for variables and functions..i was pretty excited. How is that working out? Have anyone used them with arrays?
You can create a pointer for Modules right?


Arrays, Strings and any custom types are always passed around by reference (ie. they use a pointer behind the scenes), so it is not necessary to use pointers with them. This is handy for some functions though as you can use them to return multiple results from a function.

A module is not like a custom type, it is basically a collection of existing code. This is somewhat like the old 'include' command, except that the code in the modules is only compiled once and thereafter linked into your project's code. BlitzMAX can generate very small executables as a result (I think the smallest is something like 60KB) if you don't include modules that your code doesn't need.

Function pointers do have their uses, although I haven't had to use them that much. In languages like C they are useful for designing programs in an object-orientated way, but BlitzMAX has much of that built into the language.

Does it have pretty solid documenting on OpenGL commands?


Documentation for OpenGL is widely available, so BlitzMAX doesn't provide its own documentation for them. There is a large set of BlitzMAX OpenGL tutorials available on the forums (in the showcase forum I think).

Does the OpenGL have shader support?


Not yet, but Mark was using them in the 3D module according to a worklog he posted some time ago.

Did he improve the sound library so you can pause and play sound. Understanding rewinding effect might be asking for too much. I mostly did graphics programming in Blitz3D, but it seemed like the sound didn't have an option of controlling where you want the sound wave to start or end or gettin info on where the sound is currently(like half way through or something). Can you now? Can you say "PlaySound(Sound, Millisecs)"


The sound support is fairly basic in the available version of BlitzMAX, but I am hopeful that it has been improved in the upcoming 1.12 version.


Drey(Posted 2005) [#4]
Modules work like DLLs right? I'm just talking about creating an Object and grabing it's address something like in C++.


Robert(Posted 2005) [#5]
Modules work like DLLs right? I'm just talking about creating an Object and grabing it's address something like in C++.


Modules and DLLs are similar yes - both are just libraries of compiled code. The difference is that DLLs can be loaded and unloaded at runtime. Modules are "attached" to the rest of your code when BlitzMAX builds your executable (ie. at compile-time)
You cannot "grab a pointer to a DLL" either.
You CAN however get a pointer to a function inside a DLL, or a pointer to a function inside a module.

In terms of creating an object and getting its address, there really is very little need to do this in BlitzMAX. For example, if you have this BlitzMAX code to create a list:

myListObject:TList=new TList


Then 'myListObject' is actually just a reference (ie. a pointer) to the list object. If you pass it to a function, all that actually gets passed is the address of the list object in memory. This also applies to strings and arrays in BlitzMAX.

The advantage of course over C++ is that it is harder to make silly mistakes in BlitzMAX.


Drey(Posted 2005) [#6]
haha, i knew you can't get a pointer to a DLL but you pretty much answered my question. I was just deciding if i should go back to C++. Like you said tho, silly mistakes are fewer in BMX, but i have C++ right now and it is free for me. I haven't programmed in it for a while though. I'm a college student right now and I don't have alot of time to be messing around with syntax issues and learn API. i'm just interested in game programming in the since of graphical, sound, collision and AI programming. I'll learn how to work Windows APIs in my classes i'm guessing.


Drey(Posted 2005) [#7]
(cont..sorry) I just wondering if it's worth it to me to buy this language or just get serious with C++ already since i don't want to make games as a hobby. I'm a Computer Science major at Cal Poly Pomona.

Thanks for time guys.


REDi(Posted 2005) [#8]
You could always download the 30 day trial of blitzmax and try it out for yourself.


FlameDuck(Posted 2005) [#9]
(cont..sorry) I just wondering if it's worth it to me to buy this language or just get serious with C++ already since i don't want to make games as a hobby.


I would definately go for BlitzMAX. C++ is too rigid a language. As a comp.sci mayor, you must have read Frederick P. Brooks' "No silver bullet" essay, in which he describes the difference between accidental and essential complexieties in software development.

BlitzMAX as a language, by far reduces the accidental complexity of a program, compared to it's C++ counterpart.

However, C++ has mosr professional IDE's, that help reduce accidental complexity in C++.

Once BlitzMAX gets an Eclipse class IDE, it's going to rule the world. Litterally.