Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
BlitzMax, Cross-Platform OO BASIC, Is Free and Open Source (blitzbasic.com)
82 points by dragonbonheur on Jan 31, 2016 | hide | past | favorite | 37 comments


Blitz3D is Free and Open Source too.

And Monkey-X is mostly Open Source. Soon to be fully Open Source after MX2 is out (http://www.monkey-x.com/Community/topics.php?forum=230)

http://monkey-x.com


Oh hey, this is the first language I ever used, when I was 12!

Don't think I'll ever go back to this though. Never could figure out the 3D stuff back then, but had fun drawing lines, text, occasional bitmaps and playing sound samples.


My very first was C64 BASIC, then QBASIC for DOS, which was a really good programming environment for a kid—Dijkstra's warnings about mental mutilation notwithstanding, it was really simple, it came with some games that you could modify, and it had a built-in help manual thing. And plus awesome features like the PLAY function that took a string of notes, which I'm pretty sure helped me even get interested in music, at age 6 or whatever. Me and my brother made all kinds of weird pixel patterns and stuff. One time mom brought home a projector from work, in like 1997, and we made disco lighting by making a full-screen button in Visual Basic that changed colors.


QBASIC was my first programming experience. I fondly remember a little known function that would treat a string variable as an array of machine instructions and execute them. There was a nice library of graphics functions designed that way by some clever person which I had found on the late 90's internet. I used that to write a little space invaders clone because the built in functions for copying data between buffers were so abysmally slow (even on my kick-ass state-of-the-art 100Mhz Pentium processor).


> Dijkstra's warnings about mental mutilation notwithstanding

I really dislike that quote: "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration". I'm not sure how serious he was being but I cannot see how a potentially good programmer would refuse to learn new concepts like they would need to do when first moving to OO, functional, procedural etc. languages. BASIC is obviously less relevant now but it was nice in that it was easy and quick to get started in whereas more complex languages might scared complete beginners away.


I'd place an argument that BASIC still is in many ways one of the best languages for human machine empowerment. I've spent the last 20 years of my life programming, (C, C++, PHP, Java, Go) and I have never felt the overwhelming "I can write anything I want if I try hard enough" I did as a kid writing QBasic on a 286. I wrote literally hundreds of games as a kid with graphics and sound, none of which were over a couple thousand lines of code. The thought of doing any of that in the languages I listed above sounds very complicated at best. I didn't get so lost in the details. We need to take a step back and rethink why we program. For me it is the sheer joy of creation.


I tried to rediscover this fun with modern languages in the last year and figured out how to do it:

Don't use most of your language's features.

Write a lengthy main loop. Use a lot of statically-sized arrays. Use plain old data instead of classes. Use primitive types and some indirection instead of a high-powered metaprogramming solution.

If you need the fancy stuff, it's all there (unless you're working with Go) -- but YAGNI really does apply.


I grew up on BASIC as well (TRS-80, Apple II, Atari 800, C64) but I think I'm remembering through rose colored glasses.

A few years ago I tried to write something in "real" BASIC again. GOSUB has no stack and no arguments!? WHAT??? I had forgotten how basic BASIC was.

Go to any high school computer club and all the kids are probably using Unity3D and C# and the stuff they are able to create in a day or 2 blows my mind.

Or watch some kids hack on JavaScript. Access to way more APIs then I ever had back in 8bit BASIC and instant sharing.


>Or watch some kids hack on JavaScript. Access to way more APIs then I ever had back in 8bit BASIC and instant sharing.

Can they press F1 and get instant access to the relevant documentation for those APIs? People who write IDEs for BASIC have always put more care and passion in them - press one button for documentation, press one button to compile and deploy, no messing with XML configuration files, copying boilerplate code, or "manifests".


I did QBasic and then later Visual Basic 3-6. As you mentioned it, I had exactly the same feeling back then when I was a kid that "I can write anything I want if I try hard enough". It was a great feeling. I also felt much more productive than I feel now since I do C++. I always missed that old feeling. I like Python but it still doesn't give the same feeling (for GUI tools or games, anything graphical) - although I think that it might have the potential with better IDEs for that purpose.


It's not entirely false. I've seen stubborn students before that refused to do anything new.


> It's not entirely false. I've seen stubborn students before that refused to do anything new.

How would someone like that ever become a good programmer? Programming involves continual learning and keeping your skillset up-to-date.


There are "good" programmers who still write 6502 assembly. Good is a relative term. They might just be very "good" at what they do.


It's fair enough specialising in a niche but having the attitude of "I refuse to learn that because it's unfamiliar" isn't going to get anyone anywhere.


I'm sure it's meant to be humorous, but it could be taken as pretty aggressive humor.

I wonder how much is known about early bad habits in any area sticking with us as we learn other things.


The version of BASIC he knew was seriously underpowered compared to even the BASICs that shipped with popular home computers of the 80's

See http://programmingisterrible.com/post/40132515169/dijkstra-b...

And today's versions of BASICs, like FreeBASIC are just as powerful as even C++ and come with pointers and OOP. BASIC programmers are more likely to understand pointers than programmers using today's popular languages because they were exposed to functions like PEEK, POKE and QBASIC's DEF SEG (remember when we had to DEF SEG to &HA000 to get direct memory access to the video memory buffer because the drawing functions were too slow?).

