the official as3isolib blog

actionscript3 isometric library (v1/v2)

v2 status update – 2012.01.20

FIRST THINGS FIRST

as3isolib twitter

Firstly I would like to address a few questions/comments I have received via email and twitter regarding the blog. A few folks were concerned for the project and specifically the v2 efforts due to inactivity on the blog.  The as3isolib is not going anywhere.  The blog is rarely updated simply because most of the updates and related content are being relayed via the as3isolib twitter account:

http://twitter.com/as3isolib

It’s MUCH easier to post updates via twitter than via a blog post.  So please subscribe to keep up to date.  I TRY to limit my personal posts and keep the feed solely about as3isolib.  Lately I have been lazy and posted a few SOPA/PIPA rants, etc.  Now I have a personal twitter where I can do that.

as3isolib blog

This will ALWAYS be here to keep you up to date on more in-depth topics which can’t be addressed in the 128? max-characters that twitter imposes.  Like this one :)

as3isolib user group & API docs

A month or so ago, I learned that a majority of the people using the as3isolib had no idea there was a users’ group.  Doing some followup to this, I also learned that people aren’t aware of the official API docs either.  Suffice it to say I will be posting on the twitter feed reminder posts about the docs and user groups just to keep it fresh in folks’ minds.

V2

preface

Forgoing any legalese, all of what follows is subject to change.

open source or not

I’ve decided (at the time of this writing) that regardless of licensing or usage, the as3isolib.v2 will not be open source.  There may be licensing scenarios in which the source will be provided however that has yet to be determined.

access

In order to develop useful features and content, I need to create a demo and start getting v2 out there in front of people in a limited fashion.  Starting very soon I will be reaching out community members to see about providing access to the engine.  If you are interested EMAIL me – as3isolib ${at} gmail ${dot} com (please do not add comments to this post as they will be deleted).  To be considered for early access I will need some things:

  • contact information (email, IM and/or Skype)
  • outline of usage in existing or proposed project/app/game/etc.)
  • a willingness to communicate on a regular basis in order to improve v2′s development

For now it will probably have a watermark until further security measures can be implemented.

stay tuned

Stay tuned as I will be updating this post as things develop.  Also check in with me on twitter.  I want to get the ball rolling.

 

As3isolib Game: Monster Mind (Beta)

Ric over at Bossa Studios shot me a message saying that their new Facebook game Monster Mind (beta) is using the as3isolib.  Looks fun.  Kinda a new take on the classic 2D side scrolle    r Rampage? I loved that game back in the day.

The Smurfs & Co. : New Facebook Game using as3isolib

I just got word on the forums that some folks made a new Facebook game called “The Smurfs & Co.”.   Check it out here - http://apps.facebook.com/thesmurfsco/


Sprite Sheet Rendering Prototype

Since as3isolib.v2 will be making heavy use of the bimtapData APIs I figured it would be useful to have some Sprite Sheet mechanics in place.  After looking around at PBE’s spritesheet APIs, and some other as3 tools out there, I decided to try to take a stab at a versions specifically tailored to as3isolib.v2′s render process.

Keep in mind everything you see related to the v2 APIs is subject to change.  We’re not even in Beta yet.

So rather than reinventing the wheel and tooling out some SpriteSheet assembler in AIR, I searched around and found Texture Packer - http://j.mp/ffr0BC It’s free and does what I need for now.  It outputs a composited sprite sheet image and an XML data file to describe the tile sets.  So for my test case I decided to make 6 different types of terrain.  Here are the output files from Texture Packer:

Here is the output XML (via snipt)

So far the renderer looks like this (via snipt):

package testing.renderers
{
	import as3isolib.v2.core.BaseEntityImpl;
	import as3isolib.v2.core.BaseObjectRendererImpl;
	import as3isolib.v2.data.RenderData;
	import as3isolib.v2.utils.RenderDataUtil;

	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.geom.Rectangle;

	public class TerrainObjectSpriteSheetRenderer extends BaseObjectRendererImpl
	{
		[Embed( source="assets/images/spriteSheet.json.xml", mimeType="application/octet-stream" )]
		static private const SPRITE_SHEET_DATA_CLASS:Class;

		[Embed( source="assets/images/spriteSheet.png" )]
		static private const SPRITE_SHEET_IMAGE_CLASS:Class;

		public function TerrainObjectSpriteSheetRenderer()
		{
			if ( !isRenderDataInitialized )
			{
				initializeRenderData();
				isRenderDataInitialized = true;
			}
		}

		static private var renderDataArray:Vector.<RenderData> = Vector.<RenderData>([]);

		static private var isRenderDataInitialized:Boolean;

		static private function initializeRenderData():void
		{

			var rect:Rectangle = new Rectangle();
			var bmp:Bitmap = new SPRITE_SHEET_IMAGE_CLASS();
			var clone:RenderData;

			var src:RenderData = RenderDataUtil.getRenderData( bmp );
			src.xOffset = -62;
			src.yOffset = -102;
			src.leftSpillover = 12;
			src.rightSpillover = 10;

			var xml:XML = XML( new SPRITE_SHEET_DATA_CLASS());
			var node:XML;
			var nodes:XMLList = xml..SubTexture;

			for each ( node in nodes )
			{
				//create the renderData objects
				clone = src.clone() as RenderData;
				clone.cx = int( node.@x );
				clone.cy = int( node.@y );
				clone.cw = int( node.@width );
				clone.ch = int( node.@height );

				renderDataArray.push( clone );
			}
		}

		override public function render( target:BaseEntityImpl ):RenderData
		{
			var i:int = Math.random() * renderDataArray.length;
			return renderDataArray[ i ];
		}
	}
}

