Mohammad Azam is working on a serious of Tutorials with the goal to write a complete iPhone game, called Space Demon. You can view a demonstration of the game here:

So far, the Tutorial has 3 parts:

  • Part 1 – setup, particle effects, animated background
  • Part 2 – refactoring, code architecture
  • Part 3 – moving the ship, shooting and getting shot, enemy

Today I’d like to present you a long post made by Markus Nigrin about How to spice up your Game with Particle Effects. He talks about how to use particle effects in your Cocos2D game to, well, great effect. Of course he is using Particle Designer, and he was amazed how few people at the 360iDev event knew about PD. So I thought it can’t hurt to mention it one more time.

Markus’ blog is generally well worth taking some time and digging deeper. He has a post on adding a “News” text (or image) into your game and what effect it can have for marketing and how he got back into programming after 15 years of being a manager, and partially inspired by Ray Wenderlich‘s iPhone Programming 101 class held at 360iDev.

Back on the topic of particle effects, I recently created a very simple but very effective snow storm effect. You can check it out in Particle Designer’s shared effects list (it’s called “SnowStorm”) or download the SnowStorm effect in the Cocos2D plist format. There’s also a shared “PeeFX” effect that I created, subtitled “stream of urine”. Those are from a project I’m currently working on. Hmmm … pee and snow?

Keep guessing. 😉

Add your link to the Cocos2D Linkvent Calendar

Do you have something to share with the Cocos2D community? I haven’t received enough submissions to fill all the days until Xmas, although I do have enough links to post one each day, I’d rather post a link to your website or blog post.

cocos2d Book, Chapter 10: Working with Tilemaps

On August 28, 2010, in Announcements, book, cocos2d, by Steffen Itterheim

Chapter 10 – Working with Tilemaps

This chapter dives into the depths of the CCTMXTileMap class and how to create, iterate and modify tilemaps in code, including isometric and hexagonal tilemaps. Of course there will be an introduction to the Tiled Map Editor as its the primary tool to create TMX tilemaps that cocos2d supports.

The chapter 11 will then use this newfound information and I’ll walk you through making a scrolling tilemap game, since simply loading, modifying and displaying a tilemap would just be half the story.

Summary of working on Chapter 9 – Particle Effects

This chapter was fun. Particle effects are fun indeed. That is, unless you need to tweak them in code only. I did do that an did my best to describe what each CCParticleSystem property does to a visual effect, although some things you’ll have to see for yourself. You’ll find a lot of detailed information on how to setup or simply modify a particle system in code and a couple tips for designing good particle effects.

Of course with Particle Designer everything changes. Designing a cool particle effect suddenly goes from a treadmill to a mesmerizing activity that you can waste countless hours on. If you check Particle Designer’s Online Library you’ll find four of the Particle Effects that I designed and submitted, starting with the “Colorful Burst” effect. Have a look!

Obviously these cool effects needed to go somewhere, so I added them to the Shoot ’em Up game as you can see in the screenshot (the boss just exploded into purple smudge). Along the way you learn how to load the particle effects created by Particle Designer of course.

cocos2d Book, Chapter 9: Particle Effects

On August 21, 2010, in Announcements, book, cocos2d, by Steffen Itterheim

Chapter 9 – Particle Effects

Those tiny specks which you can see on your touchscreen after a sneeze.

Not exactly. Of course I mean the cocos2d particle system and its built-in particle effects which will be the focus of this chapter. And no discussion of particles would be complete without describing the workflow revolving around the Particle Designer tool.

Summary of working on Chapter 8 – Shoot ’em Up

This certainly wasn’t the easiest chapter for me to write. I had very ambitious goals, maybe too ambitious for 27 pages. I did manage to sneak in quite a lot though, here’s a partial list:

  • how to refactor existing code to make it work better with the new features
  • how to pool bullets and enemies together for easier access and better performance
  • how to not use too many subclasses, instead relying on type switches
  • how to use cocos2d’s node hierarchy as a simple component system for writing reusable game logic components
  • how to implement basic movement, shooting and a healthbar as components
  • how to detect collisions between bullets and enemies

The not so easy part was striking the right balance. Not going too technical. Not doing too much at once. Not dividing things into too many tiny pieces. But most of all I frequently encountered various bugs in the code, or just unexpected behavior of cocos2d which forced me to spend more time debugging and sometimes backtracking changes than I was prepared for.

After a long and hard work week, paired with physical exhaustion and an late-summer allergy burst, my concentration didn’t allow me to work at 100% capacity. In the end I did manage but it took longer than I had planned, I’m over a day late to submit this chapter. The next one will be easier though, and it has to be as I’m preparing for a short trip near the end of next week. I certainly am looking forward to a couple days off now. :)