Water Waves implementation in cocos2d - cocos2d-iphone

I am developing a game(cocos2d+box2d), where I want to implement waves similar to below link,
http://jayisgames.com/cgdc8/?gameID=7
The above game done it using World Construction Kit for flash.
Is there any one ported similar thing to cocos2d, or any one knows how can i achieve similar using cocos2d, Please help me.

Maybe this tutorial will help you:
http://www.raywenderlich.com/3888/how-to-create-a-game-like-tiny-wings-part-1

Related

Can i use Box2D-objects side by side with Cocos2d-X objects?

Cocos2d-x supports the physics engines Box2D and Chipmunk and i used it until now via Cocos2d-x objects like cocos2d::PhysicsWorld or cocos2d::PhysicsJoint (we're talking C++ here). Now i want to integrate some custom Joint that is available for Box2D. Also, i experience problems with tunneling at high speed that i hope to get rid of by implementing some objects directly with Box2D (b2World etc.).
Is it possible to define some Box2D objects and just add them to the Cocos2d-X physics? And if it's not, do i have to reimplement the whole physics stuff from world-start to fixture-end?
The official Box2D tutorial doesn't mention the native objects at all and seems be a little outdated.
It seems no one is willing to answer this.
As i progressed i can give others looking for an answer the hint, that i think you have to adapt completely to Box2D, create a b2world, add b2bodies etc.
For me it wasn't complicated and the simulation is much more accurate. It solved the problems i was facing with the cocos2dx-objects, so if you run into problems like tunneling or want to use more sophisticated features of Box2D, i'd suggest switching.

Any tools for generating sprite sheets for animation using cocos 2D

New to cocos2D.Giving it a try,I found Blender,a tool that can generate sprite sheet.Are there any other free/open source tools for generating/developing/creating sprite sheet?
I can't live without Texture Packer! It has become almost the standard for cocos2d development. I believe there is a free version which has limited features, I highly recommend the paid version however.
There are lots of great tutorials about it's use. Here is one to get you started.
http://www.raywenderlich.com/2361/how-to-create-and-optimize-sprite-sheets-in-cocos2d-with-texture-packer-and-pixel-formats
Ahh I have been searching for that kind of tool long time and than I wrote mine https://github.com/hazardland/hazardland.java.sprite

simple android code to display cocos2d tile map

I want to develop tile map in my game application in cocos2d android, but I can't find any good and complete code for that. If there is any simple code to display the map please help me
thanks
santanu
AndEngine Supports Tile Map and pretty much mature applying physics Engine Laws as well.
You can start with this tutorial and there is also available tiled map tutorial on AndEngine.
http://www.andengine.org/blog/2010/06/andengine-getting-started-tutorial-video/

Lighting and shadows with Cocos2D and Box2D

I am currently developing a game for iPad & iPhone using Cocos2d with Box2d.
It would have been majorly cool to achieve a lighting effect like the one in this video:
http://www.youtube.com/watch?v=Elnpm-gNI04
and on this link:
http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/
I could have a go at trying to replicate the effect with Cocos2d and Box2d from the description in the link, but I am unsure if I would be able to get very far. It looks pretty advanced and heavy.
How can I achieve this in an "easy" way? Does anyone know of a Cocos2d-version of something like this, or do anyone have some pointers to point me in the right direction?
http://code.google.com/p/box2dlights/
I have succesfully made dynamic light library that use box2d geometry and rayCasting. My library work under gles1.0 and gles2.0 and use libgdx as framework. This is peformant enough for giving dynamic real time lights to 2d games for mobile devices. I can help with porting that to Cocos2D. Basics are darn simple. It was under 100 lines when I first hacked it working for my own game.
Example:
Point light shoot from center n number of rays around it and record the closest collision points. These collision points are used for mesh that is colored with gradient and drawed with additive blending.
Try to look at this link.
http://www.cocos2d-iphone.org/forum/topic/27856
He successfully added simple dynamic light using cocos2d + chipmunk following the technique that Catalin Zima used.
Please note if you download his project and try to compile iOS build, then remove "Run Script" build phase as you may experience script didn't found error. More info to remove such phase can be seen here.

Finding the right tools for programming a futuristic-styled UI project

I've always been inspired by dynamic, futuristic-like user interfaces. The best I can describe is a graphic interface such as in the latest Iron Man movies.
Although I wouldn't build a full blown application, I would like to make little snipplets of animations that I plan to make interactive. And maybe put them together someday to make something bigger. Admittedly, I will use for audio manipulation in the future but anyway, that's not the point since it's the animations/graphics I'm unsure of.
I know it's possible to make those kind of animations in Adobe After Effects. I'm just having a hard time thinking of the processes (artistically and programmability) to proceed.
While researching on this on my own I have acquired basic experience with OGRE 3D and Blender. I've imported and compiled meshes on OGRE, have been able to do basic things like move the meshes around which is about it.
I'm beginning to think I may be approaching this the wrong way and there are better tools or if 3D is overkill for those kind of animations when 2D would suffice and maybe provide a smoother experience.
I'm having trouble understanding the process and am wondering two things:
1.)The main thing I'm having trouble understanding is how to get still graphics to make animations? Do the meshes keep the timeline from a program like Blender then a graphics engine like OGRE reads the timeline and plays them?
Most importantly:
2.)Do I even need graphics (meshes)? Most of the interface are thin-border boxes, text and shapes of transparent LED-like colors that can move around dynamically to make that futuristic effect.
Please share your opinions, suggestions and anything you think might help me accomplish to develop those kinds of sexy eye candy! Thanks.
When you look at awesome futuristic UIs in movies, they are usually made of
basic primitives
desaturated colors, and/or one color tone
transparency
a cool font or two
high-tech text, graphs or similar
simple animations to make things look "alive", blinking lights/text and similar
a touch interface, of course
Maybe you can't do a lot about the touch interface, but the rest is really not hard graphics wise, it's a matter of carefully crafted artwork and combining simple elements in a cool way.
Also I would look into Adobe Photoshop and fancy texturing rather than Blender and fancy modelling, as you are looking for a fancy 2D UI, and detailed 3D models will not be that important. Playing around in photoshop (well, or GIMP if you want a free alternative) can help you develop your art skills, and help you get that high-tech, sci-fi look on a 2D surface.
You know, I would go as far as to suggest making some sci-fi wallpapers in the style you are after before trying to solve this problem in code. I think you will find that photo manipulation skills and an eye for art will help you here. And for gods sake, look at those movies (Iron Man, Minority Report etc.) that have those UIs you are aiming at, and analyze what exactly they are. Decompose them like I did in the list above.
As for the "which tools should I use?", I say the answer to that is fairly simple:
OpenGL
Photoshop (or GIMP if you are a starving student etc.)
A compiler & toolchain
A code editor/IDE
A cup
I see this is tagged C++, which is an excellent choice of programming language if I may say so.
Ogre is a full blown 3D engine, which is fine, but not exactly targeted at what you want to use it for. You might find that you struggle to get what you want done (disclaimer: I have not tried this in Ogre, and it might work well for this. Then again, when did you last see Ogre used in an audio manipulation program?). My advice is to learn good, simple OpenGL. That would give you complete power over your UI, not get in your way or limit you in any way. It is also cross platform, well documented, and used by tons of developers all over the world (also for audio manipulation applications). I can't see how you could possibly go wrong with it. The fun part is that it probably won't take you long to get advanced enough in it to start developing some pretty nice UIs. As I mentioned, it's more of an art problem than a coding problem.
The cup is for the coffee, by the way. :)
The easiest and most efficient way is to keep track of all your graphics data (meshes, animations, effects) in "media files" and load & play them in runtime. Though you'll be able to easily change your game without changing the code.
For example, you have a Diablo-like game and you wanna turn it to the future-style. You just need to rewrite some player and AI scripts and modify meshes/effects/sounds/animations. But if you've done those via code - it will be a new game from scratch.
I would suggest Ogre, but you already used that, so by my opinion, you are on the right track.
Look up 'billboards' in Ogre documentation, re: LED and 2D stuff.