Game Programming at scriptedfun

Game Programming for Beginners: Video Tutorials, Source Code, and Articles

Subscribe via e-mail!

Enter your email address:

Delivered by FeedBurner

Music and Sound Effects for Games

A great article called Tools of the Trade has just been posted on MochiLand. It gives a list of software and libraries which you can use to generate sound effects and music for your games.

Among the different aspects of game development, I think I’m weakest at sound matters. This is something that has to change though, with the success that audio-based games have been having, such as the IGF winner Audiosurf and the Python-based Frets on Fire.

It’s good that Kunal Joshi pointed out in the comments the amazing DrPetter’s sfxr, an excellent (and free!) piece of software that generates retro-style sound effects. This was used by Kian in his very funny, and VERY ORIGINAL (you have to see it!) game You Have To Burn The Rope.

20000+ views over 4 days for my first Flash game

Please help promote my game Herder by digging it!


My switch from Pygame to the Flex SDK was primarily motivated by the potential of Flash games to reach a large number of people, and consequently, to generate more revenue. After writing my first Flash game, Herder, about 2 months ago, I was somewhat disappointed by the poor performance the game had - only a little more than 1,200 views. This was before promoting the game.

Of course, I had to get the word out! I thought that this was something that was going to happen automatically. I read several resources on promoting Flash games, and I found the following two particularly helpful:

Following the advice given by these two articles, I started promoting my game last Thursday, and I wound up with these GameJacket stats:
Impressions for Herder 4 days after starting promotion
As of the time of writing, I’ve accumulated 22,102 views, majority of which was obtained only over the past 4 days (the last point on the graph corresponds to today, so I still hope for it to go up).

What I actually find more interesting are the high scores (thanks to MochiAds Leaderboards) that players have been getting:
High Scores for Herder 4 days after starting promotion
As of the time of writing, 654 scores have been recorded, and the top scores are very impressive! Personally, I can only manage about 60, or about 70 if I’m lucky! :)

Of course, the stats that I have posted are a long way from the stats of really successful Flash games, but the successes of these Flash developers serve as inspiration for me. It’s only been 4 days, and I honestly think that things can only get better. 20,000+ views in 4 days is definitely better than 1,200 in 2 months, so it’s really an improvement for me! :) I hope to promote the game more over the next few days, and hopefully learn from the experience so that I’ll be able to better promote the other unreleased games that I have coming up.

In the meantime, I invite you to try the game, and if you want, you can help increase the game’s exposure by putting the game on your own site - you can download a distribution pack.

Also, I’ve put the game up on some places where you can vote on it, in particular at Digg. I’ve placed a Digg This button at the top of this post for the game - please vote for it!

I hope to write more about writing Flex games over the coming weeks - stay tuned! :)

Make a Flash Game for Free

One of the main reasons why people aren’t able to make their own Flash games is because the development environment is expensive. Currently, a copy of Flash CS3 Professional costs US$699, an amount which most people can’t just pull out of their wallet (although I think that this price is very reasonable, considering the product’s quality and the possibilities that it offers).

Fortunately, there are several alternatives to Flash for making Flash content. One of these alternatives is the Flex SDK, a free product which Adobe itself offers.

I’ve spent some time with the Flex SDK over the past months, and I’ve had success in writing games with it. Herder is my first game with the Flex SDK, and I have a few others which I haven’t had the chance to release yet. The Flex SDK is NOT Flash however - the development style is different. But this is good in my opinion, because making games with the Flex SDK is very similar to making games with a traditional programming language like C++, C#, or Python. Instead of the graphical approach that Flash offers, the Flex SDK offers a code-centered development platform.

If you want to make games for the web now, I suggest that you look into the Flex SDK. With this product, you can even make Flash content using Linux!

The article Intro to the Flex SDK on GameDev.net is a good starting point for anyone who wants to learn how to make games using the Flex SDK. Hopefully, I’ll have the chance to make my own tutorials as well. Any suggestions? :)

Sorry, e-mail subscribers! And some thoughts on web games with Python…

Hi everyone! First of all, I would like to apologize to all the e-mail subscribers who received a bunch of old posts in their e-mail recently. I’ve been tweaking my site to feature the content people find most useful on the front page, and this had the unintended side effect of sending out an e-mail containing the “front-paged” articles. I hope that this didn’t bother you.

