How to collide player with obstacles in cocos2d-x - cocos2d-x

I am beginner and i am developing a game using cocos2d-x in x-code for ios, and i need to collide my player with obstacle please help me to sort out this.

There really needs to be more information to help, here is some documentation: http://www.cocos2d-x.org/wiki/Chapter_5_-_How_to_Detect_the_Collisions
In essence you will be checking the bounding box of each to detect if they intersect somehow.
Or use Box2D.

Related

Collision filtering in libgdx using Liquidfun

I successfully implemented liquidfun extension in my libgdx/box2d project, but the particles that are created in the box2d world doesn't seem to collide with anything at all when used in my project. The test code given with the setup works good in the way that it collides with the rigid bodies.
I actually want to know any way that collision filtering can be done between the particles and rigid bodies here. Apparently categorybits/maskbits do not work here. Please Help!

Using Physics Editor and using it's .plist Cocos2d-x V3 for better collision detection

I was working on a cocos2d-x project. Its a simple game. Everything is working right apart from collision. Though, It is working but collision is not very realistic. I browsed and discovered something called - Physics Editor. I read tutorials from - http://www.codeandweb.com. It generates a .plist of your sprite. I'm making game for android in c++.
Now the problem -
How to use that .plist with cocos2d-x V3.8. Is it a good idea to make collision detection better this way?
I want to start with box2d and chipmunk but there are no good and new tutorials. In case you have anything, Feel free to suggest. Thanks is advance !
Actually Physics Editor itself provides special C++ class for loading its plist and creating PhysicsObjects from it.
You can easily get it on github: https://github.com/CodeAndWeb/PhysicsEditor-Loaders/tree/master/cocos2d-x

Action Script 3 - how to pass variables through multiple scenes

I am using flash cs6 and making a game in which some squares are falling down randomly and we have a wall that is controlled by the mouse. Every square we dodge 10 points are added to the score. If the squares touch the wall then we go to another scene called the "the end" scene in this scene we display the score to the player. So I want to pass the score variable to that scene. I have tried googling it a lot of times but it couldn't help. So my only hope is you guys. Please help.
How do I go to the next scene:
if (wall.hitTestObject(square))
{
gotoAndStop(1, "The End");
}
Instead of using flash to create games like this you can Game Maker it is more efficient.
You can go to its website yoyogames.com
Adobe Flash Professional Creative Suit series are for designers, animators. It is one of the worst IDEs for a programmer (notepad would be better). I'd suggest you to get a better IDE like Adobe's Flash Builder which is more suitable for programmers or search for other 3rd party IDEs like IntelliJ Idea which is one of the best from my point of view.
Instead of programming on timeline and using scenes which is for animators, get into the Object Oriented Programming, start with the basics, the classes, then move on with design patterns etc.

2D animations in Windows Phone 8

I would like to develop a Tamagotchi game for Windows Phone 8 and I don't know how to do it.
My problem is that I don't know if I need to use Directx 3D or XAML, because I'm going to show a 2D pet moving around the screen.
I've thought to use 2D sprites to show its movement and let the user to stroke it.
Do I have to use Direct3D? Unity? What do you recommend me?
I wouldn't use XAML for a game. If you're going to be doing animations and complex interactions, that would be a nightmare. You can, however, use it for your game menus and layouts. Check out this tutorial on XAML and Direct3D apps for Windows Phone 8
Unity doesn't automatically make the game 3D, you can create 2D games with it. XNA is being phased out, so I suggest you stay away from that. Go with Unity for your engine.

Is it possible to handle shockwave objects in flash?

I want to know, Is there any way to handle or control the shockwave objects in flash by using 'as3'? I know this is possible in 'Director' by using 'Lingo'. But I am not able to find any way or any articles from where i can get some idea about this. In the director, I've seen there is way to set some properties like camera position, light affects etc. with the shockwave objects. But I am not sure about the FLASH. Can it possible to use these type of properties with shockwave objects in flash, which could be controlled in action script3 ???
Any kind of help would be greatly appreciated.
Thanks in advance!!!
To my knowledge there is no such possibility in flash.
If you want complicated 3D in flash, I suggest you use something like papervision3D
Flash only has basic 3D transformation since version CS4, Director (ShockWave) have had advanced, hardware accelerated 3D for many years. But I think Director is in some sort of limbo and Idon't know if Adobe is going to continue to develop it.
The Flash player has also become faster and Actionscript more powerful, so I think that something like papervision3D may be a good alternative for the most part.
Also bare in mind that the Flash player is much more widespread than the ShockWave Player