I want to compile OpenGL ES programs in Eclipse for use in an emulator like that of PowerVR's. I have Eclipse setup with MinGW and can make a basic C++ hello-world executable, so this is a good start. I have found these OpenGL ES examples and want to be able to build them in Eclipse, so I guess the next step is getting Eclipse to build an OpenGL ES application. The examples want me to use Visual Studio, but I am not interested in using that. My main target is Desktop and Android so sticking to Eclipse would prove beneficial I'd think. I see there are many libraries like GLEW that greatly help with making OpenGL graphic applications, but these I'm guessing cannot be compiled for OpenGL ES for a mobile platform-- unless that's a bad assumption. I am coming from a background of having once used OpenGL with glut to make OpenGL applications. I guess I am confused on how to proceed in order to start programming something that is both ready for desktop and mobile platforms.
I ended up downloading the ARM MALI emulator for OpenGL ES, and after some configuration to get it to build in Eclipse, I think I am on my way now. It builds rather easily, and with the included dll files I can get it to run under Windows; so now I can begin programming for OpenGL ES and be sure it will likely work on a mobile platform that supports OpenGL ES-- I don't have an Android device, nor a mac computer so this seems ideal for now. I suppose eventually I will install GLEW and GLUT when I decide to program for the desktop and have a better understanding of what is available in OpenGL ES 2.0 that is also available for the standard OpenGL.
Related
What is monogame supposed to be? There is not much info on their homepage http://monogame.net/ and I am not familiar with XNA.
I saw that is uses OpenTK so I assume that it is higher level than OpenGL. Does it sit in between OpenGL and a Game Engine? Could it be compared with Ogre3D?
And what exactly is the content pipeline. I am asking because I am almost exclusively developing on linux and I don't want to install a virtual windows machine only to compile some assets. Is the content pipeline optional?
XNA was Microsoft's .NET DirectX 9 wrapper for Windows, Windows Phone and the XBOX 360 (through Xbox Live Indy Games). Aside from providing a DX wrapper, XNA provided content management, helpful classes (game window with draw / update loop and asset management, user input (keyboard, mouse, game controller), networking, etc. It was an excellent framework.
MonoGame is a cross-platform reimplementation of XNA, that does a great job of providing all of the XNA functionality, plus support for DirectX 10 and 11, as well as cross-platform support (via OpenGL/OpenTK) for OSX, Linux, iOS, Android, PlayStation, and others. If you're writing a cross-platform game, it's really worth your time to investigate MonoGame and see if it's right for you.
Edit
It's worth noting that neither XNA for MonoGame really qualify as a "game engine." For instance, they don't provide out-of-the-box collision detection, pathfinding, etc. It's up to you to develop those.
If you're looking for a full engine, consider Unity. It's scripting language is C#, and it's used by a significant number of professional game studios.
I want to start creating games for Android/IOS. I have already created 2D games using XNA and I want to publish them on other platforms even PCs but my highest priority is Mobile platforms. As I said I am familiar with XNA so I need a similar Engine for 2D. It would be great if I could write once and publish on many platforms. Please dont suggest Unity or Unreal. They are not that easy when it comes to 2D.
By similar I mean, for example, how easy to draw a sprite on the screen.
Note: I am working on Windows so no Mac suggestions please.
Regards,
You may also want to consider MonoGame ( https://github.com/mono/MonoGame/ ) as that is also an Open Source, OpenGL implementation of XNA that currently has support for iOS, Android, MacOS X, Windows and recently Linux. It is now all ES 2.0 on the mobile platforms. Our biggest change is that we now support Windows 8, and have a DirectX 11 backend thanks to SharpDX. We now also have initial PlayStation mobile support.
Actually ExEn, is a fork of MonoGame( originally called XNATouch ).
For a list of games on the AppStore or Android Market place and even NaLC, currently using MonoGame look here -
http://monogame.codeplex.com/
I hope this helps.
D.
You might want to keep up on the project called ExEn, which has already successfully ported some XNA samples and smaller games to iPhone and Android. It requires relatively little work to port and refactor to these platforms.
I suggest you check out AndEngine, its an open-source 2d open-gl based game engine that has a strong community. If you want something that you can make cross platform games with check out LibGDX It too is free, open source and based on openGl but it also allows for 3d games. It is also cross platform so a game you write for android can be compiled for, Windows, MacOS (see below), Linux. It also has a really strong community.
Regarding iOS and OSX games you really can't make them unless you buy a Mac. Apple doesn't distribute their SDK for use on any other platform but their own. That said you could maybe get something working under VMWare
Check out MOAI SDK. It's completely free and open-source. It is in beta right now but it is still pretty good. Crimson Pirates for iOS was developed with it.
Right now it supports iOS, Android, Mac, Windows, and Linux. Really good. I thought I liked Cocos2D-x, which is a C++ variant of Cocos2d-iphone supporting windows, iOS (not Mac), and Android but not truely supporting desktop kinda made me like MOAI more.
You can use C++ with MOAI or you can use Lua (they highly encourage using Lua). Being built in C++ is really great because you get access to a vast amount of libraries and you can easily bind them to Lua.
You should try games development with cocos2d.
Cocos2d is one of the best 2d engines for ios/Android I have come across.
http://www.cocos2d-iphone.org/
It is openGL based free engine.
Regards,
Sam
These might be useful to you. However, the first two aren't free, but they have editions for both iOS and Android.
iOS:
http://ios.xamarin.com/
Android:
http://android.xamarin.com/
I've never used either of them, but it's something I've been looking into a bit.
Apparently it lets you run C# and .NET code on both iOS and Android which is pretty cool considering how much easier drawing and things like that are in XNA compared to Open GL ES 2.0. Not to mention the fact that you'd be using C# instead of objective C.
There's also a free open source version sponsored by the same people who make the two I listed above. This one lets you run C# and .NET code on Windows, Linux, and Mac OS X.
http://www.mono-project.com/Main_Page
I have been researching this topic intensively over the last few weeks.
I think the best solution for you is Marmalade, formerly known as Airplay SDK. It is actually more Windows-oriented than Mac (work in Visual Studio), although you still need a Mac for the final step of getting a signed app onto the store. It sounds like a very capable pure C++ product with iOS and Android as well as a bunch of other platforms, Personal license with splash screen $150 pa, single seat Professional $500 pa for all platforms. They have a 45 day trial license which I'm currently using.
I was tempted by MonoGame, could live with the $400 price tag for each platform (for the needed MonoTouch) but it is just way too buggy. The final straw was a combination of a bug causing it to crash all the samples on iOS5 and that keyboard input is broken on iOS.
Too be fair, I'm pretty sure that is all on the MonoGame side and was very impressed with how well MonoTouch worked and was looking forward to programming in c# with LINQ et al.
Since it is not obvious from the other answers, it should be noted to those who are unaware that the ExEn project and the MonoGame projects both build on the Monotouch platform from Xamarin (formerly from Novell) - which is a prerequisite for both for iOS games.
The Xamarin projects was mentioned in another answer as an alternative to Xna, but is really not. Monotouch and Mono for Android are a way to run C# and .NET on iPhone/iPad and Android.
Game development at least on the iPhone side, is typically done using OpenGL and OpenGL is also wrapped in Monotouch. The Xna implementations in Exen and MonoGame also uses OpenGL as the foundation as far as I know.
It should also be noted that Monotouch and Mono for Android are commercial products.
BTW: Exen also compiles to other platforms e.g. silverlight.
I decided to learn some OpenGL ES 2.0 and I am trying to pick a practice platform for it. What comes to possible target platform, it could be Android, iPhone or WebGL. But I don't want to spend too much time and effort to get the environment setup properly.
Would you recommend WebGL for a fast start to OpenGL ES 2.0 learning or something else?
Edit: I am using Mac and I am not really interested in ES 1.x at the moment.
If you register as a developer at the iOS Developer Center (free), you can download Xcode and the iOS SDK (again, for free when you get Xcode 3), which includes a simulator capable of OpenGL ES 2.0. This of course assumes you have a Mac to run that all on.
Once you have the SDK, you can simply start up Xcode and create a new application based on the OpenGL ES Application template. This application will be a fully functional OpenGL ES 1.1 and 2.0 iOS application that you can build and run in the simulator. You can ignore all of the iOS-specific setup code and focus on the -drawFrame method in the xxxViewController.m class, which is where the OpenGL ES 2.0 drawing code lies.
This can be a pretty quick environment to set up for playing with OpenGL ES 2.0 shaders. I've also tried out the PowerVR SDK package that trenki suggests, and it is a little more involved to get something set up with that. If you're on Windows, it will be a lot more viable of a solution than the Mac-based iOS SDK I describe here.
One other shader development tool that can come in handy for prototyping on the Mac is Quartz Composer. It comes along with Xcode, and provides a visual prototyping environment for all sorts of effects, including OpenGL shaders. I demonstrate an example of doing this kind of prototyping in an article I wrote here. Desktop GLSL and the implementation in OpenGL ES differs slightly, but much is the same between the two.
While targeted at iOS, I taught a class on OpenGL ES 2.0 recently as part of a course that can be downloaded from iTunes U for free. It might helpful in getting up to speed on shaders.
I suggest you download and setup the Khronos OpenGL ES 2.0 SDKs for POWERVR SGX PC Emulation package (Unfortunately you have to register to be able to download). This allows you to get everything up and running on a desktop computer which will make your life a lot easier when it comes to debugging. You can then use C/C++ to develop your OpenGL ES 2.0 applications.
If I'm not mistaken my Android phone (Samsung Galaxy S) also uses this OpenGL implementation.
Instead of using the Khronos SDK you could also use the OpenGL ES 2.0 libraries from the Mesa3D Project (Ubuntu has them in the repository). They work fine but I can't recommend them because I already ran into a situation where the results differed from the Khronos SDK implementation and my Android device.
EDIT: You also have to create a Window and an OpenGL rendering context in order to actually use OpenGL. For that I can recommend SDL (1.3) which also has an official port for Android. I tested it on Android and Ubuntu with the mentioned SDK. It allows me to use the same code for both.
If its for game developing try using a framework, this way you don't have to do the baby steps yourself :-).
Here are some to get you started ( i prefer the android ones :-) ) :
Android
- Min3d
- Libgdx
- AndEngine
iPhone
- Cocos2d
- Sparrow
WebGL
- Tutorial
- glge
If you want to learn OpenGL ES and have a mac I suggest this book:
http://iphone-3d-programming.labs.oreilly.com/ (You can read it from the web, or buy it, I think it is worth it)
Besides the OpenGL itself it explains some of the mathematics and it shows the OpenGL ES 1.1 and 2.0 way for all examples.
(Depending of what you want to do sometimes 1.1 is much easier and suites better.. in 2.0 you always need shaders even if you only want to draw a single triangle.)
Since the Raspberry Pi supports hardware accelerated OpenGL ES 2.0, and is quite inexpensive, it would make a good platform, for testing if not actual development. It's basically a last generation smartphone, without the phone bits. If you install a Linux distro on it (e.g. Debian) you are ready to program on it out of the box. Since it's a learning platform, it's well suited for the purpose. You won't be alone, many are dipping their toes into Open GL ES on it.
I have decided to use the game engine Unity to develop my game for iPhone. But I need to use some functions built into the iOS SDK.
If I choose to develop using Unity, can I still use functions from the standard iOS SDK? Like functions to access a url, etc...
When you compile a Unity project for iOS it takes your C# or JavaScript code and AOT compiles it to a native dll. It then creates an xcode project which loads that dll. You can add native objectiveC, or C/C++ functions to this project and expose them for calling from the Unity engine.
http://unity3d.com/support/documentation/Manual/Plugins.html
Unity also has built-in methods for accessing URLs.
I don't know how the Unity SDK is built, but if it's a static Objective-C library then you can access iOS SDK functions without any problems. If its a script engine where you develop your scripts outside the IDE then you may not access iOS function.
Have you checked other engines/sdk's for your game development? I know that Cocos2D is well documented and I know for sure that you can call iOS methods.
Good luck!
I used both unity3d and corona which are very good at their field, and yes you can use all standart SDK over them, sometimes you need to do tricks though (which is quite a pain). If you are developing a 3d game and familiar with NVIDIA PhysX engine go for unity, it gives you nice features. But if you are clueless about collasions/rigidbodies/ragdolls etc you would have a hard time for sure.
As for 2d application development since I don't like Objective-C I prefer corona which you code in lua (easy to learn and use). You can use most of the IOS SDK in it without any problem.
I really reccomend you starting with Unity, it is the best engine I have ever used (I have used a ton of bad engines).
Unity is the best place to start and to stay. Coding, graphics and everything is simple to manage in this engine.
Unity is specially 3d but you can also build 2d games, some examples are Zombieville and OMG Pirates (very succesfull games on the appstore).
I've been reading that M3G is something based on OpenGL ES...so can I work with this on iPhone OS? Did anyone do that already?
M3G is a Java API. On some devices it may be implemented on top of OpenGL ES, but that does not mean that a device having an OpenGL ES implementation is sufficient to use M3D.
The iPhone does not support Java development. There may be some thirdparty environments that cross compile Java into something that can run on the phone. I don't know of any, but I know there are tools for .NET and JS based apps. I suppose it is technically possible someone code implement something like that with support for M3D, but as far as I know no one has done it and it would be a monumental effort.
So, could M3D be made to work on iPhone, probably, but it would require getting Java working, and that would take years of developer time and I do not believe anyone has but in the effort.