Tag Archive for free resources

Free Content for Indie Developers – Part 2

I posted a list of websites offering free content that can be used by indie developers back in 2013. Here is another list of a few more resources that I have discovered since then.

Art Assets:

OpenGameArt – OpenGameArt.org offers a variety of art assets that can be used in your game. Make sure to check the licensing restrictions for each piece you use.

UnLucky Studio – A new pack of free art assets is posted every month.

Royalty Free Music:

Incompetch – Royalty free music that can be used as background music. You must include credits for any music pieces you use. You may also purchase a no-attribution license if you cannot include credits to the composer in your game.

Sound Effects:

sfxr – This is a handy little tool for creating your own basic sound effects for your game.

SoundBible – A variety of public domain and creative commons sounds effects.

Fonts:

FontSquirrel – 100% Free for commercial use fonts. All of the fonts available on this site can be used in your game without purchasing a license.

Check out my first list of free content here: Free Content for Indie Developers – Part 1

How to Make Pong in Flash with ActionScript 3.0

Pong by Jen Ný

Being completely new to Flash and ActionScript 3.0, I turned to online tutorials to learn some of the basics to make my own Pong game. I’ve never made an online tutorial before, but I wanted to help other people who are new to Flash learn how to expand on the tutorials I used to make a better Pong game (and learn more about ActionScript 3.0 and Flash in the process).

I started with a the Pong tutorial from AS3 Game Tutorials. That tutorial is a good start, but will only give you the basic functions of the game. You’ll need to do some more work to get something with all of the bells and whistles of a completed game (start button, ending screen, sound effects, etc.).

In addition to what was covered in the above tutorial, I wanted to give the player a way to win or lose, and have separate ending screens for winning and losing, a way to restart the game at the end, and, of course, sound effects. The following is assuming you have already followed all of the Pong tutorials from AS3 Game Tutorials and have a working Pong game.

Sound Effects

For the sound effects, you will need to import your sound file into Flash. To start, after you have the sounds you want to use, go to file -> import to library and select the sound file you want to use. Navigate to your library panel, right click on the sound file you just imported, and click properties. Make sure Export for ActionScript and Export in frame 1 are checked. Rename the class to something like sndBeep or whatever you want to call it.

Go back to the Actions window. Declare the variable for your sound at the top of your code with the rest of your variables using something like this:

var sndCollision:Sound = new sndBeep();

Where “sndCollision” is the variable name and “sndBeep” what you called your sound previously.

Now simply use code like:

sndCollision.play();

Wherever you want that particular sound to play (for example, every time the ball hits the paddles). Repeat these steps for each sound effect you’d like to include in your game.

I got my sound effects from SoundJay.com.

Start Button

I figured this one out from a forum post on AS2 Game Tutorials. First, simply create your start button (I used Photoshop, but you could just make one right in Flash), giving it an instance name such as btnStart, and place it in your game (it doesn’t matter if it is covering your game. We will hide it upon button click). Now go to the actions window and replace:

init();

with something like this:

btnStart.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent):void
{
btnStart.visible = false;
init();
}

Once the button is clicked, it will be hidden from the screen and the game will start.

End Screen

I also figured this one out from the same forum post as the start button, but I changed it up a bit. The instructions posted there have you simply making a score board to display when either the player or the computer gets to 5 points. I wanted separate screens to show whether the player won or lost, so I modified it a little bit (if you just want a scoreboard or one ending screen, follow the instructions in that forum post. The biggest difference is that I used two if statements, whereas the original poster used one).

First create two movieclip objects, one for winning (instance name winText) and one for losing (instance name loseText). I just used the words “You Win!” and “You Lose!” in the same font that I used for the scores. Place them so that they are overlapping each other, but not overlapping the start button (we will be reusing the start button to restart the game in the next section).

Reopen the actions window and add two if statements like these (one to check if the player won, and another to check if the computer won):

if(playerScore >= 5)
{
stage.removeEventListener(Event.ENTER_FRAME, loop);
winText.visible = true;
}

if(cpuScore >= 5)
{
stage.removeEventListener(Event.ENTER_FRAME, loop);
loseText.visible = true;
}

This stops the game and displays the win or lose text. But we’re not done yet! There’s no easy way for the player to restart the game and continue playing for hours and hours on end!

Restart Button
There might be better ways to include restart functionality to this game, but I couldn’t find any tutorials, and this was the best I could come up with after looking over the code with my limited experience in Flash and ActionScript 3.0. I basically just made the start button visible again, and reset the scores to 0 when the game ends.

To start with, add the following code inside both of the if statements we added in the last section, under where we made the win or lose text visible.
btnStart.visible = true;
cpuScore = 0;
playerScore = 0;

This makes the start button visible again and resets the scores. Now, go to the onClick function that we added when we made the start button. Add the following code:

winText.visible = false;
loseText.visible = false;
updateTextFields();

This will hide the win or lose text, and reset the score text fields to display zero again once the game is restarted.

I think that’s about it. I also added credit text with my name and website address to both ending screens the same way I added the winning text and losing text. You can play my finished Pong game here.

I hope someone found this helpful! As I said at the beginning of this post, I am a beginner at this myself. I’m also new to making tutorials, so if I accidentally left something out or wrote something wrong, let me know!

Free Content for Indie Developers

If you’re just starting out as an indie developer, you probably don’t have a lot of money to spend on your projects. It can be time consuming to create images and music for your games, so you may want to use artwork or music that is already made (either in the final product or as a place holder until you can create your own). Maybe you simply need some inspiration before you dive in to creating your own artwork. Whatever the case, here are a few websites offering free content that you can use in your indie games:

Free Background Images:
BackgroundLabs.com – I have used backgrounds from BackgroundLabs in a couple of my games so far (I will be uploading Crushing Candies, which uses an ice cream background from this site soon).

Free Vector Images:
VectorJungle.com – This site offers a variety of cute vector images that you can use in your own projects for free.
Vector4Free.com – There are a lot of popup ads, and “sponsored ads,” but there is some good artwork available if you are willing to dig for it. Make sure to check the license for each individual file, however, if you plan on releasing your game commercially. Some are for personal use only.

Free Background Music:
JewelBeat.com – You may have to sift through a lot of files before you find music that is suitable for your project, but I have used music from this site for a few of my game projects already.

As always, make sure your read the licensing agreements on any website from which you intend to use content. Every site has their own rules about use and attribution, and they may change their terms of use at any time.