Anyone here familiar with Blitz3D at all?

Started by
13 comments, last by Eelco 12 years, 7 months ago
Hi everyone!

I'm new here (actually I was semi-active a few years ago under a name I totally forget, so I started this account) and I was wondering if anyone here is familiar with the Blitz3D programming language.

I've been programming fairly steadily in DarkBASIC Professional for a few years now. While I've never successfully finished a project, I've gotten close a few times and have a brilliant idea that I want to make happen eventually. However, The Game Creators (makers of DB) seem to not care much about DarkBASIC anymore and seemingly have stopped updating it. It hardly works on Windows 7 anymore, which is a shame because it's a fairly good language. Blitz3D works fine, however, and seems to be generally better in every aspect, especially speed!

I've known of Blitz3D for a few years now, and have the demo version installed on my computer. However, I find the syntax to be a little more difficult to grasp, especially since DarkBASIC refers to 3D objects with numbers as opposed to Blitz's way of naming them. For example, in DarkBASIC, generating a series of spheres would be as simple as this thanks to using numbers....


[source]For newSphere=1 to 100
Make Object Sphere newSphere,2
Position Object newSphere, xPos,0,0
Inc xPos,4
Next newSphere[/source]

Deleting objects is also easily done thanks to numbers. Just add a "delete object newSphere" line in the For-Next loop and it works without a hitch. However, since Blitz operates like this...

sphere=CreateSphere()

...then there's no way of easily making multiple objects within a for-next loop since they (the loops) use numbers, which means deleting multiple objects is also a pain....

One reason I love for-next loops is that they are INCREDIBLY useful for saving many objects positions out to a file, like for a level file. I can do this in DarkBASIC easily thanks to its numerical system, but in Blitz I have no idea how I'd do that. I was hoping that if there was anyone on here who was familiar with Blitz to answer these riddles for me, they would post here and give me some examples because I can't find any on the actual Blitz forums. And since I only have the demo version, I can't register on their forums to ask the questions over there directly!

So my question is this; how do I modify the DarkBASIC code posted above to run in Blitz3D and do the same thing without using numbers, but names for objects instead?

Thanks to any and all who respond!

My website! yodamanjer.com
My development blog!

Follow me on Twitter! [twitter]jwg1991[/twitter]

Advertisement
Ive learned a lot of programming using blitz, but i dont think im falling victim to the 'im too cool for that now' syndrome when I say I dont think there is any good reason to be using any of these tools nowadays.

For instance, have you considered using pygame? Its free, well documented, and has all the other goodies that come with python, such as an active community, and a feature-rich language.
No, I'm not interested in any other game making tool right now (except XNA), I'm just interested in learning Blitz3D so that I can develop my game quickly.

So is there anyone here who is familiar with the language?

My website! yodamanjer.com
My development blog!

Follow me on Twitter! [twitter]jwg1991[/twitter]


No, I'm not interested in any other game making tool right now (except XNA), I'm just interested in learning Blitz3D so that I can develop my game quickly.





What makes you think learning python is more of a pain that learning Blitz3D (which it doesnt seem like you know the basic of yet anyway)? The differences between elementary python syntax and both basic dialects is entirely trivial; most work is in familiarizing yourself with the relevant libraries. But since in both cases you are using some kind of high level opengl layer, the differences there should be minor
I just prefer learning Blitz3D over other languages at the moment. I've tried Python, I've never really liked it and the game development options with it aren't as good as I prefer. I've done my research, and I want to learn Blitz3D because it's fast to develop with, it's already similar to a language I'm fluent in (DarkBASIC), and it's a really impressive program. I'm just stuck with a couple of things in it, which I listed in my first post.

I'm starting to lose hope about asking Blitz programming questions in forums. People always end up telling me how much better another game development tool is, which is a little frustrating, I will admit. I do appreciate that people are trying to inform me of every option out there, but believe me, I've looked, I've downloaded demos, played with lots of things and I've discovered I really like Blitz over everything else. So please, if you know how to answer my question in my first post, I'd really appreciate an example, or a link to a tutorial you know about that covers it in some form. :) Otherwise, I don't know how to find the information I'm looking for, as I've done a ton of Googling and haven't found my answer that way.

My website! yodamanjer.com
My development blog!

Follow me on Twitter! [twitter]jwg1991[/twitter]


I'm starting to lose hope about asking Blitz programming questions in forums. People always end up telling me how much better another game development tool is, which is a little frustrating, I will admit.

