Game Programming at scriptedfun » projects http://www.scriptedfun.com Game Programming for Beginners: Video Tutorials, Source Code, and Articles Thu, 11 Sep 2008 17:45:09 +0000 en hourly 1 http://wordpress.org/?v=3.3.1 http://creativecommons.org/licenses/by/2.5/ Multiplayer Dots and Boxes http://www.scriptedfun.com/multiplayer-dots-and-boxes/ http://www.scriptedfun.com/multiplayer-dots-and-boxes/#comments Thu, 11 Sep 2008 17:45:09 +0000 Chuck http://www.scriptedfun.com/?p=117 Hi everyone! I finally managed to complete a game using Nonoba’s Multiplayer API, and this is what I came up with:

Multiplayer Dots and Boxes screenshot

Please play the game now – and bring a friend with you! If you have your own site / blog / page, I highly encourage you to embed the game in it as well. Basically, please help me promote this game all over the net!

I had a lot of fun implementing this classic pencil and paper game, writing the client in pure ActionScript using the free Flex SDK, and the server using Visual C# Express. This is truly an exciting time to be a game developer – multiplayer Flash games that can be played across different sites all over the net can now be built easily using free tools only!

To put things back on track, I hope to release the source code of the game in a week or so, but in the meantime, please share this game with all your friends! Thank you!

]]>
http://www.scriptedfun.com/multiplayer-dots-and-boxes/feed/ 0 http://creativecommons.org/licenses/by/2.5/
Herder – now in Flash http://www.scriptedfun.com/herder-now-in-flash/ http://www.scriptedfun.com/herder-now-in-flash/#comments Thu, 08 May 2008 07:10:47 +0000 Chuck http://www.scriptedfun.com/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! :)

]]>
http://www.scriptedfun.com/herder-now-in-flash/feed/ 1 http://creativecommons.org/licenses/by/2.5/
Herder – a one button web game http://www.scriptedfun.com/herder-a-one-button-web-game/ http://www.scriptedfun.com/herder-a-one-button-web-game/#comments Thu, 08 May 2008 07:09:52 +0000 Chuck http://www.scriptedfun.com/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. :)

]]>
http://www.scriptedfun.com/herder-a-one-button-web-game/feed/ 6 http://creativecommons.org/licenses/by/2.5/
Arinoid with Sound http://www.scriptedfun.com/arinoid-with-sound/ http://www.scriptedfun.com/arinoid-with-sound/#comments Thu, 08 May 2008 07:08:44 +0000 Chuck http://www.scriptedfun.com/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!

]]>
http://www.scriptedfun.com/arinoid-with-sound/feed/ 2 http://creativecommons.org/licenses/by/2.5/
Arinoid – an Arkanoid clone http://www.scriptedfun.com/arinoid-an-arkanoid-clone/ http://www.scriptedfun.com/arinoid-an-arkanoid-clone/#comments Thu, 08 May 2008 07:00:06 +0000 Chuck http://www.scriptedfun.com/?p=5 For our first game, let’s try to write an Arkanoid clone. The graphics in the game were taken from the freely available Spritelib by Ari Feldman.

arinoid screenshot

The prototype contains only one level, and I’m pretty sure that a lot of people out there can do a much better job with level design and color coordination :) . The game is very much playable, although I think there are better ways of implementing the ball/brick “physics”.

So this is how it’s going to work (this will be the general routine for most of the games): this first post will include a general overview of the project, and a zip file containing the prototype. The next posts shall discuss how the game was put together. Along the way, I hope to gather comments, suggestions, and help :) from everyone, and these will all be factored into the next iteration of the project. This process will just repeat itself until we come up with something that most, if not all of us, will be happy about :) .

This game was written in Python, using the Pygame library. For me, Python is great to work with, and I would recommend it as a good first programming language. As most of you already know, Python code is very readable, and this is very important for an undertaking like this. I would just like to stress that this project could have been implemented in any other language – the choice of language is mainly due to personal preference.

To understand what’s about to happen, I would consider a working knowledge of Python as a prerequisite. For those of you who already know how to program, I assure you that you can easily pick up Python. With some basic knowledge of C and familiarity with programming, I was able to learn Python by reading the Python Tutorial that comes with the Python package. I think that a weekend is more than enough to go through this tutorial.

For those who haven’t programmed before, the Python website has a Getting Started page, which includes resources for non-programmers. If you’re a non-programmer, I encourage you to give it a shot! :) I was a non-programmer myself before, and I think that the effort was worth it.

