Jump to content
  • Advertisement
Sign in to follow this  
shifubear

Cocos2d-x...... :'(

This topic is 977 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey! 

I'm a newbie wannabe programmer who started a few months ago with C++, and am slowly beginning to understand a bit about how the language works. I am enjoying programming so far and having a lot of fun tinkering around. I want to eventually be able to develop simple games as a hobby, and have created a few simple simple simple games. I was making text based games, then wanted to learn how to add graphics to the games and tried using SDL2. I enjoyed SDL2, but as my goal in the longer run is to try making games for iOS and android, I thought I should find a tool that would suit those needs. That's when I came across Cocos2d-x. A cross platform C++ tool for game development that's used primarily for mobile game development. Awesome!! I thought. I'm having so much trouble getting started. I can't find good recent tutorials that are made for beginners, and setting up and compiling takes so long. 

Is this still a good tool worth continuing to try learning? Are there any good relevant tutorials for Cocos2d-x that are easy for beginners to follow? Is it too early for me to be using Cocos2d-x? Should I switch languages if I want to continue mobile games? I know Objective-C and swift are used more for iOS and some other languages for android. Should I use full game engines like Unity or GameMaker instead? I really like C++ so far, and I want to be able to make simple desktop games too (not the same games as the mobile ones). But I guess I'm willing to make changes too. I'm not in a hurry, and am willing to do what it takes to hone these skills.

 

Thanks :) 

Share this post


Link to post
Share on other sites
Advertisement

For mobile games you should try looking into Java, but take other oppinions as well. Cocos2d-x has tutorials and a wiki on their site so you can start there, but only if you have a good understanding of the language. Otherwise you will have things in the library that you won't know what they are, you use them the way you see in tutorials but you can't use them at their full potential because you have no clue of how they work.

Share this post


Link to post
Share on other sites

I enjoyed SDL2

I really like C++ so far

I'm not in a hurry

 

Good! Then stick with it, you are already having fun and on your path to make games.

 

 

my goal in the longer run is to try making games for iOS and android, I thought I should find a tool that would suit those needs.

 

If you learn C++ and SDL2, Cocos2d-x will be easy when the time comes.

 

You will be able to adapt to anything they throw at you. So don't worry about your future plans, you will be changing laguages/tools all your life. Learn to program and to make games... the tools will come and go.

 

Good luck.

Share this post


Link to post
Share on other sites

There are two kinds of camps out there right now.  The OTS and the NIH.

 

The Off-the-shelf (OTS) people believe that you shouldn't be writing your own code.  Others have already done that, and you shouldn't reinvent the wheel.  This camp will tell you that Cocos2d-x isn't good enough, because you're still writing code.  Use a game engine like Game Maker, Unity, Unreal 4, Construct 2, or some other game development environment.  This camp gets a huge speed-boost for making games, but can't do anything unique or original without extreme pain.

 

The not-invented-here (NIH) camp believes that if someone else wrote it, it sucks, and they could do better.  They spend their time writing everything from scratch and learning how all the low-level technology works.  They do this at the expense of very slow development times compared to the OTSs.

 

Of course there is somewhere in between for you.  My first question it this:

Do you think you're an OTS or a NIH?

 

 

As a general rule of thumb, I prefer and would tend to hire the third unmentioned type.  The pragmatic programmer.

 

Pragmatic frameworks exist too, that straddle that middle line between Off the Shelf and Not Invested Here.  You could argue every single project with open source fits that category I suppose.  However open projects with high level tools also exist, things like Godot, which is certainly rising in popularity for exactly this reason.

 

For the record, I agree with you completely, just adding my two cents on top.

Share this post


Link to post
Share on other sites


However open projects with high level tools also exist, things like Godot, which is certainly rising in popularity for exactly this reason.

 

Godot looks promising.  I struggle with this all the time.  If you just use everyone else's code, you are at their mercy.  If you choose tools without source code, like Unity, you need to sign in blood and hope they don't break anything down the line.  But if all you use is your own stuff, you can't even keep up with OS changes and security updates, let alone embrace whatever flavor-of-the-month gameplay/graphics are popular.

 

I am currently making something similar to Godot.  Maybe that will be the thing I need.  Thank you for the tip!

Share this post


Link to post
Share on other sites

Thanks for the replies!

 

-Serapth

   I did check out that tutorial and it was one of the best ones I found online, but it ended a bit too early in the process for me. It was great for learning the tools, but what I really wanted to know at the end was how to combine them. In SDL2, it was easy to make the game loop and it was clear where the loop was, which helped me a lot. I heard Cocos2d-x does the looping for me? or something like that, so I don't have direct access to the loop itself. Because of that, I'm really confused as to where and how to implement functions to handle input, actions, collision, etc.. It's great that you're starting a video series though! I'll definitely be checking those out :) Again, thanks for the reply!

 

-Kenwill

   I guess I should look around the wiki a bit more thouroughly. Thank you! 

 

-Desdemian

   Thanks for the advice. I guess I might play a bit more with SDL while exploring other options. Gotta work on the fundamentals of the language and game programming first :) 

 

-Glass_knife

   I'm not experienced enough to identify myself as one or the other yet, but the reason I started with C++ is because I didn't want the engine to do everything for me. I wanted to know how everything was working, and how a game is put together from a low(?) level perspective. But then again, I'm not used to developing games yet so I'm beginning to think that it might be better for me to use some of those tools to learn how to put a game together while not focusing too much on programming, and then going back to lower level once I'm a bit more accustomed to the process. That being said, I will continue to brush up my programming skills either way. I guess now is a good time to explore the options and see what I like. 

Share this post


Link to post
Share on other sites


Thanks for the replies!

 

-Serapth

   I did check out that tutorial and it was one of the best ones I found online, but it ended a bit too early in the process for me. It was great for learning the tools, but what I really wanted to know at the end was how to combine them. In SDL2, it was easy to make the game loop and it was clear where the loop was, which helped me a lot. I heard Cocos2d-x does the looping for me? or something like that, so I don't have direct access to the loop itself. Because of that, I'm really confused as to where and how to implement functions to handle input, actions, collision, etc.. It's great that you're starting a video series though! I'll definitely be checking those out smile.png Again, thanks for the reply!

 

 

 

You know there are 5 parts to the written tutorial right?  ( I will probably add more after the fact ).  Your questions about the game loop are covered in some detail in this part of the tutorial.

 

Yes, Cocos2d-x easily internalizes the main game loop, this is because Cocos2d-x is a higher level framework than SDL.  SDL basically provides the basics of a game, while Cocos2d-x is an actual game engine.  Instead of operating in a loop updating various parts of your game, you implement functions like update() and they are called by the engine.  The tutorial explains it in a great deal more detail.

Share this post


Link to post
Share on other sites

If you've started learning C++ then stick with C++.  The problem with Cocos2d-X is that many people learnt the Objective C version (with lots of tutorials) then migrated to Cocos2D-x and not many people re-wrote the tutorials.
There are however several books available that do a good job of teaching Cocos2d-X.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!