Filed under: free engine

What's new : How the fonts in Laboratory2D work

Laboratory2D uses the simple to use, but extremely powerful bitmap font generator from AngelCode. You can download the generator and see what I mean, the packing options and per channel settings are really handy.

http://www.angelcode.com/products/bmfont/

Let's make a font

I have a font from Font Squirrel called Capture It , and I have opened up BMFont and I have selected only the characters I want to use in this example.

 

 

Then, I set the options like this below, 

 

 

Then I went ahead and made sure it suited my memory needs (no more than 512x512 in this case), using the handy Visualise option in BMFont, don't worry about that black background, its the alpha mask and won't show up in the font itself.

 

 

Then I opened up an image editing program and I made some detailed changes to the font. Added a bevel and some shadowing, some thing like this : 

 

 

And finally, i opened up Notepad++ (my favorite editor at the moment) and I added some code to test my new font in Laboratory2D.

 

 

And then I pressed Run ( Ctrl - Numpad 0 for me ) and I can see the following. 

 

 

Another interesting note

Because text comes back as a geometry object, you can actually assign the geometry to a sprite, and use the benefits sprites have (like moveto, pulse, fade, etc). Take a look at this video for an example.

 

That's all for today.

Though there are more feature posts coming this week - keep an eye out. Still have 2/3 posts on features in depth and more like this.

 

What's new : Laboratory2D Beta 2 on the horizon

Hello again! This is where I spam about all the cool things I have been doing. To reward your visit, here is one of the earlier designs I had worked through when coming up with the logo for the engine.

The huge refactor

It has been a long and crazy time with the most recent additions to Laboratory2D. I started tearing out the insides of the code to try and decouple the scripting from the core C++ engine so that I could start binding spider monkey. It took a really long time, somehow over the last 8 months i had managed to litter v8 into the core components of the engine. Not in a terrible way, i managed to remove 99% of it over some simple copy pasting - but the event system and the whole sub script system were heavily bound to v8. This had to be fixed.

The escalation

Well as always, while shifting around some code I found some other ugly code. I refactored it. I found some interesting bugs, fixed and refactored. I changed all the layouts of code to be uniform again, I cleaned out all the random code that had yet to be finished or tested and stuck it in another branch. I finally got around to cleaning up the interfaces and systems and I am proud to be at the end of this stretch with a much cleaner code base on the c++ side, a lot less hackish code that i did about a year ago when learning the systems involved - and most of all - a clear and driving direction for the core itself.

The new features

Again a crazy list I won't post here. I finalised the font support for full bitmap font support, with normal scaling, rotation and coloring. Camera systems got large improvements like being draggable and zoomable with a single flag, sprites got a whole new set of handy features, a few more examples were polished and a couple other useful modules have been included in the core (like a handy edit box, with selection, a history and custom properties). I also finalised the networking support for scripting so that a handful of lines of code later, you can have a chat going over the internet.

What about this Beta 2

Well, beta 2 will be the first mostly public release of the engine. Hopefully it will be soon but work and life and other things tend to get in between - so i won't say a time. Just soon. As of now, Beta 2 is almost 100% complete according to my original goals it is merely a matter of getting the documentation and the examples in line with the monolithic changes I have made over the last month or two. That gives me the next short while to finalise the android, iPhone and browser embedding features that I have been working on in the mean time. As with the post mentioning the way I am doing releases - Beta 2 phase will be fixing all the issues reported by the beta users as well as making even better examples and demos. Sometimes, i can't help myself so I jump ahead and get started on the demos to keep me motivated. Expect to see a lot of interesting things as beta 2 rolls out! 

The original reason for Laboratory2D is still alive

As a matter of interest, the project that started Lab2D is actually in progress again. Now that the core is stable and the scripting is mature it is a totally different world to work with - we are moving forward at a rapid pace again which is exciting. The scripting opens up opportunities for team members to help even more than before and to really get involved where the C++ before had just isolated me from having the game i wanted. As I roll out releases for this game, keep an eye out on other forums and indie gaming channels for trailers and gameplay teasers and most likely a playable release. For those who are not aware of it, it is an uplink style game (inspired by) and it is something i have wanted to make for many years. 

 

How to obtain the beta now

Its free, It's javascript driven, its fun (and portable).

email fuzzy at owned.co.za

tweet @FuzzYspo0N

Comment below

 

Posterous theme by Cory Watilo | Mod by FuzzYspo0N