Short holiday
May 4th, 2010 • Uncategorized • No Comments »I won’t be around for a few days from today so purchase and support requests may well go unanswered.
I’ll be back on Monday 10th.
Cheers!
I won’t be around for a few days from today so purchase and support requests may well go unanswered.
I’ll be back on Monday 10th.
Cheers!
A useful little game here for anyone interested in learning the inner workings of the mbmFramework, or even if you fancy a quick challenge on a competition themed game
Thaaks has released the full source to his game “How long are 10 seconds”. Read about it and download it from here.
This has come up a few times so I decided to write a little demo.
The terrain and the eraser are defined as sets of horizontal lines. Clipping one horizontal line to another just involves trimming one end or the other, or splitting it into two, or deleting it altogether:

The line sets are sorted by height allowing collision and trimming checks to early out once they come across a line segment that is beyond the target depth.
In the demo, move the red eraser with the mouse to shape the terrain and there’s a couple of hundred particle pixels on the screen too just to bring it to life a little.
Previously each button state required a bitmap, but now you can specify an alpha blended coloured rect instead. You can now also specify the distance of the text offset on mouse down (I didn’t like how it was hard coded +1 pixel in X an Y), and the colour of the caption text for mouse over and mouse down states. The new GUI control parameters are..
‘ caption colors (in the usual r,g,b,a integer format)
overcolor
downcolor
‘ image rects (colors in the r,g,b,a integer format)
normalrect
overrect
downrect
‘ text caption offset for individual control
downx
downy
‘ text caption offset for both values
downoffset
This means the only asset you need to get started with the GUI is a bitmap font.
Since I figured out scope resolution in Blitzmax I’ve been able to rename the following sprite methods.. Set_X, Set_Y, Set_Alpha, Set_Rotation, Set_Position, Get_X, Get_Y, Get_Alpha, Get_Rotation, Get_Position. Now none of them have that ugly underscore character.
CurrentFrame returns the current bitmap frame,
SetFrame sets the current bitmap frame,
TotalFrames returns the total number of bitmap frames.
Download links, links to the full changelog and updated docs in the usual place.

What’s new? A few major things..
And a few minor things… see the changelog.
This sample (check out sample #6) shows 100 sprites that have been procedurally generated to have bitmap animations as well as scripted animators acting on them. I used a simple blue ball image, and overlaid the yellow spot in several places to generate a turn left/right animation. It looks better in motion!

Version 1.5 makes a couple of potentially project breaking changes, but they are quite minor;
The tutorial code is now available right up to and including adding the high scores.

The tutorials are underway and the very first one exposed some omissions from the framework. First of all there was no way to work with individual X and Y values for a sprite without accessing their fields directly. Not that there’s too much wrong in that, but I’d prefer it wasn’t necessary anywhere in the framework code. Once users are happy using fields directly it can cause chaos when they begin accessing those they shouldn’t. (For non Blitzmax readers; while Blitzmax handles OOP, Polymorphism and Inheritance it is rather lacking in the Public / Private department).
Another thing missing was a simple way to handle lots of sprite objects. I always use a list of free sprites that I create at start up, then take one from it everytime I need one and put it in a list of live sprites. The live sprites are drawn, updated and used for collision detection etc. When one of those live sprites is finished with, I take it out of the live list, and put it back in the free list so it can be recycled. Simple enough.
Except, I’ve added a SpriteList type to the framework to handle this for you. I’ve also updated the first tutorial to use this new type.

Today I killed my website.
It’s easy done. I have two mySql databases; one for this site and one for messing around with. I decided to delete the ‘play’ database to create another for different reasons. Except I didn’t. I deleted the database this whole site revolves around.
Step 1. Panic! Thankfully I’ve not had the feeling of a massive-irreversible-f–k up for quite some time. I remember it well.
Step 2. Look for ‘undo’, ‘undelete’ or ‘restore’ options. Nothing.
Step 3. Go to www.dataflame.co.uk and log onto the support chat. I got an operator (William) in about 20 seconds. He had a look, but I couldn’t tell him my log in password so there was nothing he could do. He told me to submit a support request.
Step 4. Submit support request and begin chewing nails nervously. Just how long would a support request take to be picked up? Same day? Next day? Who knows.
Step 5. Check emails impatiently for 5 minutes. Nothing.
Step 6. Check the site to see if by some miracle the last 10 minutes has all been a bad dream. Amazingly it’s back! A minute later I get an email from dataflame support (William again, I assume it’s the same guy). Telling me it’s fixed and to check it and report any further problems.
Step 7. Breath again.
There we go. From the time of my dumb ass mistake to Dataflame support picking up the pieces and sending me on my way again was little more than 10 minutes. I’ve used their support several times before and it’s always been very good but that was for really minor issues compared to this.
Really good job Dataflame guys. I know where my hosting is staying for the foreseeable future. I always recommended you before but now I’m on a crusade to put the entire internet in your hands! Sort of. Well here’s a banner ad anyway…
Thanks Dataflame!
I’ve added some new parameters to the particle system to allow more emitter types. You can now;



Not big news, but not being able to do this was a bit of a glaring omission. I’ve also tweaked the editor to run at 60FPS from the original 20.
The particle editor comes with render source code so it can be used seperately (and freely) from the mbmFramework.

I’ve brought the framework release up to the latest version (V1.2). That can be found in the usual Downloads section. I’ll also try and keep the Changelog viewable online too, along with the documentation.
Happy coding!
