I am starter in cocos2d-x.I have multiple sprites of arms legs eyes etc.i want to create a single sprite ,suppose a human out of it who has arms,legs,eyes,head,body etc.How to do it..As i have to animate them and make the human walking and also i have to kill it on touch.Any one here please tell me the logic in cocos2d-x using c++
CocosBuilder can be used for assembling the body parts. By laying down each sprite to its own layer, you can also animate them, create different animations for walking, dying.
Tutorials :
http://www.raywenderlich.com/23996/introduction-to-cocosbuilder
http://www.plungeinteractive.com/blog/2012/10/29/using-cocosbuilder-on-cocos2d-x-games/
There is another way of using it.We can use cocostudio also and export the file as JSON
Refer to this link
http://upyun.cocimg.com/CocoStudio/helpdoc/v1.0.0.0/en/index.html
I'd like to do this:
Create a Cocoa application with a couple NSButtons in it. Also, a "cocos2d-iphone" view running in the same window.
If I trigger the NSButtons, a function is called in the cocos2d-iphone view (not sure where, maybe in the currently running scene?).
Well, I managed to create a new project from the cocos2d-iphone for Mac template, made the window bigger than the cocos2d view, moved the cocos2d view, and added my NSButtons. Now, I am not very sure about how to make the connection I need.. =/
I suggest reading an Interface Builder tutorial. This one is using Quartz, it's not Cocos2D but close enough. Simply assume the Quartz view to be Cocos2D view while you go through the tutorial.
Note that Cocos2D/EAGLView has some issues with NSView objects. In particular you can't add NSView objects as subviews to the Cocos2D OpenGL view, they will simply not be displayed. This is a general problem of the OpenGL view on Mac, and there are solutions/workarounds for this but they unfortunately do not work with Cocos2D. So if you're planning to have NSView objects overlapping the Cocos2D view … well, you can try and if you can make it work, PLEASE let me know how! :)
i am new to cocos2d technology. I want to develop game. I need some idea about level of difficulty. Also i want to know about project type whether this game need to be develop in CoCos2d BOX2d application or simple cocos2d application.
This is game link : http://www.mindjolt.com/games/super-balance
Please provide me guidance for the same..!
Waiting for reply
Thank you,
I would recommend you to use Box2D and create a 2D gravity world (that is the part where you need Box2D). then learn Box2D from Ray ( http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12 ).
learn Box2D and you will see how to implement it into this game ;)
i need to create a switch over cocos2d scene. i can create a uiswitch and add it to scene but
i really interested in cocos2d switch if there is any....
can anyone give me any idea??
If you compile and run the cocs2d test applications included with cocos2d there are several tests that use controls like a switch or a slider. Then you can look at the test files and see how they implemented.
Best way I have been learning cocos2d is by reviewing the test apps.
Also check out these posts for several other useful resources:
https://stackoverflow.com/questions/2293457/cocos2d-resources/4061868#4061868t
Need 2D iPhone graphics designed
So, I'm going to develop a Pac-Man clone with Qt. The problem is that I do not really know where to start.
I quickly take a look at the documentation and some demo. I also downloaded some game sources on qt-apps.org. And it seems that there is a lot of ways to develop a game with Qt!
In your experience, which part of Qt should I consider to develop a Pac-Mac clone ?
The Animation Framework
The Graphics View Framework
The Paint System
Qt Declarative
Any help would be appreciated.
I think that QGraphicsView framework is the best way. Create a QGraphicsScene, some QGraphicsItems for the elements of the game. You have collision detection for free.
Most of KDE games are based on the QGraphicsView framework. It is a good fit for simple game development.
I'm currently working on a project providing gaming-specific Qt Quick Components for cross-platform game development, might be of interest: http://v-play.net :)
At the very minimum you will want to look at QGLWidget. You can get an OpenGL program up in a few minutes by deriving from QGLWidget, it will create the window, context, handle mouse and keyboard input, etc. Create a QTimer to trigger updateGL() every 10-15 ms or so and your good to go. I think there is a demo somewhere for setting this up, but it has been awhile since I saw it.
If you want to embed widgets into the window, I would look at QGraphicsView. There is a demo of this called boxes. Just beware the demo is a tad hard to learn from as several classes are thrown into the same file and it might take a few moments of tracing to figure out where the flow is.
Since you are doing a 2d game, you might want to look at using QPainter on top of OpenGL. This allows you to draw primitives easily instead of doing them with OpenGL calls. I never could get this to stop flickering in fullscreen though.
There's a book about game development in Qt here, it's a bit old, but it might give you some ideas. But IMHO, Qt is widget based and is a bit slow for a game, you might consider using SDL or OpenGL.
I'm developing a simulation of rigid bodies with Qt and OpenGL using the PhysX API from Nvidia. If you want to see this approach, look at my project at github: http://github.com/lucassimao/Simulacao-Estereologica
Well, one place to look could be the Gluon game development framework, which is currently under development. It depends on what you're really aiming for with your PacMan clone, but Gluon may well be what you're after: https://github.com/KDE/gluon
If anyone else is interested in learning how to make GAMES using C++ and Qt, have a look at my YouTube tutorial series. It explains the graphics view framework through a series of videos which build upon a single game that we start in tutorial 1.
C++ Qt Game Tutorial 8 - Adding Graphics
If you are not comfortable with Qt yet, then I REALLY loved VoidRealm's Qt tutorial series, also on youtube (C++ Qt 1 - Introduction to QT programming).
A good start would be:
Qt Examples And Tutorials
Perhaps if you need to cheat you may want to look here
xpacman.tar.gz