Hello developers!
I am currently working on a platformer with my friend, and we are using cocos2d. Now we are doing in-game art. I just want help on how we can set the code to generate platforms with a specified range of distances between them. It is also a running man, so I will need help on that. All the tutorials I saw show a fixed map and a still object. Please help me.
You should really be asking this question at the Cocos2d Forum instead of here, that's why they have the forum there. As far as the "running man" statement are you referring to how to animate a sprite in Cocos2d? If so you can check out the tutorials by Ray Wenderlich (How To Use Animations and Sprite Sheets in Cocos2D | Ray Wenderlich) to get the basic idea.
As for the actual platforms, there are several ways you could do this but one of the easy ways is to use LevelHelper (it's like 12 bucks) which allows you to design your level visually and then ports over the necessary code for Cocos2d.
You should really be asking this question at the Cocos2d Forum instead of here, that's why they have the forum there. As far as the "running man" statement are you referring to how to animate a sprite in Cocos2d? If so you can check out the tutorials by Ray Wenderlich (How To Use Animations and Sprite Sheets in Cocos2D | Ray Wenderlich) to get the basic idea.
As for the actual platforms, there are several ways you could do this but one of the easy ways is to use LevelHelper (it's like 12 bucks) which allows you to design your level visually and then ports over the necessary code for Cocos2d.
Yeah, ok sorry for the wrong place, but our pockets are relatively shallow. We only have money for the iOS developer program. So I just need to know how to generate those platforms because I want it to never end. And thank you for the quick reply, I didn't even have to bump it http://www.iphonedevsdk.com/forum/im...ies/tongue.gif
Probably you should create an editor where you can create your levels (i don't think you want to design a level programmatically)....
The editor can be "in-game" where you will develop something to select a type of platform and put it in a x,y then you will export the level as json or xml or a custom format.....and then you need to write the parser to start from the textual representation of the level and re-create it programmatically.
Yeah, ok sorry for the wrong place, but our pockets are relatively shallow. We only have money for the iOS developer program. So I just need to know how to generate those platforms because I want it to never end. And thank you for the quick reply, I didn't even have to bump it http://www.iphonedevsdk.com/forum/im...ies/tongue.gif
Ray also has a Tutorial on his site to make a "Tiny Wings" type of game in which a never ending set of textured hills will be presented. I know it's not exactly what you are looking for but could have enough information to get you going in the right direction.
Ray also has a Tutorial on his site to make a "Tiny Wings" type of game in which a never ending set of textured hills will be presented. I know it's not exactly what you are looking for but could have enough information to get you going in the right direction.
I'm kind of a noob and don't know that stuff. It shows on setting points for te hill. I just want to know for the origin of the platforms. Sorry for my incompetence, it is our first app on cocos2d.
I'm kind of a noob and don't know that stuff. It shows on setting points for te hill. I just want to know for the origin of the platforms. Sorry for my incompetence, it is our first app on cocos2d.
You might want to learn the basics of programming before attempting something complex like a game. Work through the beginner tutorials and get familiar with the language, the tools, and the operating system.
It's the old adage of "learn to walk before you run".
__________________
Highlight PDF text like no other app: iHighlight (now available for iPad and iPhone!)
-----
Create iPhone lists with no typing: Insta-List
-----
Make spelling fun, and create your own tests: iWillSpell
-----
A fast, elegant flashlight app: Insta-Light
-----
You might want to learn the basics of programming before attempting something complex like a game. Work through the beginner tutorials and get familiar with the language, the tools, and the operating system.
It's the old adage of "learn to walk before you run".
Yeah, I have been taking tutorials. But when it comes to this, I am blank
Yeah, I have been taking tutorials. But when it comes to this, I am blank
Programming isn't easy - it takes time, patience, and practice to become good at it, and just because Apple have made it easy to download their SDK and tools, that doesn't mean you'll suddenly be able to write a 2D platforming game.
You have to start with the basics... a 'hello world' type app, and gradually build yourself up from there, eventually getting up to speed on OpenGL. I don't mean to be a Negative Nancy, but if you're starting with absolutely zero knowledge of programming, it's going to be quite a while until you're at a level to be able to tackle a platformer.
__________________
Highlight PDF text like no other app: iHighlight (now available for iPad and iPhone!)
-----
Create iPhone lists with no typing: Insta-List
-----
Make spelling fun, and create your own tests: iWillSpell
-----
A fast, elegant flashlight app: Insta-Light
-----
Programming isn't easy - it takes time, patience, and practice to become good at it, and just because Apple have made it easy to download their SDK and tools, that doesn't mean you'll suddenly be able to write a 2D platforming game.
You have to start with the basics... a 'hello world' type app, and gradually build yourself up from there, eventually getting up to speed on OpenGL. I don't mean to be a Negative Nancy, but if you're starting with absolutely zero knowledge of programming, it's going to be quite a while until you're at a level to be able to tackle a platformer.
Matt his the nail on this one, since you are new to Cocos2D you're going to need to spend some time going through multiple tutorials before you're going to be able understand how to do any of what you are asking. Creating platforms in a random location off screen while the character moves towards them isn't generally that hard, but without some general knowledge on this you're going to get stuck. For example, let just say you have your Platform Sprite added to the project, you could just add the sprite to any X,Y coordinate off screen, maybe using some math to adjust how far apart they should be and make sure they don't go off screen but all of that type of stuff is covered in the tutorials by Ray. They may not be exactly what you want to do, but they show those types of methods (for example what I just listed above can be found in his example on making a game fighting ninja's that come from one side of the screen and move to another, but it shows how to create a sprite in a random location). You're not going to find any tutorial that pins down exactly what you want but once you learn from following several tutorials you will have the knowledge to then pursue what you want in your game.