I’ve been spending quite a bit of time on my latest game project which, like many other games, requires collision detection. Knowing that using brute force for broad-phase detection wasn’t an option, I implemented a spatial hash to partition the world’s game objects into manageable groups. At this point, I was ready to tackle the narrow-phase portion and immediately sought to use a form of pixel-perfect collision I’ve grown to understand and use fairly well. Unfortunately, this type of detection is inappropriate for a lot of things and an avatar moving along a tile-based set is one of them. It can be fairly costly and is better suited for boolean-based tests. After trying to force this algorithm to do something it shouldn’t, I finally settled down and visited a form of collision I had known about for a while but had not the need to implement…until now.
In part one, the focus was on building the server logic for a multiplayer game. Now, we’ll get to work on a PushButton Engine client that will connect and communicate with ElectroServer. If you’re completely unaware of how PushButton Engine works, I’d urge you to spend some time checking out the documentation to get yourself up to speed.
Let’s get started!
There are many options available when deciding on which Flash engine or framework to use before development begins on your next single-player project. Should you decide to add multi-player capability, the list gets shorter. This is especially true if your game crosses over into the MMOG or Virtual World domains. Code reusability, game asset management and premium performance are all key to successfully reaching that goal. PushButton Engine satisfies these criteria and more by offering a component-based architecture, dependency injection, a robust engine core and a strong community.
When deciding on which server technology to use it’s quite a different story. The list of viable options is much shorter. Scalability, maintainability, extensibility and price all come to mind when shopping around for the right product. The RedDwarf server (formerly Project Darkstar) is tempting due to it’s cost (free) but developers who are interested in simply writing their game code may become discouraged due to it’s steep learning curve. Enter, ElectroServer. When I recently started exploring ElectroTank’s flagship product, I was hooked on it’s highly-polished API and how dead-simple it was to get up and running. Couple that experience with it’s potential to scale to hundreds of thousands of simultaneous users and it’s difficult to find a better option.
The beauty of writing AIR applications is how easy it is to skin the user interface in whatever way you choose. It allows you to spend more time refining that interface instead of worrying about getting it to work. So in the spirit of refinement, let’s take a look at how simple it is to skin an AIR application’s window chrome (or TitleBar) to suit the expectations of users on both Windows and Mac.
Not too long ago, I struggled with embedding fonts in my AS3 app that I build with Ant. Building my .swfs with Ant has been my practice for quite a while but embedding fonts wasn’t. It took some time but I finally figured it out. Everything was fine until I tried to build using Flash Builder which kept reporting transcoding errors.
So how do you enable proper transcoding of fonts in Flash Builder? Add the following to your compiler options.
-managers flash.fonts.AFEFontManager
If this doesn’t work, let me know. Docs on embedding fonts seems to be in short supply so I’d like to collect as much information as possible.
Week 7 is here! This has been the most difficult week so far. Trying to juggle family, work and S’troidz! proved to be difficult and thus, S’troidz! had to suffer. The good news is that it wasn’t totally unproductive. I managed to implement the majority of code needed for the final alien type and that alone represents a pretty important milestone on the horizon: The completion of all major game objects!
Week 6 has arrived along with hyperspace jumps and shields! I struggled with how shields should work but ended up settling on the most destructive method (destruction usually equals fun). This means that when shields are up, your ship becomes a weapon allowing you to smash through anything.
It’s been an incredibly busy two weeks. Unfortunately, not so much for S’troidz! The good news is that I accomplished the goals I set for myself, was mega-productive at work (or my “real’ job) and managed to retain some semblance of a life outside coding. As difficult as it was to stay away from S’troidz!, the break actually served me well and the batteries are charged for another push.
OK, so what’s new in S’troidz! r5? Let’s see!
I’m continually amazed at how difficult game design is. I was reminded of this during the r4 dev cycle when I started implementing power-ups and other goodies. Given the platform I’m building on, it was easy. Adjusting the game play so that it was still fun was tricky and required a change to how the ship moves.