Yea, I’m a little late posting about the ‘new year’. My last post pretty much covered what I had to say about 2008. I’m still in flux at the moment getting settled into my new schedule for the semester. Just got off the phone with a colleague discussing potential themes, styles, and design goals for our upcoming XNA game. After spending 3-4 months prototyping the ideas we had in our heads I think we’ve cut the fat and finally have something we can focus on getting done.

Looks like this Spring I’ll be getting a heavy dosage of C++, C#, and Blitzmax. I’ll have a lot more emphasis on C++ since the majority my school work/research will be done in it. Gotta get back to working with Open Steer in C4 now. I leave you with a teaser…

tigo

Quick status update on Wildboarders. Every week I tend to have small incremental goals to hit. This week focused on wrapping up the supporting code to allow me to generate levels for the game. I’m slowly starting to realize my current schedule isn’t accomodating to my game dev time. It’s actually the opposite, my game dev time is working ‘around’ my schedule. Looks like I’m going to have to rearrange a few things on my weekly schedule to actually get this game done on time and make game dev my focus for the next several months. Why do we only have 7 days in a week? Sheesh.

I’m beginning to wrap up most of the ‘content’ code such as tutorials, in-game events/dialogues for the first level of the game. It’s taken a while to complete the first level just because there’s some start up development that needed to be done. I’ve designed a lot of the systems to be data-driven so ideally, level creation will be a speedier process. The only portion I’m not too satisfied with is the cut-scene/event code. Most systems like tutorials and dialogue lend themselves rather nicely to simple data-driven designs. Trying to orchestrate multiple custom in-game events for several of the levels is a daunting undertaking. I do not have the time to and resources as a single developer to go off and create a complex in-game event/cut-scene editor just for this game. The good thing is that the majority of the gameplay code is already complete, so it’s these ‘exceptions’ that are mostly left to deal with. Below is a ‘work-in-progress’ screenshot of one of the in-game events. Your character, Indy, took a bad fall and ate snow! At the moment I’m using pretty much 100% placeholder art, most of which is from the previous version of wildboarders.
 

So much to do… so little time…

Yes, yes I know the documentation is lacking at the moment for Farseer.BMX. I’m still working on it on a few fronts. First, I’m trying to do api documentation (bbdoc mostly). Secondly, I’m trying to write tutorials/guides that help show how to use some of farseer’s features. I had hoped that releasing the demo application source code would’ve covered this aspect as the demos cover pretty much each feature, but I guess since the demo source is a bit more complex in design (handling a lot of graphics related mumbo jumbo), the actual ‘needed content’ wasn’t particularly easy to find. So I’m going to try to write up very simplified versions of some of farseer’s basic features (minimal graphics, minimal code).

I’ve uploaded the first of these tutorials to the articles section. It covers creating concave polygons in farseer :). More to come soon…

So far feedback has been great on Farseer.BMX working in Blitzmax. Some users have tested Farseer.BMX on Linux and Mac and it works without a hitch. Farseer.BMX is officially cross-platform between Windows, Linux, and Mac! That’s great news seeing how widely available the Farseer engine is becoming. It’s now available on:

  • Windows
    • C# – XNA
    • C# – Silverlight
    • Blitzmax
  • XBox 360
    • C# – XNA
  • Linux
    • Blitzmax
  • Mac
    • Blitzmax
  • Your Toaster
    • ???

I’m curious if Jeff has any plans on bringing it to Zune…hehe.

The main reason I’m posting an update is to let everyone know that the download for Farseer.BMX has been updated to include a ‘module’ version of Farseer for those that like to have all their code in ‘module’ format for easy use across projects. So if you were wishing for a module version of Farseer.BMX, you’re wish is granted and you can go ahead and re-download the package. The package contains the original source layout for those, like me, who like to have all their library source code next to their game code, and additionally a farseerModule.zip that you can extract to your “Blitzmax/mod/” folder.

So with the module installed you can now just do this in your code…

[blitzmax2]
SuperStrict
Import aco.farseerphysics
‘Weeeee physics….!
[/blitzmax2]

… and off you go!

Please let me know if you run into any issues with the module.

*…wonders how he’s going to get up tomorrow morning for class….*

And there was much rejoicing! It does feel great to finally ‘finish’ something. I started out this project as something to give me a foundation to code my own game project on, and now after 110+ hours of coding there is a 2D physics library for Blitzmax :)! I hope it proves useful to those that end up using it. While the engine hasn’t been tested for ‘real-world’ use it I think the demos do a good job of putting it through its paces. It’ll very soon have a good test through a ‘real world’ application once I get it integrated with my own game project. Anyway, Farseer Physics for Blitzmax is ready for download. The zip file contains:

  • A compiled version of the physics demo application with 4 new demos!
  • Ready-to-compile source code for both the core physics engine and the demo application
  • A ‘quickstart’ application that shows someone how to setup a basic physics scene with minimal code.
  • a ‘quick start guide’ that pretty much is a walk through of the quick start application. Which can also be found online.

