Monday, July 19, 2010
Update
***** BMX2 news *****
Well, I still haven't settled on a name for this yet, but anyway, here's a quick update on where the project is going...
The source language will be very bmx-like, with a few tweaks and additions including:
* Simple class templates
* Function overloading
* Constructors
* Properties
...and some stuff removed, such as pointers. Yes, POINTERS! Function pointers too!
Target languages I'm aiming for upon release are:
* JavaScript
* ActionScript
* Java
* C#
* C++
* Python (just as an experiment - probably wont be much lib support for this to begin with).
Target platforms I'm aiming for:
* HTML5
* Flash
* XNA
* Android
* Native GL
* iPhone
The system will also include an interpreter for debugging/preprocessing. Ideally, you should also be able to use the interpreter for scripting, but that may end up being in a future release depending upon difficulty level.
I'm keeping the modules *very* simple for the initial release, but they should still be grunty enough to do some decent games with depending on your target platform.
The 'official' IDE will be a custom job written in the language itself. However, it should be usable enough (well, I'm using it) and it will at least run *everywhere*. Of course, there are likely to be 3rd party IDE offerings too, so hopefully everyone will be happy in the end.
More to come...
Thursday, May 27, 2010
The plan!
Ok, here's the plan:
I am currently working on a 'light' version of BlitzMax designed to run on a wide range of target platforms. For now, let's call it 'bmx2'.
Bmx2 will be similar to bmx language wise, but will have a much smaller and simpler set of modules that will be targeted at simple 2D game creation.
But the major feature of bmx2 is that it will be a 'translator', designed to convert code from bmx2 syntax to as many target languages as possible - preferably in as human readable a form as possible.
I have already made considerable progress generating output for the following target languages: C++, C#, Java, JavaScript and ActionScript. I also plan to add python add some stage, and...?
In addition, I have a simple Blitz2D/Max2D-like module underway and some very simple 'system' modules for the following platforms: Win32, MacOS, Linux, HTML5, Flash, XNA, Android. There's an iPhone version too, but it's status is very much 'up-in-the-air' right now due to licensing issues.
Anyway, development has now reached the point where I am interested in getting more people involved.
Right now I'm interested in people who are keen on language design and/or have some experience with several languages. If that sounds like you and you'd like to get involved please contact blitzmunter at gmail dot com.
Flash demo (well, not *that* flash - very simple actually! You may need to click window to activate too):
Same demo running on HTML5, Android and XNA:

LOTS more info soon.
Peace out!
Mark
Monday, March 29, 2010
BMX News!
Ok, there's been a lot of conjecture about 'the future of Blitz' at blitzbasic.com lately, so it's probably a good idea to let everyone know that the fine minds at BRL are currently working on a solution to the 'BlitzMax on LOTS of platforms' problem - and yes, 'lots of platforms' includes the iPhone.
Given that game development these days involves developing for a wide range of platforms, I feel this is the logical next step for Blitz as a game development language, and I'm confident the end result will be pretty cool!
I don't want to give too much away about how this will work (or, of course, when it will work!) because, to be honest, I don't know 100% myself yet - more news 'when it feels right'!
Bye,
Mark
Monday, December 28, 2009
Yet Another Avatar Review!
Hi,
Well, just got back from seeing Avatar on the biggest movie screen in town and, well, yes, WOW!
***** Warning! Spoilers Below! *****
From a purely technical standpoint, I thought it was, as hyped, the best CGI movie yet.
Although I was disappointed with the previews shown earlier this year (it all looked a bit 'fake plastic blue' or something) the final product was somehow much more convincing.
I suspect this is mainly because you were bombarded with such a huge amount of gee wizziness that any cracks in the visuals were just lost in the flood, but I think there was also something else going on, and what I consider to be Avatars *real* achievement - the very convincing facial animation of the CGI actors.
This hugely helped 'sell' the characters as realistic entities, and not just CGI (erm) 'avatars' standing in for real actors. Granted, the characters aren't actually human, and if they had been it may not have worked so well. But they did successfully achieve a sense of realism I haven't seen yet in supposedly realistic CGI animation.
The 3D was fine, but not IMO particularly any better than, say, Up3D, and I still can't see myself being happy with having to watch ALL movies in 3D!
Finally, the scenery was stunning, surprisingly New Zeland-ish in fact with what look like plenty of ferns and 'koru's all over the place, and was teeming with plenty of imaginative and quite beautiful animals and plants.
As for the actual story, I actually enjoyed the first half of the movie immensely.
The story gets stuck in right from the outset, and before long our paraplegic hero has transferred into his brand new, 9 foot tall blue alien body and is hoofing it madly through the forest for the sheer hell of it.
It's an exciting, romantic moment, and the movie carries on in that spirit for quite a while. There's even a quite nicely pitched bit of human-alien romance in there which works surprisingly well.
But of course, this is an evil-humans vs virtuous-natives story, so the film has to eventually turn into a huge prolonged orgy of military violence - about an hours worth in fact.
At this point, the movie changes tone dramatically, and things start getting a bit weird. The virtuous-natives are apparently too stupid to save themselves without human help (there's some vague 'chosen one' device at work too) at which point it gets a bit (more) condescending.
But, the visuals remain strong, and the battles are pretty spectacular. It all manages to remain more or less entertaining right until the (pretty crappy) ending, although you feel like you've mostly lost touch with the characters by then.
A shame really. If this really is some kind of American Indian or Afghanistan allegory (as has been claimed) or something, I can think of far more interesting/subversive ways to end it. But hey, this is James Cameron, and he seems to be far more comfortable with characters who carry BIG SEXY guns - indeed, by the end even our hero has grabbed himself a gun and has ditched his wimpy bow and arrow/knife combo...
But bah, I liked the first half, didn't like the second - no doubt there are some people who think the opposite! A case of something for everyone, perhaps...
Whatever, it was, first and foremost, hugely entertaining.
Bye!
Mark
Saturday, December 19, 2009
Happy Christmas!
Ho ho ho,
Well, it's that time of year again - must be time for a Christmasy blog!
It's been an interesting if low key year, during which I managed to fail yet again to get anything substantial done, but still managed to learn a lot of things along the way.
The evolution of BlitzMax into a threaded language has been probably the most interesting/challenging thing I've done, and in particular the development of an entirely new garbage collector.
It's still not perfect though, as there are some 'pathological' situations which can still upset the GC. The solution to these problems is to make the GC 'generational', which basically means keeping track of 'old' and 'not so old' objects. Ouch.
This apparently requires the addition of nasty things called 'write barriers' - little bits of code that get called every time a pointer is written to a variable (reference counting actually involves a write barrier of sorts) . I have a feeling this can be achieved 'on the cheap' using virtual memory techniques though, and it's something I'll probably be looking into next year.
And the $64,000 question - what about 3D?
Well, the truth is, I just don't really feel that I have anything new or particularly clever to offer 3D wise right now - and haven't for a while. There are plenty of good 3d libraries out there these days (and many of them free!) and competing with them has just become more and more scary. I guess what I'm really after is some kind of dinky new approach or something that simplifies life the way Blitz3D did.
I could certainly do more to promote and support the 3rd party 3d modules for BlitzMax around these days though. My general suckiness at marketing etc issues not withstanding, I'll make an honest attempt to do something about this soon!
I'd also like to do something *I'd* use to write a game with, and to be honest my requirements for a 3D engine are pretty minimal. As much as I'd like to a do a bumpy/specularly extravaganza, the truth is I just don't have the resources to do it justice. In which case, why not do something simpler, faster etc that works on more hardware. I guess what I'm saying is, as with programming languages, my first priority is to do something I'd be comfortable using myself, and all this next-gen stuff creates a certain amount of tension in that respect.
But all power to guys like Josh Klint and his leadwerks engine which requires a reasonably high spec - they're definitely pulling the technology in a good direction as opposed to, say, Intel and their craptacular graphics cards. Honestly, we'd have been better off with GeForce 4's!
Gaming wise, I've actually had something of a gaming renaissance in 2009, although this is probably more down to my being a bit more open to trying new gaming 'forms' than any resurgence on the industries part.
I have thoroughly enjoyed games such as Mirror's Edge, Infamous, Arkham Asylum, and esp. Uncharted 2 and kind of feel that gaming is heading in interesting directions these days.
Many of these games feel almost 'mini-game-ish' in nature, with set pieces sort of strung together by sequences of 'actual game'. The 'actual game' bits can sometimes get a bit monotonous, often consisting of 'wack a mole' style combat, but the set pieces are usually very cool - certainly cool enough to keep me playing for the next one!
Mirrors edge really stuck out for me though. The actual game bit basically consists of running very fast from point A to point B - and it works really well! Keeping your speed up is key, and do so allows you to run up walls and jump over huge gaps without it all feeling too silly/impossible. But I feel it's let down a bit by having too many restart points, which basically allows you to get lazy as you can always just try again. IMO, they should have made the levels a little easier, but with fewer restart points. It would've made for the same overall difficulty, but have given it all a little more tension.
I'm also very much looking forward to 'Demons Souls':
http://www.youtube.com/watch?v=VT89mvjxudk
Not available in stores here in NZ (why?) but I've got it ordered and it should be here next week. Good too see developers being brave enough to make a game *hard* again!
Anime-wise, I must confess to having watched a lot of 'high school romance' style Anime lately. In particular, I find the Anime adaptations of the Japanese 'girl games' by Key Visual Arts (haven't played the games...though they're apparently quite raunchy!) really entertaining. Not quite sure why, perhaps because there's usually an element of the supernatural in there or something, but they're definitely skilled at building up characters and manipulating the viewers emotions.
But 'Death Note' was probably the Anime highlight of 2009 for me. A simple premise - a guy discovers a note book that will magically kill off anyone whose name he writes in it - is taken in gloriously confusing directions. The amazing thing about the show is that despite the fact things keep getting more and more complex (the book has an apparently never ending set of rules governing its usage) you're never really lost by it all. There is the odd bit of exposition here and there, but overall it's just a brilliant bit of story telling.
Movie-wise, I didn't get to see all that many movies this year (too busy watching Anime and playing games!), but I did thoroughly enjoy Star Trek, Synecdoche New York and esp. Coraline.
The thing I always liked about Star Trek was the Kirk/Spock dynamic, and I felt the movie kept this intact very nicely. Yes, it was a bit of an incoherent mess ('racist' Vulcans? Surely racism is not logical!), had too many lens flares (Well, I liked them!) and featured probably the biggest god machine coincidence in living memory (Kirk AND future Spock AND Scotty all accidentally stranded on the same minor planet?!?) but I thought the actors caught the essence of the original characters just fine.
Synecdoche New York is probably a bit of an old farts movie, concentrating as it does mostly on death and 'what have I done with my life' issues, but it's also funny, wildly imaginative and thought provoking. The main character builds a 'miniature' of his world inside a huge warehouse, and after a while what's real and what's 'acted' becomes blurred. And, of course, the ending is killer...
Coraline is...awesome. A bit goth, but if you can handle that, see it!
Music-wise...is it just me, or was 2009 a bit of a loss? Waiting for someone to kick things into gear again...
Coolest moment of 2009: Obama getting elected.
Bummer moment of 2009: Obama's Nobel peace prize acceptance speech.
Anyway, getting WAY off track. Have an excellent 2010 and code the good code!
Bye,
Mark
Thursday, October 1, 2009
Little Big Planet
Yes, I'm a year behind the times, but I didn't actually expect to like it at all given that: a) I've never found physics based puzzle games all that fun, and b) I'd seen it an expo when it first came out and thought it looked pretty ugly.
But now that it's hit the bargain bins, I decided to give it a blast, and I'm very glad I did.
First impressions: It's a very 'English' game: the voice-over is very similar to that used in Hitch-hikers-guide-to-the-galaxy, and I think I even recognized some music from the excellent 70's TV show 'Vision-On' in there. It's actually nice to see a game 'projecting' personality like this.
Second impressions: It's simple, but fun. There is a lot of variety in the environments/graphics, and the designers have managed to come up with a very impressive number of ways to reuse the physics elements - yet they haven't 'overcooked' the puzzles: they're generally short and to the point.
Third impressions: I was totally wrong about the graphics, they're excellent! I think I may have been put off a little by the 'sack doll' player character. In default mode, he looks a little too much like the 'maggot monster' in 'nightmare before Halloween' for my liking - just a little bit creepy. But he does grow on you and you can customize him massively (I'm currently in soothing magical girl mode!). Ultimately, I think the realistic graphics complement the realistic physics beautifully.
Fourth impressions (about a week later): It's still simple, but still fun! OK, I've probably only put 5 or 6 hours into it so far, but that's damned good for me!
Minor grumbles: A fraction too much inertia on the player for my liking; sometimes you can't see where you'd like to and there's no manual camera (although 'leaps of faith' are seldom punished); while it's primarily a 2D game, there are in fact 3 'layers', and it can sometimes be hard to work out which layer you're on - worse, the game sometimes automatically moves you to a different layer, every now and then with fatal results (but this is probably worth it, as it also increases the speed at which you can whizz around levels).
I haven't played around much with the game creation stuff yet, but it looks pretty impressive and was apparently used to create ALL the in game levels. The online user maps are less impressive, but again I haven't looked too closely at these. More later…
Peace out!
Mark
Monday, September 14, 2009
Spillage!
One of the things I was determined to implement in BlitzMax right from the start was a decent 'register allocator'.
Register allocation is the process of mapping 'local' program variables (i.e. those variables declared 'Local' in BlitzMax) to CPU registers (i.e. the finite set of 'variables' inside the actual x86 CPU).
Blitz3D and BlitzPlus largely ignored this. Instead, all local variables were simply stored in memory (on the stack), and loaded into CPU registers as required. For example, Blitz3D code like this…
Local x,y,sum
x=1
y=2
sum=x+y
…would involve approximately the following steps:
1) Write the constant '1' into the memory location for variable 'x'.
2) Write the constant '2' into the memory location for variable 'y'.
3) Read the variables 'x' and 'y' from memory and add them together.
4) Store the result into the memory location for variable 'sum'.
That's 2 reads and 3 writes from/to system memory, and system memory is generally slow (even with fancy caches) when compared with the CPU (but I guess it'll be catching up soon…).
BlitzMax on the other hand will try to represent the variables x,y and sum using CPU registers, so equivalent BlitzMax code might involve something like…
1) Write the constant '1' to CPU register EAX.
2) Write the constant '2' to CPU register ECX.
3) Write the sum of EAX and ECX to CPU register EDX.
…none of which 'hits' memory so is theoretically much faster.
And, happily, this time at least, theory matches practice - BlitzMax code runs significantly faster than equivalent Blitz3D code in general, and this is almost completely due to BlitzMax's register allocator.
There is, however, one fairly major drawback to writing a register allocator - it's *@#!$^& hard! ESPECIALLY on the crappy Intel X86 which has only about 8 general purpose registers.
In particular, the trickiest thing to deal with is 'spillage' - handling the situation where there just aren't enough CPU registers to go round and some local variables MUST be 'spilled' to memory.
In this case, a spilled variable ends up behaving much like a Blitz3D/BlitzPlus variable above does - it must be constantly loaded/stored from/to memory. Therefore, the most important job of the register allocator becomes minimizing the number of spilt variables.
This is tricky because it can be hard to know precisely what effect spilling a variable will have. Spilling a variable may even cause a 'cascade' of more spills, because even though a spilled variable is stored in memory, it still needs to be moved into a CPU register at SOME point to be used for anything useful (e.g. arithmetic, memory addressing etc)!
And every now and then, someone will come up with a little piece of code in BlitzMax that causes this effect. The code will usually be small, involve about 8 or so local variables and will cause the compiler to lock up completely as the register allocator gets caught in an endless allocate/spill/allocate/spill loop...
In fact, it happened again just yesterday - hence this post!
I *think* I have it sorted now, but to be honest I seriously doubt I'll ever be able to say with 100% confidence that I know it works!
Peace out!
Mark