Saturday, February 26, 2011

HTML5

I remembered seeing the W3C logo for HTML5 somewhere...  found their builder and built a badge for The Render Engine.  It's about time I gave some love!

Sunday, February 20, 2011

Tiles and Sprites

I've been working through getting a way to do raycasting into the engine.  While doing this, I created a Tile resource type which contains a solidity map to assist in detecting per-pixel collisions.  However, after going through all the work to get a new class created, which extends from Sprite, I realized that Sprites themselves should probably have the functionality too.  I guess I'll probably end up rolling this all up at a later date.  While I'd like to have a distinction between sprites and tiles, I don't know if it makes sense to have a class just to represent that.  Maybe it'll come down to a flag to indicate type.  In the end, I hope to get a tilemap renderer worked out so I can create tiled levels with ray casting and pixel-perfect collisions.

Friday, February 11, 2011

Absolutely AWESOME Article

Maryrosecook, who is writing Pistol Slut on top the The Render Engine, wrote up a fantastic article complete with pictures, pseudo-code, and JavaScript which describes the process of detecting collisions.  You can view it by going here.  It's a good read and quite impressive... To answer a couple of questions she posed, the technique for determining bullet collisions that she describes is known as "raycasting".  Additionally, determining the direction for a shower of sparks at the point of impact uses the "surface normal".  I am always amazed at the things that she has been able to do with the v1.0 engine!  I think I also need to add some sort of way to do "sweeping" (I believe the raycasting I plan on adding will do this) but I want to get it into v2.0.  She has had to learn the hard way... you n00bs are going to have it so easy with v2.0.  =)

Firefox 4.0 b11 - Impressive!

After sobbing a bit about having to create a separate class to handle IE property getters and setters, I decided to upgrade my current beta of Firefox to 11 and give the engine a quick run through.  I have to say, I am impressed!  The JavaScript engine is much faster and the overall experience was buttery smooth (except when the number of animated objects got pretty high - say 125 particles and 40 visible objects).  Overall, I am happy with the changes to the browser's JavaScript engine and memory handling.  It's getting on par with Chrome for performance within the demos.

Thursday, February 10, 2011

Internet Explorer 9 woes

With the release of Internet Explorer 9 RC1 today, I decided to update and take a look at how the engine is performing in this shiny new beast.  To my dismay, I found that __defineGetter__ and __defineSetter__ don't work (supported, but don't work)!

Bummer...


Wednesday, February 9, 2011

Refactored components

Last night I decided to refactor the components. This has been something I've wanted to do for a while. Components were getting messy because they were all bundled together in one package. With the new namespace, it now makes more sense than ever.

Tuesday, February 8, 2011

Busy, busy...

I started a new job this week, so I've been busy with getting up to speed.  I think this means that for the next week or so I'll be slowing down on development.  It doesn't mean that I'll be stopping entirely, just that new features/optimizations in 2.0 will come out slower.  Don't worry!  Your favorite JavaScript game engine is still in development.

If some of you are feeling comfortable with the engine code and have ideas for how to continue moving it forward (maybe even at a faster pace) let me know about it.  I've already received a lot of positive feedback and good ideas for The Render Engine!  Even if you want to take on developing tutorials or demos for the engine, let me know about that too.

Tuesday, February 1, 2011

Box2dWeb Physics Engine

The Render Engine was using a customized build of the Box2DJS physics engine, which has now been replaced with Box2dWeb.  This makes using the physics engine a bit more simple, even though there was one place where it created a class collision.  I had to modify the code so that it didn't end up clobbering the Sylvester Vector class.

The only issue now is that to have physics, your game will need to load a 200kb file.  It's not the ideal solution, but it takes some of the worry about keeping up to date with the library.  If Box2dWeb is updated, I can drop in a new lib and get any fixes or new features, whereas before I had to mix and match the code if there were going to be any updates.

I've converted the PhysicsDemo to use the new physics lib, but it still needs some tweaking.  It also exposed an issue with R.struct.Container's append() method.  There appears to be an issue with it where it will create a circular reference and send the JavaScript VM spinning out of control.  I'm looking into that and will hopefully have an update soon.