To run the code, you will need to have Python and Pygame installed. Here is the zip file which contains the Arinoid source code and graphics (this should work for Windows, Mac OS X, and Linux).

arinoid source

]]>
http://www.scriptedfun.com/arinoid-an-arkanoid-clone/feed/ 9 http://creativecommons.org/licenses/by/2.5/
Particle Invaders update 1 http://www.scriptedfun.com/particle-invaders-update-1/ http://www.scriptedfun.com/particle-invaders-update-1/#comments Sat, 17 Mar 2007 14:11:34 +0000 Chuck http://www.scriptedfun.com/particle-invaders-update-1/ I thought of changing some lines in the Particle Invaders code to make the particles emitted by the shots and the bombs more interesting. Go ahead and grab the source. You can try running the previous version and the current one to see the difference.

If you’re looking for an exercise, maybe you can try modifying the previous version’s code to match the behavior of the current version without looking at the new code? :)

]]>
http://www.scriptedfun.com/particle-invaders-update-1/feed/ 0 http://creativecommons.org/licenses/by/2.5/
Intel® Game Demo Contest 2007 http://www.scriptedfun.com/intel%c2%ae-game-demo-contest-2007/ http://www.scriptedfun.com/intel%c2%ae-game-demo-contest-2007/#comments Sat, 17 Mar 2007 13:58:54 +0000 Chuck http://www.scriptedfun.com/intel%c2%ae-game-demo-contest-2007/

Intel® Game Demo Contest 2007
Show us Your Game!
Win great exposure and your share of over $95,000 worth of Prizes, including:

  • Meetings with game company executives — for a possible bundling deal
  • A Gateway gaming machine worth at least $3,000
  • $5,000 in custom art for your demo
  • A Giga pass to the Game Developers Conference 2008
  • Copies of Garage Games’ Torque Engine Advanced and other content prizes
  • An International Game Developers Association membership
  • A full suite of Intel® Software Development Products
  • and of course, loads of cash.

If I find extra time on my hands, I’m really considering joining this contest. I think that this is a great opportunity – and the prizes are really attractive :) .

More importantly, by joining this contest, there’s a need to follow the set deadline – executables must be in by August 15. Having a clear deadline helps in setting concrete dates for milestones, etc.

Regarding the chance of winning, Intel has given a very encouraging words on this:

The chances are good! AAA developers often have exclusive deals for distribution of their game demos, or they have an existing technology relationship with Intel which would disqualify them from the contest. We expect that the vast majority of our entries will be from small developers and student groups.

Intel also hosted a similar contest last year, and the 2006 winners page should give everyone a good idea of what constitutes a winning entry.

There’s a special mention of GaragegamesTorque Game Builder and Torque Game Engine products. Fortunately, I won indie licenses to these products some time ago, and hopefully they’ll be put to good use in this competition.

I’ll see all of you at the competition! And hopefully, I’ll see myself as well! :)

]]>
http://www.scriptedfun.com/intel%c2%ae-game-demo-contest-2007/feed/ 0 http://creativecommons.org/licenses/by/2.5/
Particle Effects for Games http://www.scriptedfun.com/particle-effects-for-games/ http://www.scriptedfun.com/particle-effects-for-games/#comments Sat, 17 Mar 2007 11:33:03 +0000 Chuck http://www.scriptedfun.com/particle-effects-for-games/ I would like to apologize for not being able to post in a very long time. The schoolyear’s about to end here in Manila, and there is still a lot of work that needs to be done.

I needed a break, so I came up with this very simple demo of particle effects for Pygame, which I suspect might be useful to game programmers in general, particularly those who use SDL.
Particle Invaders screenshot
For those of you looking for a distraction, this demo was implemented as a “Space Invaders“-type gamelet, with PLENTY of room for improvement :) . As always, the graphics were taken from Ari Feldman’s very useful SpriteLib. Grab the source now!

To implement the particle effects, I implemented a Particle class that needs to be given the following information:

  1. initial position (x and y)
  2. initial velocity (x and y)
  3. acceleration (x and y)
  4. particle size
  5. “color structure”

Numbers 1 through 4 are self-explanatory. The particle is drawn as a square with the given side length, then it is placed on screen at the initial position. Then, at every frame, its position is changed by the amount prescribed by the velocity. At each frame also, the velocity is changed by the amount prescribed by the acceleration. By tweaking the velocity and acceleration, together with the use of random numbers, it’s possible to come up with interesting movements for the particles. If you want to make things more interesting, you can experiment with nonconstant acceleration by defining acceleration as a function of time.