BASIC continues to be relevant today. Some people have reported being able to compile FreeBASIC programs for ARM, but GAMBAS already runs on the Raspberry PI. See: http://gambaswiki.org/wiki/install/raspbian

For the Android platform you can get RFO BASIC and program on the device itself. See: http://laughton.com/basic/

And QB64 also compiles for Android. See http://www.qb64.net/wiki/index.php/Android_Project

For the JVM it seems B4J is the preferred dialect these days, because JABACO is in development limbo. See https://www.b4x.com/b4j.html

There are also other versions of BASIC that compile to microcontrollers like AVR and PIC. See http://gcbasic.sourceforge.net/download.html

For HTML5 people can use BrowserBASIC (http://pewtersoftware.com/browserbasic/) or Monkey(http://www.monkey-x.com)

Source code for interpreters, transpilers and compilers written in BASIC can easily be found on the web so it's likely the language will be kept alive no matter what. And BASIC programmers always learn new tricks: we've dealt with speed limitations, memory allocation issues, even managed to write assembly when it was necessary. And FreeBASIc programmers are the most prepared to move to C++ because the structure is the same.


My first programming was on punched-card sorters and tabulators that used plug-in boards like the phone operators used. Get off my lawn.


I hate to ask, but is BlitzMax similar to DarkBasic? Which it seems is in the processing of OpenSourcing their programming engine at the moment as well.

- https://www.thegamecreators.com/product/dark-basic-pro-open-...


The two have often been compared, but BlitzMax is lighter on resources, plus i think DarkBasic has a camera system for 2D rendering while BlitzMax doesn't.


Neat, I was looking for a "modern" BASIC to make some little games, just to see how it was made before. I've always been interested in BASIC, I don't get why some people hate it...


Might have to do with projects based around BASIC being developed by inexperienced developers and most people dread maintaining poorly designed code, probably one of the reasons, there's others I'm sure. Also if you come from a different background to BASIC you get the wrong impression about the language.


Yeah and there is a lot of C# people that despise VB, its not helping either


So how are BlitzBasic, BlitzMax, DarkBasic and MonkeyX related?

Just trying to figure out the differences.


BlitzBasic started on the Amiga and was used to create games such as super Skidmarks 1 & 2. It featured easy to use GUI functions that allowed lots of people to create programs for the Amiga easily. The Windows version is known as BlitzPlus and also has GUI support among other functions such as networking, DLL calls, Sound, etc. It is mostly used for 2D games but you have to render rotated sprites before you can use them. It is a procedural language.

Blitz3D includes 3D functions but it is also a procedural language.

BlitzMax is an Object Oriented language. It also allows on-the-fly rotation and scaling of sprites. Most examples of the Blitz family of languages on the web are for BlitzMax. There is a Linux as well as a Mac OS compiler for it.

MonkeyX is also from the same company and improves upon BlitzMax. It has several free and paid compiler backends as well as several IDEs. The free version of MonkeyX will compile/export to Desktop executables and HTML5.

DarkBASIC first appeared in the late 90's/early 00's and offered several 3D functions from the beginning. It is a procedural language.

The biggest differences in the base language will be the way Types are declared. DarkBASIC will be much like QuickBASIC while BlitzMax will use the Field keyword to define member variables and the Function keyword to define methods.


Can't comment on DarkBasic or Monkey, but:

BlitzBasic and BlitzMax are about the same language. What BlitzMax provided over BlitzBasic was a direct integration with DirectX and OpenGL, which allowed you to make 2D games with hardware supported rendering.

Your average BlitzBasic "Hello World" would usually take up 50% of the CPU.


>Your average BlitzBasic "Hello World" would usually take up 50% of the CPU

On the Amiga?


No, on a Core-2 :)


That's weird. BlitzBASIC games run well on a 1.2 GHz single core Celeron with 512MB RAM. You must have been doing Hello World wrong :D


Re: DarkBASIC, its creators, The Game Creators, are now selling yet another BASIC dialect for cross-platform game development:

http://appgamekit.com/


I love the "free as in beer" license:

BlitzPlus is released under the zlib/libpng license.

The zlib/libpng License

Copyright (c) 2013 Blitz Research Ltd

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.


I used to use DarkBasic from seeing it first time in PC Gamer magazine around 99 or 00, so this is great news.


I tried DarkBasic years ago as well, I was into Bryce, C4D, taking a bunch of A/V classes, and learning to program at the time. I was in major overload. I ended up buying a few a of their tools, the pro version, etc (which were mostly made in DarkBasic as well, aka eat you own dog food). But I haven't touched it in years...

But since seeing this post I looked at the DarkBasic website and it appears they are also OpenSourcing their Pro version as well.

https://www.thegamecreators.com/product/dark-basic-pro-open-...


I spent most of my early programming years with BlitzMax. The language itself probably has no future on it's own, but combined with the DX/OpenGL integration and overall straightforwardness, I'd heavily recommend it for interested children.

If you have one or know of one, consider this.


Nice! I remember using it some years ago. I'll check it out again.


You have to register an account and use a discount code to download it for free. It looks like it has been migrated to open source and used to be commercial at one time. https://en.wikipedia.org/wiki/Blitz_BASIC

Here is a Wikibooks entry on it: https://en.wikibooks.org/wiki/BlitzMax


Is the primary use-case of this software for creating games?


Most people make games, but you can do a lot more with it. there are functions for lots of things.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: