Archive

Posts Tagged ‘Introduction’

An Introduction To The Box2D Physics Engine

August 22nd, 2009 Rslegion No comments

This is the first of a range of tutorials covering use of the open source Box2D physics engine. This engine the physics engine of choice of AS3 and has more than likely been used to create some of you’re favorite games like ‘Fantastic Contraption’ and ‘Super Stacker’

I know what you’re thinking,

How am I going to learn how to code all these gravity and physics things?

The great part is, all the actual physics of the game have already been coded in the Box2D classes already. All we have to do is create the object, know as bodies in the Box2D world, and set there attributes!

In this tutorial i will cover the basics of Box2D and how it works.

The Difference

If you’re already an competent AS3 Coder, which you should be if you’re learning box2D, there are a few fundamental differences to the way things work.

In normal AS3 coding you have you’re sprites and MovieClips, they:

  • Are Smart
  • Calculate where to move by themselves
  • Have an Event.Enter_Frame attached to them

However sprites in Box2D are completey different, they:

  • Aren’t so smart
  • Go where box2D tells them to go

That’s the main difference when coding Box2D, its mainly because the engine is ported directly from the world of C++

In the next tutorial, i will cover how to set up Box2D so it knows where abouts on our flash movies that physics should be applied. Also know as the B2World.

An Introduction To Visual Basic.Net

August 11th, 2009 Rslegion No comments

Visual Basic, in my opinion is an extremely easy programming language to learn. It where i first started many years ago. One of the the reasons that visual basic is easy to learn on a beginner level is because most of its commands are in the English language.

For Example in Actionscript 3, you’ll see code like this:

if(someCode == true)
{
someMoreCode = false
}

Whereas in Visual Basic.Net, the same code would look more like this:

If someCode = true Then someMoreCode = false

As you can see, Visual basic code looks much more simple to the beginner than AS3. Even though both example do exactly the same thing.

This is the reason why i recommend learning Visual Basic.Net as you’re first programming language.

Check back regularly for more Visual Basic.Net tutorials.