But we all know that particle effects are primarily used for eye candy, and can produce spectacular results by playing with the colors. This is where the “color structure” comes in. Basically, the “color structure” is a list of tuples of the form:

(initial rgb, final rgb, duration)

The purpose of this structure is to set the initial color of the particle, then smoothly change the color to the final color over the number of frames set by the duration.

Since “color structure” is not just a single tuple, but a list of tuples, it is possible to chain together a sequence of color transitions in order to make more sophisticated effects. For instance, the explosions from the enemies are actually a combination of two color transitions: random color to white for 20 frames, then white to black for 10 frames.

The particles emitted by the shots from the player simply change color from a random shade of orange to black. You might find the particles emitted by the bombs interesting: the particles change from either orange or red, then go to black – this results in an interesting “fire-like” effect.

This is a VERY simple particle engine, only meant to show the basics. Feel free to experiment with the code, and if you come up with an interesting particle effect or an interesting modification to the code, I’d really appreciate it if you could share it with everyone :) .

Perhaps there are other topics which you would like covered in this site? Feel free to send me an e-mail or leave a comment :) . Thank you and I hope you find this useful!

]]>
http://www.scriptedfun.com/particle-effects-for-games/feed/ 2 http://creativecommons.org/licenses/by/2.5/
DonationCoder.com Accessibility Game Coding Contest http://www.scriptedfun.com/donationcodercom-accessibility-game-coding-contest/ http://www.scriptedfun.com/donationcodercom-accessibility-game-coding-contest/#comments Fri, 05 Jan 2007 12:32:05 +0000 Chuck http://www.scriptedfun.com/donationcodercom-accessibility-game-coding-contest/ Finally! I was able to upload my entries to DonationCoder’s contest, despite the problems that I was having earlier. I was able to find a computer with a good internet connection (thank you!) :) . I will be making posts about this at this forum page on DonationCoder.com. Thanks in advance for trying my games! ;)

]]>
http://www.scriptedfun.com/donationcodercom-accessibility-game-coding-contest/feed/ 3 http://creativecommons.org/licenses/by/2.5/
Finishing a game… http://www.scriptedfun.com/finishing-a-game/ http://www.scriptedfun.com/finishing-a-game/#comments Mon, 11 Dec 2006 06:00:47 +0000 Chuck http://www.scriptedfun.com/finishing-a-game/ Over at the Indiegamer forums, they’re running a thread asking what everyone is currently working on. I’ve decided to participate:

bounce game screenshot

Basically, the objective here is to prevent the characters from falling by catching them with the flying creature at the bottom edge of the screen, which you control.

Right now, I’m using graphics from Spritelib, but hopefully I’ll be able to put in original graphics once all the code has been ironed out.

I know that this may seem to be a very simple attempt for most – and that’s exactly the point. Right now, all I want is to have a finished, polished game under my belt – and I think that I’ll be able to accomplish this by starting small, starting simple. I’m hoping that this will be the start of a fruitful game programming career.

What are you currently working on? :)

]]>
http://www.scriptedfun.com/finishing-a-game/feed/ 8 http://creativecommons.org/licenses/by/2.5/
Shooting Mechanism Demo http://www.scriptedfun.com/shooting-mechanism-demo/ http://www.scriptedfun.com/shooting-mechanism-demo/#comments Mon, 11 Dec 2006 05:32:48 +0000 Chuck http://www.scriptedfun.com/shooting-mechanism-demo/ As a follow up to the background scrolling example, I’ve modified the 1945 code again to emphasize how the shooting mechanism works.

shooting mechanism example

Basically, the player is given two options for shooting:

  1. Every distinct click of the left mouse button guarantees one shot.
  2. Holding the left mouse button will make shots appear at regular intervals (rapid fire).

In a way, this gives the player the incentive to click if he wants a more rapid rate of fire, since you can effectively increase the intervals at which rapid fire gives off shots.

Feel free to ask questions! :)

shooting mechanism source code

]]>
http://www.scriptedfun.com/shooting-mechanism-demo/feed/ 2 http://creativecommons.org/licenses/by/2.5/
1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214| buying hydrochlorothiazide on line tablets buy trentaltricor and cost karela order online canada coumadin online pharmacy without a prescription buy generic trental no prescription cheapest bactrim pills bystolic buy online cheap buy generic hydrochlorothiazide xenical buy buy pills accutaneAccutane Online Doxycycline online Buy Cheap Lexapro Online No Prescription Prednisone Online Buy Accutane No Prescription