Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I started developing my very first game 3 months ago using Cocos2d 2.0 for iPhone. I am now in the stage where I'd like to add some cool effects to the bullets and some special weapons (see my waveforms question here). I got a good answer in the cocos2d-iphone forum (see this one).

Unfortunately I am a bit paralized now. I don't know if I will be overdoing by learning OpengGL 2.0 or if I should just stick ot the old 1.0. There is a good intro on various tutorial's written in Steffen Itterheims blog (see this post).

I would like to add to my game:

  • a blur effect to the bullets (here is a tutorial for OpenGL 1.0)
  • a waveform (see above)
  • some realistic water ripples (here is a nice sample code)

So now, given that I don't want to overdo things but at the same time I want to achieve those effects, from where should I start? Should I discard the OpenGL 1.0 tutorials? OR should I use only OpenGL 1.0 code?

How can I avoid confusion? I mean, it seems that the compiler recognizes both, but that there are some conflictual calls in some circumnstances, I am fairly sure this has some explanation, is there some reference to this somewhere?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Look at the "Shader Test" in the Cocos2d samples.

https://github.com/cocos2d/cocos2d-iphone/blob/master-v2/tests/ShaderTest.m

This applies a Blur fragment shader to a CCTexture2D object from your CCSprite.

As for the other shaders you can find a bunch of running samples here:

http://www.iquilezles.org/apps/shadertoy/

This should get you started.

share|improve this answer
    
Fantastic, thank you very much :) –  mm24 Nov 5 '12 at 13:39
add comment

Have you tried looking at particle emitters?

http://particledesigner.71squared.com

Download that and check out the particle emitters on there, they do what you're after (blur effects and water ripples).

You add the files to your game like so:

http://www.cocos2d-iphone.org/forum/topic/7777

Add them to your resources folder and add them like that.

share|improve this answer
    
thank you, I tried 71squared and it doesn't seem to be able to achieve a waveform as I'd like. –  mm24 Aug 5 '12 at 12:45
    
Thank you for your reply, I accepted the other one as more specific to my question but thanks anyway.. –  mm24 Nov 5 '12 at 13:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.