The authors employ a repeating MVC pattern for architecting their code. If you’ve ever built anything of complexity – nothing new there. But if not, this is a good place to grok that concept.
In this book you learn to build feature modules – with well defined APIs and strong isolation. They start simple and add complexity and are careful to explain their reasoning all they way through.
Only once in this book did a hit a wall and that was setting up the MongoDb database on a mac. I posted my issue on the discussion forum and got a quick response from the author.
I’m re-reading this book so that I can truly grok the concepts and techniques – and thereby sketch out and build well defined and scoped feature modules of any sort – a day planner, a slide show, a video player – that can be popped into the larger application with minimum fuss.
The bouncing ball logic is all handled by Box2dWebb – which is a port of a physics engine used in ActionScript.
Code break down:
Animation properties (bouncieness, etc) are set up in the init. A bit map (the soccer ball) is loaded into a createJS sprite and loaded on to the stage (canvas). A box2d object is created and added as a property of the createJS objects. On the ticker, the bitmap tracks the x, y position, and rotation of the physics object as it bounces around.
TODO Dive into the Box2DWebb code and figure out collision detection.
Note – As a Flash developer, I have found the CreateJS frame work to be both helpful and a little frustrating. There are a couple key version discrepancies that I had suss out on my own. Although, I did not use Flash for this little example, the CreateJS Toolkit that is built into Flash CC exports versions of the frame work that are not the latest. Apparently there is an update to Flash Professional that is due out soon and this will be addressed.
More canvas game set up experiments forth coming. Stand bye.
I built this game a couple years ago as a demo of coding skills for a client. It’s not a game so much as a template for building a more complex game. And for laughs, there’s the Wilhem scream built in as a sound effect.
How to play: Select a coin, select a square to move to…. or select another occupied square and watch your coin die.
The code is an example of well organized flexible OOP Action-script coding. My general approach to building Flash applications of any complexity is a home-rolled MVC set up, observer design pattern, and the use interfaces… for starters. The complexity of the Flash projects I was taking on in the late 2000s, demanded adopting a flexible code organization. The primary objective was not get it out the door, but rather to build it so we can add bells/ whistles and pull them out on short notice – without starting over from scratch. Here is the code for the game template.
Back from a two week vacation in the desert. I provided guerrilla art support for a number of projects at The Burning Man festival. What does that mean? About 10 days of driving around loaning out tools, jump starting dead vehicles, getting broken equipment fixed, getting crew members moved off of their work site and into their new camp sites just prior to opening night, bringing volunteers out to projects much in need of bodies – in short – getting-it-done. I had a lot of fun riding in and saving the day.
This is my first year in a long time of not being on an art project and of having my own 4 wheel vehicle. I bought this chopped Dodge RAM cargo van on craigslist a week before coming out and it became my rolling office.
If you saw a blue truck rolling around out there doing the same thing, that was my buddy Stephen from the Temple Crew doing the same thing. We didn’t plan that. Being a couple event OGs saw a need and we jumped in.
Artist at Burning Man are on their own in terms of gear, food, supplies, camp infrastructure, etc. There are too many projects for it to be otherwise. However, as the event evolves, more and more artist from around the world who have no experience with this wasteland called the Black Rock desert – one of the most inhospitable places on the planet – are coming out and trying to make a go at. Which provides those of us who have more experience out there, and have the personal connections, to do what we can to keep things moving…. to Get It Done.
I would encourage every participant at Burning Man to look around. Find an art project that is not done. Schlep a bag of ice out to he crew… or some viddles. One crew I spent a lot of time with was eating granola and drinking hot Gatorade for serval days. If someone had shown up with 6 cheeseburgers and cups of coffee on Tuesday night, they might have mustered the strength to finish up sooner. Sometimes a crew just needs bodies to throw stuff on a truck. Jump in! It’s a great way to meet new friends.