-
Chapter 15
Posted on July 26th, 2009 5 commentsThis is the big one. In Chapter 15, we pull together the concepts learned for math, physics, external data, and good code design and put them into practice. We create a simple platformer game which is highly modular and can be used as the basis for larger -scale games.
5 responses to “Chapter 15”
-
Hey Chris, great book. I’ve been wrestling with this chapter for a while now. What I’m trying to do is call animations from the player.swf in the as files… like “walk”, “jump”, and “static” labels. also, scrolling has been quite an issue. Can you offer any references for me to check out so I can keep going at implementing these features? Thanks.
-
Hi Chris,
I’m glad the book is useful to you. I’d probably need to see a little more of how you’re trying to code it to point you in the right direction. If you’d like, email me a snippet at chris [at] flashgamebook.com. I’d be happy to look it over and see if anything comes to mind. Also, if it’s code you don’t mind sharing, the Discussion forum might prove useful to you for getting multiple people’s feedback.
Thanks for posting!
-Chris -
Muxalko October 20th, 2010 at 23:22
Hi Chris,
Thank you for your book, I find it very helpful !!! Now just stucked at Platformer. I’am not quiet understand the concept of loading assets from XML as Class :protected function getAssetClass(assetName:String):Class {
if (_assetDomain.hasDefinition(assetName)) {
return _assetDomain.getDefinition(assetName) as Class;
}It messages type error while trying to assign:
var wallClass:Class = getAssetClass(walls[i].@spriteClass);
//@spriteClass = StandardWall
–> var wallSprite:IWall = new wallClass() ;
TypeError: Error #1034: Type Coercion failed: Cannot convert wallClass to IWall.
which class is wallClass ???
where can be the error ?
-
this is what exactly does it tell :
TypeError: Error #1034: Type Coercion failed: cannot convert StandardWall@4236ffa1 to engine.sprites.IWall.
Am I miss something .
-
It seems that no graphical elements are referenced or cannot be instantiated ?
Is this because some misspelling in linkage or package import ???
Please help
Leave a reply
-


