Sign in to follow this  
VJ1

Few basic questions in Game development

Recommended Posts

Hello everyone,

 

Good morning. I am totally new to game development but i have good understanding of C++. So, i am thinking of writing some 2D games for mobile platforms (only iOS and Android) in C++. 

 

the basic questions I have are - 

 

1. Can i use C++, OpenGL ES and Box2D (for physics) alone to create iOS and Android games? my understanding is i can use these to create games graphics, logic and Android/iOS APIs to detect user actions like swiping/touching etc. Pls. correct me if i am wrong. 

 

2. If i am right in the above question, then is that approach a difficult one compared to using frameworks like Coco2dx, mosync to create games

 

sorry if these questions seem too silly...am very new to game programming and just started smile.png

 

thank you

Share this post


Link to post
Share on other sites

You might want to also do some research into the app store's for your respective targets.  I might be wrong on this but from my understanding apple's app store only allows Objective-C written apps while Google's play store prefer's maybe even requires Java written apps.

 

Beyond that cross platform hassle's always occur, you will need to gain access to the device specific rendering and input API's either building your own mobile engine of sorts or using something pre built.  There are many options for this however most are Java or HTML5 / JS related.  I'm sorry that I'm not answering your questions but I would suggest that you research in to what technologies are available for cross platform development and what will best suit you and not focus on the fact that you want to use C++.

 

From just some quick google'ing it looks like OpenGL ES is mainly an iOS thing, I can't find any reference of it's usage on android devices.  Android does use open gl and here is a reference page that should get you started (directly from the android developers network)

 

http://developer.android.com/guide/topics/graphics/opengl.html

 

Here is the apple reference for using OpenGL on the iOS platform (which does make particular note of the ES flavor)

 

http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Introduction/Introduction.html

 

Box2D on iOS...

 

http://www.iforce2d.net/b2dtut/setup-ios

 

Port of Box2D for android (it's java...)

 

http://code.google.com/p/androidbox2d/

 

If nothing else these sites should get you started understanding the differences between the implementations of these technologies on the two different platforms.

Share this post


Link to post
Share on other sites

I might be wrong on this but from my understanding apple's app store only allows Objective-C written apps while Google's play store prefer's maybe even requires Java written apps.

Neither of those is this case. C++ is a viable route for both Android and iOS game development (though less so for app development, since the UI frameworks are in different languages)

Share this post


Link to post
Share on other sites

1) Yes you absolutely can. Andriod has its Native Development Kit and xCode can mix C++/Objective C. They both use OpenGL Es for rendering. That being said however you are going to have to deal with a lot of cross platform coding and writing a lot of bridges.

 

Which brings me to number 2.

 

It will probably take you a lot of time to make all the platform brides for interacting with differing devices......most of which will not have ANYTHING to do with creating a game. If you want to make your game and make it fast, use the tools that have already been created. These frameworks will vastly speed the process for you. 

 

My recommendation is to take a look at your project and see if you really need that fine grain control. For most projects it wont be necessary and you can save a ton of time by using those frameworks. 

Share this post


Link to post
Share on other sites

thanks everyone for your reply

 

what i am thinking of doing is - 

 

1. write a simple game in C++ (with openGL ES and Box2D) and test it in OpenGL ES emulator

2. deploy it in Android and iOS devices and test

 

my understanding is (not sure if this is 100% right) - Both Google and Apple says they support openGL ES and I believe my game should run properly if i am 100% compliant with openGL ES.

 

Let me give it a try and come to this forum if i am struck 

 

reg other tools, i had a look at few (both commercial and free ones). Good commercial one's are costly and coco2dx seems good.

 

If my approach doesn't work, i am thinking of using coco2dx. 

 

thanks again

Share this post


Link to post
Share on other sites

my understanding is (not sure if this is 100% right) - Both Google and Apple says they support openGL ES and I believe my game should run properly if i am 100% compliant with openGL ES.

Two items you may wish to consider (or ignore till later):

  • Both platforms support OpenGL ES, but you still have to write quite a lot of platform-specific code to actually obtain an OpenGL ES context, not to mention handling input, application lifecycle, and actually compiling for that platform in the first place.
  • OpenGL ES support varies from device to device, even those running the same OS. You need to choose between fixed-function (ES 1.x) and programmable shaders (ES 2.x) right off the bat. And even then, that basics should be entirely portable, but complex shader effects will often need tweaking for various driver/GPU combinations.

Share this post


Link to post
Share on other sites
The quickest and easiest way is to code a game on an existing game engine using a Software Development Kit which includes some assets which you can use as placeholders until you replace them with finished art. There is quite a selection of such systems, so you will have to partner with Mr. Search on that one.

Share this post


Link to post
Share on other sites

thanks swiftcoder and 3Ddreamer...now i am pretty clear that I can use OpenGL but its going to take lot of time...google'ed for some game engines/tools... looks like coco2d-x, carona, marmalade, moai etc are good... But Carona is expensive...I am an indie developer :)

 

I am thinking of using coco2dx or moai (though this is not C++)

 

if anyone knows any other good game engine, pls. let me know. I am looking only for cross platform game engines so that a single code can work in iOS and Android

 

thanks everyone...gamedev.net is awesome :)

Share this post


Link to post
Share on other sites

There is on gotcha I dont believe has been mentioned in this thread.

 

If you want to support OpenGL ES and in C++ only, on Android, that means 2.3 and higher devices only.  That shouldn't be a huge deal, but still something to be aware of.

 

You will also find in Android that not 100% of the the Java APIs have been provided in C++, so you will find you will have to work around this on occasion.  Generally though, these aren't the APIs you would need in your game.

Share this post


Link to post
Share on other sites

List of game engines and render engines: http://en.wikipedia.org/wiki/List_of_game_engines

 

I actually recently put together a similar list with a bit more info.  In my case, I kept to just engines that you can actually license, as well as stuff thats still actually in use.  That's the challenge with this stuff, too much information is almost as bad as none at all.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this