RSS

Archive for April, 2010

How long are 10 seconds?

Tuesday, April 27th, 2010

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.

2d Deformable terrain in Blitzmax

Sunday, April 4th, 2010

2d deformable terrain

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.

Download demo source here

mbmFramework V1.7 Released

Saturday, April 3rd, 2010

What’s new:

Even more control over the look of GUI!

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.

Sprite methods renamed

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.

Sprite animation methods added

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.