I understand your frustration, but there is some truth to what people suggest. Now, I don't know much about either DarkBasic or Blitz3D. But your initial question shows a pretty fundamental lack of familiarity with respect to even the most basic data structures, which would be considered elementary knowledge in most other mainstream languages. For your specific problem, the obvious solution is to push individual sphere objects into a vector/array or a list (depending on language and usage scenario) and then iterate over that container by indices, iterators, for_each type constructs or similar. Or you could even consider the use of some type of simple scenegraph with recursive traversal. It looks like DarkBasic shielded you from these basic, yet extremely important aspects of programming by wrapping them away in the language.

If you want to progress with programming, you will have to learn about these things instead of relying on specialized languages transparently doing them for you. If you want to design games, then such a domain specific language may be the right choice for you. People here assumed the former. If this assumption is correct, then going with a more mainstream language is definitely a good idea. If only for the much larger user base being able to provide you with much better help if you run into a problem.

Personally, I would suggest looking into C# with XNA, but Python is also a good choice.
Part of the reason for recommending these alternatives is the fact that they have much bigger and more active communities. In my experience, the documentation of many python libraries can be flaky, but if you have a specific question, its not hard to find help. It takes a bit of a mental switch to go from documentation to mailing list; the lack of instant results makes for a somewhat different workflow, but you get used to it.
Your question is not entirely clear to me, but I think what you are looking for is an array (of object handles).

At the risk of annoying you with things you didnt ask about, ill have to add though that the fact that languages such as blitz and DB dont even have support for proper container types, is the reason you are stuck with this sort of question in the first place. No, transitioning from a well integrated environment like blitz isnt going to be fun in the short run (ive been there), but if you set out with a good toolchain its not going to be that bad. You mention wanting to put together something quick; but i doubt you are doing this for a moneyed deadline, but rather for the fun experience. If so, download a good IDE like spyder and give it another try; if you are focussed on 3d; panda3d looks excellent to me, though ive never worked with it.
Thanks guys! I actually found the solution buried in the Blitz forums and it did involve an array. Which I definitely should have thought of...

But, you both are absolutely correct in that DarkBASIC most definitely shielded me from some pretty fundamental things about programming. Honestly, the difference from DB to Blitz has been pretty noticeable, especially since Blitz has more of a C-like syntax than DB, but it still is very limiting from what one can do with a language like C++.

I actually just picked up a book on C# programming, so hopefully that will help me out a lot as well! Especially with XNA. :)

Actually, does anyone have any recommendations for books on programming with XNA?

My website! yodamanjer.com
My development blog!

Follow me on Twitter! [twitter]jwg1991[/twitter]

I just now noticed I posted this in the Lounge when I meant to post it in General Programming. Oops!

Anyway, sorry for the bump, but I have this to say.

The more I study Blitz, the more things I find that I like and dislike. The Blitz documentation is very good, a lot better than DarkBASIC's because they actually take the time to write well-structured examples to demonstrate the command in action. A lot of the Blitz language is very similar to C/C++, which is good, except that it can be very confusing to someone who's trying to learn both C# and Blitz (me). I actually studied C++ a little last year and remember some of it, and the fact that Blitz is kind of structured around C is reminding me of that adventure.

There's also no easy way to determine if an entity (mesh, image, etc.,) exists or not, because Blitz apparently doesn't delete all info associated with en entity, it just removes the reference handle and that's it. So even if you try to determine if a just-deleted object exists (say, for example, a coin the player has to pick up), it can cause a crash because the info is still there in memory. This is what I've learned from reading through the Blitz forum for days, at least.

So, certainly in some ways, Blitz is better than DarkBASIC, and then in other ways it's worse.

I'm just going to start studying C# for an hour or two a day and hopefully get a better grip on programming!

Thanks for dealing with my stubborn nature to move on from BASIC derivatives and push me in the right direction guys! :)

My website! yodamanjer.com
My development blog!

Follow me on Twitter! [twitter]jwg1991[/twitter]

I disagree with a lot you said. Blitz3D and all other Blitz Research LTD products have dedicated forums in the official website, and almost no question goes unanswered there.
If support is so important to you, purchase a copy of Blitz3D to get a serial number that gives you access to the forums.

There is no problem in learning C#, Blitz3D and other languages concurrently. In the end you are dealing with similar abstractions and logic, and what you learn in one will most likely be useful in another.

In my opinion you are wrong in saying that BASIC derivatives are equivalent of going into the 'wrong direction', as that is subject to each person's goals:

  • Learning logic without being overwhelmed with syntax;
  • Prototyping 2D and 3D gameplay without having to worry about complex libraries and low-level engine setup;
  • (Most important reason in my opinion.) Building a demo game showcasing your portfolio in case you're an artist, sound designer, musician or animator.

Best of luck in your studies.

This topic is closed to new replies.

Advertisement