Dynamic Shadows w/Cocos2d and Box2d

Forums Programming cocos2d support (graphics engine) Dynamic Shadows w/Cocos2d and Box2d

This topic contains 4 replies, has 3 voices, and was last updated by  MikeSz 2 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
Author Posts
Author Posts
May 25, 2011 at 12:22 pm #231633

wickedlittlegames
Participant
@wickedlittlegames

Hey,

Wondering if anyone has had any success getting dynamic shadows to work in a cocos2d environment. Have recently found this article which talks through the process of creating dynamic shadows for XNA – but was interested to see if there were any Objective C/Cocos2d specific guides out there?

Cheers!

May 25, 2011 at 2:18 pm #331076

MikeSz
Participant
@mikesz

The method you linked is based on shaders, not sure how to implement it ;)

I have implemented 2D shadows using a different method ( here -> http://forums.tigsource.com/index.php?topic=8803.0 )

Not sure which one is faster or more efficient

May 25, 2011 at 3:59 pm #331077

cocoBavan
Participant
@cocobavan

@MikeSz : Have you played Helsing’s Fire, the fantastic ios puzzle game ? :)

May 25, 2011 at 10:29 pm #331078

wickedlittlegames
Participant
@wickedlittlegames

Thanks Mike – Did you find it difficult to apply the technique to an Objective C/Cocos2d environment?

May 26, 2011 at 9:35 am #331079

MikeSz
Participant
@mikesz

@cocoBavan – of course I did. Actually I was looking at that game and wondered how to do it myself (let’s say I treated it as a challenge). We had some ideas about possible games using the system, but we never went ahead with any of them ;) I treat it as an “academic” project :P

@wickedlittlegames – hard to say. The shadows part using Box2d – that was easy, really easy. Just changing one language to other, no problems at all. But that’s as far as I went with it. I did not attempt to create a game out of it or to use the shadow data to generate shadow textures. All I did was calculate shadows and display using Box2d Debug Drawing

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.