For those eager to get their hands on it:

Download: Farseer.BMX

Since the last update, things came together rather quickly. I finished up the last of the classes that needed to be ported earlier in the week, which I then spent the rest of the week adding in demos to the demo application. This port is a very close implementation of the original Farseer in C#. The only times the source would deviate in any major fashion were in time-critical algorithms where optimization needed to be done differently considering how different C# and Blitzmax handle things (particularly garbage collection). With that said, you may find it helpful to visit the codeplex site of the C# version of the engine if you find yourself wondering how to do something in Farseer. While the answer you get may be in C#, keep in mind the methods, functions, and variable names are similar, if not identical, in Blitzmax. I’ve also implemented additional demos on top of the standard ones that came with Farseer to show the use of most of the available types in the engine. So if you wish to know how to implement a certain feature, try looking at the source code of one of the demos that does the said feature.

Here’s just a quick run down of what was added/updated since last post:

  • Added Demo 11 – Slider and Pin Joints
  • Fixed a minor bug in the main menu causing the about screen to stick
  • Sweep and Prune Collider implemented (not completely optimized)
  • Bilinear Interpolator
  • Added the Convert Units class for easy transformation between screen and world coordinates
  • Added IFluidContainer
  • Added onEntry and onExit event handling for fluid containers
  • Added Collision event handling
  • Added Demo 12 – Fluid Drag Controller
  • Added Demo 13 – Collision Event Handling

The fluid container objects turned out to be a bit cooler than I expected it to be. Not only did it simulate buoyancy but there was a controller that simulated wave formations on the surface of a container. Cool stuff indeed…

Pictures don’t do it justice so here’s a video…

By default Farseer doesn’t come with any code that allows geometry to create disturbances in a fluid container, but it comes with a nice, easy to use Disturb() function along with handy callback events for when a object enters and exits the container. With this I threw together a basic water container class that does some very ‘rough’ interaction between geometry and the waves. It’s far from realistic, but still yields an interesting effect I think. Someone could easily take this code and improve upon it. I’ve kept it outside of the ‘core’ physics engine and put it in the demo source since it was something that was kind of thrown together last minute (you can tell that by the rather rushed rendering code).

So that’s about it for now. I hope this engine finds some use in the Blitzmax community. Thanks to those on the blitz forums that provided feedback and data to help me optimize the engine. An especially big thanks to Jeff Weber for writing such a robust 2D physics engine to begin with!

*Crosses fingers and hopes the code will compile without issue on OSX and Linux*… 😉

I was hoping to have an update a little earlier than this, but decided to hold off and throw together at least a bit of content with the update. I’ve added a slew of joints and controllers into the Farseer engine for Blitzmax (which I think I’ll just start referring to as just Farseer.BMX to save my poor little fingers). Below is a list of stuff I’ve added since the initial post:

  • Angle Limit Joints (featured in the youtube video below) – this allows you to do some interesting joint behaviors that could potentially allow you to create a 2D ragdoll of sorts with limb constraints.
  • Fixed Angle Limit Joints – Same as above except instead of linking two objects together, only one is used and it’s angle is limited.
  • Fixed Angle Joints – Allows you to make an object always point in a certain direction. You can think of it as a way to disable ‘rotation’ for a particular object, and it will always be set at some angle from some anchor regardless of where it is in the world.
  • Angle Springs – You can link two bodies and they will attempt to align themselves to a certain angle using spring physics to give a bouncy effect.
  • Interactive Angle Joints (untested)
  • Circular Interpolator (untested)
  • Pin Joint – This one allows you to choose an anchor on two bodies and a distance, and the two physics bodies will always stay that distance apart, but still tumble and interact with other bodies realistically.
  • Slider Joint – Same concept as a ‘Pin Joint’ except now instead of a concrete distance apart there is a minimum distance and a maximum distance these two objects will stay within.
  • Brute Force Collider – Just another broad phase collider you can use instead of the default one. I may dig up a forum post by Jeff and others that describes the advantages/disadvantages among the different colliders you can choose from in Farseer.
  • Some getters/setters for the physics debug viewer class – Makes the debugger class a little easier to use.
  • Fixed a few minor bugs

Anyway, the video I posted isn’t that impressive but shows you that Farseer makes it pretty easy to setup different types of constraints and scenarios with just a few classes. There’s no new demo application to download for this update as I’m pretty close to finishing up the rest of the port, and would rather just wrap up a few more demos and get the code out there for others to use. Hopefully I’ll have more in a week or so!