Saturday, April 30, 2011

Virtual D-pad

Just a quick post to say that I restructured the engine a little so I could enable a virtual d-pad on touch devices.  Currently works on my iPad (but not on my HTC Thunderbolt).  Also corrected a bug in the Sprite resource type to correspond to the changes I made to R.math.Rectangle2D.

Oh yeah, one more thing... I put an "index.html" file in the "/demos" and "/tutorials" folder to make it easy to launch those.  I needed it because I was working on my iPad and typing in the full path was a pain in the backside.  You will be happy it's there because it's a quick reference to each demo and tutorial.

Friday, April 29, 2011

Sylvester & Speed

I've got some great news for The Render Engine!  This morning I did some optimizing for the engine that has resulted in a big speed improvement.  Since the beginning, The Render Engine has depended on Sylvester for it's 2d and 3d math.  While Sylvester is a fantastic library, it is generalized for solving a multitude of mathematical problems involving vectors, matrices, lines, and planes.  This generalization, while good for accurate calculations, is bad for performance.

Thursday, April 28, 2011

Engine Stepping

This morning I was able to add a small bit of code that allows a developer to step the engine a frame at a time when the metrics panel is being displayed.  I plan to use this to profile single steps of the engine to find areas where large sums of time are being spent.  I also have a fix, from last night, that I thought I committed (but didn't) which cleans up some things, enables native frame requests, fixes IE9, fixes a bug in pooling, and also deprecates set- and getHostObject() in favor of set- and getGameObject().

IE9 Fixed, Updated HTMLContext

I have finally gotten some time to look at why IE9 wasn't working.  I knew it didn't support __defineGetter__/__defineSetter__, but didn't know what the alternative was until just last night.  I got everything that was working in the other browsers working in IE9, but the demos run slow.  For all of the brouhaha about how IE9 supports hardware acceleration, I'm not that impressed.  It used to run everything almost as fast as Chrome, but now it seems it runs it at 1/2 the framerate, if not worse.  Plus, Firefox seems to be running slowly too.  It may be due to the way I'm handling z-depth, but I'm not sure.  Need to do some profiling.

Yesterday I spent a considerable amount of time looking at the HTMLContext.  I have made numerous updates to it and cleaned some things up.  Plus, I added a demo for HTMLContext to the "/demos" folder.  I think this holds a lot of potential, but I'll need to figure out how to tap it properly.  Combined with the RenderUtil's capability to render to a temp canvas context, then extract imagery, it might be a way to get good performance out of the browser.  I'll have to see about that one.

Wednesday, April 27, 2011

Faster, better animation

I just pushed a change to The Render Engine so it will use the browser's native requestAnimationFrame() call if it's available.  Currently this is an engine option and defaults to false.  You can see the difference by changing the option in the Vector demo's "engine.config" file to true. According to Paul Irish's blog post (http://paulirish.com) it allows the browser to optimize the redraws.  Also, if I read correctly, I can target the actual rendering context and it will only perform the optimizations for that context.  I need to test that claim, but so far, this is a nice change!

Saturday, April 23, 2011

TileMaps, the beginnings

I posted an update to Github today to fix some issues that popped up in the Linker.  It seems a lot more stable now and should resolve initialization issues people were seeing.  The Sprite Editor now has copy/paste enabled.  Why I forgot to do this earlier, I don't have a clue... It was fairly simple to add.

Thursday, April 21, 2011

Pooling and Linking

Engine pooling has always been a foundational element of The Render Engine.  Saving time and memory due to object pooling is something that I think makes the engine more robust.  However, I realized that the pooling was being overused.

Monday, April 18, 2011

v2.0.0 Nearing Beta!

I've gotten The Render Engine v2.0.0 to a point where I'm just about ready to label it a beta.  The Sprite Editor v1.0.0 landed yesterday and will be followed with an update, shortly, to allow importing of sprite sheets and also importing frames from other applications.  As I said, in a previous post, a number of features will not be included in v2.0.0, but will follow in a point release.  I want to get this puppy out the door so people can start using it, and I can retire the v1.x branch.

Wednesday, April 13, 2011

Exporting and Animations

The Sprite Editor is still moving forward.  It's amazing how much has changed in just a few days.  I can now export to a PNG file, importing is starting to come together, and the beginnings of multiple animations is in the works!  Good stuff for all.

Monday, April 11, 2011

Sprite Editor, v2.5, and more...

I spent a goodly amount of time, yesterday, on the Sprite Editor.  First, converting it to the v2.0 code base, then fixing some nagging bugs, and adding some new features.  Nice to see that Chrome finally fully supports all of the canvas methods.  I was playing around with it, and seeing how usable it is and I'm pretty happy with what's starting to form.