This character sprite sheet is automatically chopped up so the characters are instantly playable using the 'characterVisual' class. |
This will make it easier for players to create custom characters and NPCs in the future. I think I will keep the ability to upload these sheets as administrative-only though, for quality control.
Below is the function that I found online which makes it very easy to extract individual frames from this larger image.
private function cropBitmapData(sourceBitmapData:BitmapData, startPoint:Point, width:Number, height:Number):BitmapData { var croppedBD:BitmapData = new BitmapData(width, height); croppedBD.copyPixels(sourceBitmapData, new Rectangle(startPoint.x, startPoint.y, width, height), new Point(0, 0)); return croppedBD.clone(); croppedBD.dispose();}
You can read about it more on this webpage. This method of importing characters makes importing new characters easy and is vastly superior to my old method of having a 'character' movieclip, and placing each character on a different frame of this movieclip, then in a movieclip within that movieclip having different frames for the different walking animations. Not only is this new method less resource intensive, it will be much easier to import characters. I have already imported over 100 characters, and have spent maybe 1/20th of the time doing it as I did in my Chip N Dales MMORPG game!!!
Lss