Official BlitzPlus user's BlitzMax Q&A Thread

BlitzPlus Forums/BlitzPlus Programming/Official BlitzPlus user's BlitzMax Q&A Thread

skidracer(Posted 2004) [#1]
Due to popular demand, this is the official thread for BlitzPlus users wanting to ask questions about BlitzMax. If you haven't already done so, please read Si Harrison's excellent FAQ in BlitzNews issue 13 before posting here.


WolRon(Posted 2004) [#2]
I have a BlitzPlus app that is causing me grief due to the 32bit floating point limitation of B+ and B3D. I am very interested in BMax's additional support for 64bit floats.

What I'm unsure of, is what kind of GUI support is available in BM. I've heard that there is a convertor for .bb files to .bmx files but how does it handle B+ GUI elements/commands?

Is there a built-in/3rd-party/future-add-on version of the B+ GUI?


skidracer(Posted 2004) [#3]
We have a BlitzPlus module in development which is being used to develop the Windows BlitzMax IDE (written in BlitzMax), I can't say whether it will be available on release or if it will be free etc.

There is also a linux compatible version (wrapper features same BlitzPlus command API) using the fltk library which will hopefully make many BlitzPlus apps cross platform, again the BlitzMax beta IDE for Linux uses this module so it is also nearing a releasable version also.


WolRon(Posted 2004) [#4]
Also, what's a typical exe file size? Does this depend on which 'modules' you include?

And what/how many modules are standard? I know you can create additional ones, but what kinds of ones are standard?

Oh yeah, is their a .zip version of the demo? I'm really not interested in installing Stuff-it (or whatever it's called).


rdodson41(Posted 2004) [#5]
In BMX, how would you do something similar to a For p.player=Each player sort of thing?


aab(Posted 2004) [#6]
Bmax has low level pointer handling (Me Love), although i havent used Bmax yet (cant) at all, you might have to set up the loops yourslef.

Heres a good tutorial on how to do it with C++.
You can apply the same logic and rules over. You can of course do th same in Blitz Plus (if your mad)::
http://www.gamedev.net/reference/articles/article2041.asp

Edit: OK here how you actually do it:
http://www.blitzbasic.com/Community/posts.php?topic=41179


rdodson41(Posted 2004) [#7]
For s:source=EachIn typelist
	Print s.list
	For tmp$=EachIn s.list
		Print tmp$
	Next
Next

Whats wrong with this code? I get a "ForEach must be used with a string, array, or appropriate object" error at the For tmp$... line.


skidracer(Posted 2004) [#8]
you need to declare s.list as
   Field list:TList=new TList

and of course post in the correct forum even if they are a bit busy at present...


rdodson41(Posted 2004) [#9]
I noticed there are no GetEnv$() and SetEnv() commands in BMX as there were in B+. What would you use to get environmental variables?


WolRon(Posted 2004) [#10]
Please reply to my latest questions above...


skidracer(Posted 2004) [#11]
GetEnv and SetEnv along with all StdC calls are available just currently undocumented.

exe sizes are based on which modules are included in your final build, helloworld.exe is currently 37K and a fullscreen 2d sample that includes a pngloader and the sound system is 240K.

The current modules in BlitzMax are listed here:

www.blitzbasic.com/modserver

Hopefully the release version for Windows and Linux is not too far away at which time a free demo with full docs will be available.


rdodson41(Posted 2004) [#12]
GetEnv and SetEnv don't seem to work.


skidracer(Posted 2004) [#13]
Try GetEnv_ and SetEnv_


Russell(Posted 2004) [#14]
[re-posted from another thread]
I'm seeing mention of a Win32 BlitzMax beta, but don't see where this can be downloaded from. Is this only for beta testers?

Also, how come I can not post on any of the forums except this one? Kind of a bummer if I have a question about Bmax (I am forced to post here, instead of the proper forum).

Russell

p.s. Does Bmax seem to be worth the wait?


CS_TBL(Posted 2004) [#15]
Well, the forum sucks a lot lately .. where's the general and offtopic eh? Since everyone seems to move th Blitzmax, it's rather quiet here.. not exactly like the xmas-spirit :\

o_O

General: http://www.blitzbasic.co.nz/Community/topics.php?forum=10
offtpic: http://www.blitzbasic.co.nz/Community/topics.php?forum=1


Mr Brine(Posted 2004) [#16]
Does what sort of audio commands does BlitzMax come with, is the same as blitz+?

Thanks


VIP3R(Posted 2004) [#17]
Hi Brine,

Only very basic sound controls are in at the moment: play, stop, pause, resume, loop, pan, depth, rate.

It doesn't use Fmod like the earlier blitz products, but there is a bonus - you can now build audio modules based on Fmod and many other sound libraries including the open source libraries available. It will be just a matter of time before several new audio modules are made, with all the bells and whistles.

[edit] In fact I just noticed an Fmod beta module is already well on it's way :)


Russell(Posted 2004) [#18]
That's good to know (about the FMOD module - will it have the licensing issues of the normal FMOD? Audiere may be a better choice, though, for licensing reasons), but does anyone know the answer to the BlitzMax Win32 beta question? Who has this program? Is it available for download in beta form?

I guess I can wait a little bit longer for the win32 release... :(

Russell

p.s. Almost forgot: If someone is, in fact, working on a FMOD module, I sure hope they finally add the ability to load the whole sound\song into memory in the same way that the LoadImage() works now... Never could figure out why this wasn't done in Blitz, Blitz3D or BlitzPlus...


skidracer(Posted 2004) [#19]
I don't understand, you use LoadSound if you want it in memory and you use PlayMusic if you want to stream the audio file from disk?

As for the win32/linux beta versions, they are only available to registerred BlitzMax users, we aren't promoting them because it is not our custom to charge people for beta versions (hence you need to purchase the MaxOSX version to be eligible to test the win32 beta version).


VIP3R(Posted 2004) [#20]

about the FMOD module - will it have the licensing issues of the normal FMOD?


Yes, I think that would be likely. As you stated Audiere would be a wise choice if licensing costs are a problem with Fmod. I'm quite confident that a module will be attempted for the Audiere library too at some stage.


Never could figure out why this wasn't done in Blitz, Blitz3D or BlitzPlus


I recall something about the blitz license only allowed certain functionality. If those products had all of the Fmod features included then the license would have cost BRL (and consequently us) much more money.


rdodson41(Posted 2004) [#21]
In BMX, is there anyway to close down the I/O console from the program, therefore eliminating the need to manualy close it down? Plus, I would like to know if when prgms are compiled into executables, does the I/O console appear before you call print or input as it does when you are working on you code?

[Edit] Also is there a way to clear the I/O console?

Any help is appreciated.


Russell(Posted 2004) [#22]
Sooooooo is anyone going to answer the question about the Win32 beta, or is it a taboo subject? ;)

@skidracer:
I don't understand, you use LoadSound if you want it in memory and you use PlayMusic if you want to stream the audio file from disk?



LoadSound doesn't 'load' music mods, AFAIK, so there is no option to put mods in memory so that they play immediately rather than after a 'hiccup' (or worse if it's on a CD). Ideally, I'd like to associate a mod with a handle so that I can play it whenever I want.

@VIP3R:
I can't imagine that this wouldn't be allowed by Mark's FMOD license, but I wouldn't doubt it, either ;) It could always be loaded into a ramdisk, so the system wouldn't know the difference... but this is not the ideal solution. Also, VIP3R, I see your name in the Win32 section of the BitzMax forum. Can you tell us (me) if the beta of the Windows version comes with the Mac version? Because if it does, then I'll buy the dang thing right now!

Russell


Lattyware(Posted 2004) [#23]
Can you tell us (me) if the beta of the Windows version comes with the Mac version

Yes, I don't have it but it does - People have talked about it on blitzcoder


VIP3R(Posted 2004) [#24]
@Russell: Yep, buying the MacOS version gives you full access to the Win32 and Linux versions too :)


Russell(Posted 2004) [#25]
Thanks VIP3R... I knew about the 'all license' deal, but didn't know that the beta of the Windows version was already available since it's not mentioned on the BlitzMax page!

Ok, if I get the beta Win32 BMax if I buy the Mac version, then I will do so as soon as this is confirmed by someone.

Thanks for answering the question, VIP3R. I was beginning to think I was losing my mind!

Russell

p.s. I downloaded the demo so I could have a look at the manual(s) (8.5MB for the demo, and 12.5MB for the Windows version of Stuff-It: That's 21MB so I can look at the manual!). Anyways, it seems unfinished to me (especially the user manual, which is embarrassingly short). I assume someone is hard at work correcting this? This is extremely important! Thanks again...

p.p.s. It was rumoured that BRL was going to out-source the IDE to Protean or Brain, etc. Anyone know why this wasn't done? I think it would have been great to have one of those two as the 'official' BMax IDE.


WolRon(Posted 2004) [#26]
p.p.s. It was rumoured that BRL was going to out-source the IDE to Protean or Brain, etc. Anyone know why this wasn't done? I think it would have been great to have one of those two as the 'official' BMax IDE.

Already stated above:
skidracer (Posted 2004-12-17 19:24:59)

We have a BlitzPlus module in development which is being used to develop the Windows BlitzMax IDE (written in BlitzMax), I can't say whether it will be available on release or if it will be free etc.

Looks like they want a Max written IDE so that it can be user-customized.


VIP3R(Posted 2004) [#27]
@Russell: The Win32 beta version is available to you as soon as you purchase the MacOS version, you can download the beta once you register BlitzMax as a product in your user profile. Consider it confirmed :)


Russell(Posted 2004) [#28]
Hurray! I think BRL should mention this on the BMax page (that the beta of the Win32/Linux version(s) is\are already available, although not officially released as yet).

Anyways, thanks VIP3R!

Here I go to the purchase page with my handy, dandy credit card!

Russell


Kevin_(Posted 2004) [#29]
I don't have BlitzMax but I would be grateful if 'you people in the know' could answer the following....

Can you pass an entire array to a function?

e.g.

Function Sort(N[])
; do the sorting
Return N[]
End Function


WolRon(Posted 2004) [#30]
What's the point? In Blitz(3D & Plus), arrays are global.

Anyways, why would you want all of the overhead associated with passing the entire array?


rdodson41(Posted 2004) [#31]
In BMX, is there anyway to close down the I/O console from the program, therefore eliminating the need to manualy close it down? Plus, I would like to know if when prgms are compiled into executables, does the I/O console appear before you call print or input as it does when you are working on you code?

Also is there a way to clear the I/O console?

Any help is appreciated.


Kevin_(Posted 2004) [#32]
What's the point? In Blitz(3D & Plus), arrays are global.


Please read my question carefully. I never mentioned Blitz3D or BlitzPlus. Also, I did ask for people 'in the know' to reply to my question - Not someone like you asking another question as to why I would need it.

Anyways, why would you want all of the overhead associated with passing the entire array?


For a very good reason, otherwise I woudn't have asked.


skidracer(Posted 2004) [#33]
Yes you can pass and return arrays in BlitzMax and they no longer default to being Global.

The win32 beta version currently links apps as commandline applications by default so currently a console is openned and stays open, I'm sure this will be rectified b4 release.

Clearing the IO Console? I would have thought there is a ctrl code that is equivalent to home but not sure about that.


Kevin_(Posted 2004) [#34]
Skidracer, thanks very much. It seems BlitzMax is coming into line with other traditional languages which I'm really happy about.


rdodson41(Posted 2005) [#35]
Say you have two arrays, a[] and b[]. How would i make array c[] be the concatination of arrays a[] and b[]. Basically...

a[0]=5
a[1]=6

b[0]=7
b[1]=8

What would i say so that values of array c (which had a length of 4 now) are 5 6 7 8? the concatination of the two arrays a and b?