Developing a Flash game from scratch - part 4

Posted on September 25, 2008
Filed Under Flash | Leave a Comment

There’s been a lot of changes to the game since my last post. Hopefully I can remember them all!

I managed to work out how to add animation to objects depending on what’s happening to it so I thought I’d add some eyes to the little ball and then make them blink when he bounces (there’s a bonus triple blink when you finish a level). It took a while to crack how to use Flash frames to load the correct animation but it’s fairly logical and makes sense now.

The sound effect have already started to annoy me (mainly because I’m testing and playing each level hundreds of times but also because they’re not very good). This made me put a mute button onto the console. Which leads me nicely onto…

The console. I needed somewhere to put the game information and buttons etc. so I built a quick console to house: angle and power of your shot, number of lives left (working but nothing to kill you), timer (not working yet), which power up is in effect (power ups are working but I’ve not included them in this release).

All in all I think things are beginning to come together. I’ve added a couple of levels and some other tweaks to the graphics and sound.

On a more boring note, I’ve considerably cleaned up the ActionScript and moved things into classes and functions. This has made creating each level as simple as adding a couple of lines to decide which objects go where. I think the collision detection is better but only more testing will answer that.

At some point I plan to introduce two characters with different characteristics (maybe size and bounciness) which you have to switch between to compete later levels. Hopefully this will add to the gameplay and if the number of switches is limited it should help make it challenging.

So…here’s the latest version, enjoy all 2 levels of it!

NOTE: There’s no instructions in the game so I’ll put them here:

Developing a Flash game from scratch - part 3

Posted on September 23, 2008
Filed Under Flash | 2 Comments

More changes and general refinement of the existing code and graphics. Also added some sound effects and graphic events. There’s even a hint of gameplay in the example below. Can you get to the exit?

I will add to this post later, I need to get the example online in case any of those nice people from Kongregate are going to visit!

Developing a Flash game from scratch - part 2

Posted on September 23, 2008
Filed Under Flash | Leave a Comment

Small improvement all round to the ActionScript and different graphics this time. Again nothing special but testing the possible theme for the game.

Changes to the game include:

All in all, it’s starting to look like a game. We’ve got an objective (get home) and things that get in the way to make it more difficult.

If you find the games run slowly on the Wordpress index of category pages it might be because there’s more than one flash instance running on the page. Try opening the specific post and playing the game from there.

Developing a Flash game from scratch - part 1

Posted on September 23, 2008
Filed Under Flash | Leave a Comment

It begins. So far it’s going pretty well, although I realise that this is only early days. I found a great tutorial from Emanuele Feronato which explains a neat method of moving the ball around using the mouse and a range/angle gizmo. With a few very simple graphics there is the beginning of a simple game on the stage (that’s a new term for me!).

Here’s a list of what’s been added in the order it was done:

I’m pleasantly suprised to see that most of the actual game mechanics is maths within the ActionScript. The beauty of this is that it will be nice and easy to change the physics of the ball.

So, now that I know a little bit more I want to add a few more features to the game:

Current bugs:

I’m not too fussed with fixing these bugs at the moment, I think they’re something to do with the ball going past the defined edge of the screen or floor. Meh, I’ll investigate that one later!

Here’s the current SWF for your enjoyment. Excuse the graphics but at the moment there’s not much point doing anything decent. More soon…

Developing a Flash game from scratch - introduction

Posted on September 23, 2008
Filed Under Flash | Leave a Comment

I figure that as there’s millions of Flash games out there on the Internet they can’t be all that hard to make, right? I don’t mean to say that good flash games are easy to make and I fully appreciate how much time and effort go into making them, but an average game can’t be too hard.

I’ve never touched Flash before so I thought my first ever Flash project should be a game. It should teach me plenty about how to use the software and if I end up with even a half playable game I’ll be happy.

If you’re reading this because you want to do something similar here’s a bit about what I can already do; I’m fluent in PHP, JavaScript, HTML, CSS and all that. I’ve dabbled with Photoshop but am by no means an expert. I’m a web developer. I’ve never worked with Flash beyond embedding other people swf files into my sites.

ActionScript seems to be similar to PHP and JavaScript so I’m hoping to pick that up fairly quickly. As for Flash itself, at the moment it looks very alien and a bit daunting.

Anyway, now that the reason I’m doing this is out of the way here’s what I plan to make:

I’ll be posting updates of each day of development, they won’t be consecutive days because I’ve got plenty of other things to do as well. I’ll list what I’ve learned and how and will hopefully post the work in progress whenever it’s suitable (ie. the game actually works/does something).

Large Hadron Collider: Universal Destruction Test

Posted on September 11, 2008
Filed Under Science | Leave a Comment

With all this hype about CERN’s LHC and the nonsensical hypothesis that it’s possible that it may destroy the universe I thought the world needed a Universal Destruction Test to check on our current status. Check back whenever you’re worried about whether you, and everything around you, actually exists.

Categories