Yes, it has been a very long time since I posted on Python. As I have said some time earlier, I’m trying to refocus this site to deal with more general game development. A side effect of this is, I’ve spent a lot more time coding and learning, and no time writing :( . In particular, I’ve been looking at writing games using Adobe’s Flex SDK.

I find working with Flex appealing because of the potential of the output to reach a large number of people. But Python is a language that is very close to my heart, and I’d be very interested in a Python based environment that would allow me to make games for the web. Fortunately, such an environment exists already, in the form of Microsoft’s Silverlight, paired up with IronPython. I’ve been dabbling with this platform as well, and I hope to write games for it once the platform matures.

If you’re interested in learning more about writing web games with Python, I recommend the excellent article Creating a Game Using Python and Silverlight 1.1. Are there any other resources about game programming using Silverlight/Python that you would recommend?

Herder - now in Flash

Herder, a one button game, now in Flash!

I haven’t posted anything in a very, very long time, and I apologize for this. Recently, I have had time to pursue game programming again, and as a result, I was able to learn programming Flash games using the free Flex SDK, a programmer-oriented SWF development tool from Adobe. For my first project, I have decided to rewrite my favorite one-button game, Herder, and it is now available to play on my site, and also on Facebook, if you want to compete with your friends for the highest score. Here’s a video:

The video and screenshots are available on the game pages. I hope to write more about this project and Flex programming in general, but in the meantime, I’d be happy to hear your comments. Enjoy the game! :)

Herder - a one button web game

Play Herder Now!

Hi everyone. I know that it’s been a very, very long time since I last posted. I’ve been doing some thinking about the direction that this site should take, and I was able to make some “preliminary decisions” in the process, which I hope to explain more in a future post.

In the meantime, I would like to present my most recent project, Herder, which you can now play online using any Java-enabled browser. Basically, this is a port of one of the Python/Pygame projects that I did before, and is my first project made with the Processing programming environment, which I’m trying to learn to use at the moment.

I’d love to hear about what you think about the game, and I would really appreciate any comments and suggestions that you may have. Please post them below. Thank you so much for trying out Herder, and I hope you liked it. :)

Arinoid with Sound

Arinoid now has sound! I think that sound plays a very important role in the overall game experience, and I hope that you will all like this minor update.

Download Arinoid with Sound. Requires Python and Pygame.

The sounds were taken from Flashkit, which I think is a fantastic resource for game developers looking for free sound effects and free sound loops for background music. There are many sound samples to choose from, and they are neatly categorized to make browsing easier. What makes browsing the sound collection fun is the site’s use of preview consoles, which allows the user to play sound samples on the page, with matching visualization. Once you find what you want, you may download the sound sample as an MP3 or as a WAV, which may be used immediately in your game, or edited using an audio editor like the highly-recommended Audacity.

Picking sounds for this project was a very interesting activity - there were so many sounds to choose from! I hope that my choices were okay :).

I would really appreciate it, and I’m sure everyone would, if you know of a resource which can help game developers add sound to their games easily, just like Flashkit, and share it with us! :) Just leave a comment if you have something in mind. I suppose that these types of resources will be particularly useful for those who plan to join PyWeek 3 :). Thanks in advance!

Video Tutorial 4 - Arinoid - Ball Physics

arkanoid clone ball physics

At last, video tutorial 4 is here! I would like to apologize for the terrible delay, and thank you so much for your patience! :)

You may notice some mistakes in the screenshots though - in particular when the code that converts between integers and floating point numbers is displayed. The highlighted code is correct, but the way that it appears in the following slides (without the float and int conversions) is incorrect.

The transcript for this will be available shortly, and the fifth video tutorial is in the works. Thank you so much, especially to all those who have left comments of encouragement! They really keep me going :). I hope you find these helpful!

[Read the rest of this entry...]

Transcript 3 - Arinoid - The Paddle

Hello and welcome to scriptedfun.com screencast number 3. Today, we will continue building our game Arinoid by adding a paddle. We will use the paddle to deflect the ball, and we want to be able to control it using the mouse.

paddle image in the sprite sheet

The paddle image is contained in our sprite sheet. However, the image spans two tiles, which means that we cannot just extract the paddle image from the sprite sheet and use it as is. We have to get rid of the boundary at the middle. We can do this by extracting the left and right halfs of the paddle image, and joining them together. We will do these things without resorting to manual image editing. Since we want to be able to use the sprite sheet without manually editing it, we will do all the image manipulations within our program.

[Read the rest of this entry...]

Video Tutorial 3 - Arinoid - The Paddle

Finally! Today, we will be adding the first sprite in our game, the paddle, which is controlled using the mouse. At this point, we will be able to benefit from the setting-up that we have done in the first two screencasts.

paddle sprite

[Read the rest of this entry...]

Transcript 2 - Using Sprite Sheets and Drawing the Background

Hello again and welcome to scriptedfun.com screencast number 2. Today, we are going to look into using sprite sheets and drawing the background for the game Arinoid.
arinoid sprite sheet
The graphics for Arinoid were all taken from a single bitmap file called a sprite sheet. We have to find a way to extract the graphics that we need from this file and use them in our games.

[Read the rest of this entry...]