More than one sprite in Spritekit - sprite-kit

I have a few related questions that I have been wondering about:
Can you have more than one sprite in Sprite kit, so you can have multiple characters in your game where the user purchases them?
Is there any tutorial online that shows how you can have more than one sprite in Sprite kit (if you can)?
Can the user buy the sprites with game points, and is there any tutorial for that?

Of course you can have more than one sprite in your scene. you can start with this raywenderlich tutorial.
you can design an algorithm to add sprites to your scene, when the user reach to the exact point. There is another raywenderlich tutorial, which built a game like farmville, with selling option.

Related

Unity 3d - Explosion Area Damage

I've developed an airplane 3D shooter game. In this game, I want to make my plane shot a bomb. When the bomb gets to the enemies it will explode and give damage in the area of explosion.
I have already searched for a tutorial to make this code and the animation of explosion. But I couldn't find it. Please tell me about something that could solve this problem. I'm developing my game using C#.
For the explosion animation, you could use a particle system. There are many pre-made ones in the Asset Store, such as this one: https://www.assetstore.unity3d.com/en/#!/content/42285
For detecting what is affected in the explosion's area of effect, do a SphereCast (https://docs.unity3d.com/ScriptReference/Physics.SphereCast.html) from the point of impact and then do whatever you want with any of the objects touched by the sphere.

implementing Game Center into cocos2d 2.1 project

I'm playing with Game Center and cocos2d because I want to find out how to implement Game Center into game. All I want is just displaying Leaderboards and Achievements. I have followed this tutorial Integrate Gamecenter in cocos2d game and my Achievements works good, Game Center recognise me at the beginning and LeaderBoard cannot display my scores (I've read it take very long time, but I'm waiting like over 1 day and still nothing).
Today I upgraded my cocos2d from 1.0 to 2.1 beta because I want to support iphone 5 and I saw that Helloworld example is integrated with Game Center!
Can anyone show some sample project or tutorial how to implement Leaderboards and Achievements and recognising current player with Game Center without GKHelper, just clean Game Kit? I don't want to use GKHelper because there are to many functions and I dont need it and to be honest I don't really understand it as well.
thank you in advance :)
Cocos2d has no Game Center integration. It does nothing else but open the leaderboard and achievement views. The cocos2d template doesn't even log in the local player. This minimum Game Center example only exists to show how the view should be attached in a cocos2d app. That's the only area where Game Center and cocos2d meet paths, every other aspect about Game Center is universal, ie it applies to any app, with or without cocos2d.
For a reasonably complete Game Center integration, I wager you'll have to understand and use at least 50% of the GKHelper functions, most if you want multiplayer. And to understand those methods I recommend reading the Game Center Programming Guide.

Bouncing Particles in a CCParticleSystemQuad

I'm using cocos2d to make a game on iOS. I have a particle emitter that I want the particles to bounce when they hit the bottom of the screen. Thing is I cannot seem to find a way to do this and with my limited understand of open GL the answer my be obviously in front of me but I don't see it. Is there an example of this or a way to use the CCBounce or box2d or something?
Here is a bouncing ball tutorial which uses cocos2d + Box2D:
http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls
There is also EaseBounce actions (CCEaseBounceIn, CCEaseBounceOut, CCEaseBounceInOut) in cocos2d for you to run on sprites. See "EaseBounce actions" section in "cocos2d Programming Guide: Actions - Ease".

How to make sprite moving forward continuously in cocos2d?

Need your help again.
I am currently working on my first iPhone game. In my game i want my car to move forward continuously. I also want my background which is a road, of course, to give the like it is moving.
Thanking you in anticipation.
You can accomplish this using the Parallax in Cocos2D. Here is a video tutorial on how to do that Parallax Scrolling with Cocos2D.
Here is another great site with many free tutorials on how to accomplish many things with Cocos2D that will most likely be very helpful to you Cocos2D Tutorials
I would also highly recommend the top 3 books in the following list on amazon Cocos2D game programming books
That's not a lot of information to work with. To do the basics of what you are asking for, the car wouldn't actually move it all. It would just stay in the middle of the screen while the background moves. You can just create a scrolling parallax background.

Would a game with a man walking on a planet be a tile based game?

Say there was a game, where you stay on a single screen (unless you pass the level), and you are a man walking around in space.
It seems like a tile based game to me, the only catch is that when you move, it has some physics at play, meaning the more you press up, the faster you move and the longer it takes to slow down.
And you also keep moving even if you stop pressing the arrow keys as you have gained momentum.
thoughts?
how would I handle the movement of the man based on momentum etc?
If you decide to use Cocos2d, start with this
Learn iPhone and iPad cocos2d Game Development
It has an example in the chapter "Your First Game" which covers Velocity calculations and controlling a players movement using these calculations.
Also as bbum mentioned
Ray Wenderlich has some great tutorials and is really educating developers on some interesting topics.
He also has co-authored a book which is available for pre-order.
Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk
Sure; it could easily be a tile based game and there are multiple examples of exactly that. Heck; Super Mario is a tile based game -- the level and backgrounds are all tile based layouts -- with the characters -- also tiles -- moving based on a very simple physics model.
Cocos2d is a tile based game engine that also has support for several physics engines.
Ray Wenderlich has written an excellent series of tutorials on uses of cocos2d. Here is one that includes physics to model a bouncing ball.
Either you have a game like lunar lander, where the position of the man is based on physics, or you have a tile based game. You cannot have both at the same time.