The end result is as expected:

Once I get an idea how this will work, I plan to build an AIR util (possibly with ZaaLabs’ Eden tool) to assemble a BaseObjectRendereImpl subclass that gets placed right into your project.  So it saves from coding the renderer.

Let me know your thoughts.  Thanks.
Justin

 

Participate in the Development of as3isolib.v2

Past Mistakes

One of the mistakes I made in making the as3isolib.v1 was going at it alone.  I did my research and investigated best practices but I didn’t engage a community like I should.  The result is a great library, but a flawed library with many architectural issues.  While these issues can be circumvented with minimal effort, it’s bothersome to me as the architect of this project that they are present.

Moving Forward

I don’t want to make the same mistake in developing v2.  Since April 2010, I have engaged several prolific flash game developers: in helping me inspect v2 code; discuss architectural ideas; and getting the best performance out of the Flash Player.  Now it’s time to start engaging the community.  I want your input to help drive the as3isolib.v2.

In order to kick this off I want to start taking polls.  Then once the as3isolib.v2.core gets to a testable state, I will engage some of the community in closed testing.  That testing will help me to develop the tools for the as3isolib.v2.builder app.

Without further adieu I present the first poll.

Naming Conventions

Now I am somewhat OCD and can mull over naming something for months.  Rather than wasting precious development time hem-hawing over a good naming convention, I’d much rather get your input on it.  There are 4-5 core classes that are used to create content with the as3isolib.v2: an engine, a camera, a canvas, a scene which contains entities.  While most developers could care less about the verbosity of how something is named (thanks to code-completion technology), there is something to be said about readability.  Parsing hundreds of lines of code is tough enough.  Having to pick out hard-to-read strings of text in that code is tougher.  So here are the naming conventions I am thinking about:

Showcase: Zex Lex Duel on Facebook

Gregory sent me a message saying that the he just finished up a game that uses the as3isolib.v1.  Check it out on facebook - http://apps.facebook.com/cp_zexlexduel/

This slideshow requires JavaScript.

Status Update

It’s been a while since I’ve posted anything here other than replying to comments.  I want to say that the as3isolib is very much alive and being worked on.  People are still using the library and the user base is growing daily.

What many folks don’t know is that I am still hard at work on the as3isolib.v2.core which is the “meat and potatoes” of this endeavor.  It’s still very much a solo gig so any progress is a slow and arduous process.

Lastly I think I am going to quit posting to this blog directly (unless I have a good reason to go into detail) and instead use the twitter feed to post the smallish updates when they come.  The twitter feed is http://www.twitter.com/as3isolib

Experimentation

I started working on the as3isolib.v2 very recently.  I can’t say very much other than this is going to be a complete rewrite of the library.  This also means the internal rendering mechanisms are changing significantly. One cool feature that it will allow for is multiple renderings of the same object.  Take a look at this screen shot.  It is basically a rendering of the same IsoObject using different IAxonometricTransformation objects.

The rendering on the left is using a dimetric IAxonometricTransformation and the one of the right is using a DefaultIsometricTransformation object.  In addition to simultaneous transformations, the rendering mechanism will allow for different stylistic renderings.  In this case I was simply displaying wireframes as no materials API has been implemented.

Yes I understand this is pretty lack luster but this illustrates a major change in how the rendering engine works.  Also it should be noted that these two images are not being displayed within a particular scene, rather they are plugged straight onto the main stage.  More feature promos to come.

Understanding iso dimensions and sprites

Many folks have asked how does one size up a sprite assets with the abstract size of the wrapping IsoSprite.  This is a super easy concept not easily explained in words.  So let the following images explain it for you.  Please pardon the crude drawings :)

Assume this is a graphical asset created in a bitmap/vector editing program.

assume you wanted to use an IsoSprite that was 50x30x25.   This shows how to prepare your graphical assets for use in a containing IsoSprite.

Now you can see the overlay of how the graphical asset measures up to the containing IsoSprite.  The size for the IsoSprite is abstract and so things like the shadow of the table can reside outside of the iso bounds and not get calculated in the sorting algorithms.

I hope this clears things up for some of you out there.  Let me know if you have further questions either here or on the users’ forum.

as3isolib + push button engine = :D

Dion, an as3isolib developer recently posted in the users’ forum that he has released an as3isolib + pbe component – http://tech.groups.yahoo.com/group/as3isolib/message/676

There aren’t any tutorials yet but the project lives here – http://code.google.com/p/pushbutton-ooo-extras/

Follow

Get every new post delivered to your Inbox.

Join 28 other followers