Sign in to follow this  
nixius

Unity Creating a cross-platform C++ engine, incl. android and IOS

Recommended Posts

Hello all,

 

forgive me for posting about a topic that has probably been discussed several times; I do feel that my question has a few extra points though and I have done a couple of days of reading on the matter.

 

I started writing a game engine in C++ with Ogre3D, SDL and Bullet physics. I have got 70% of a game done with it but it was just not written very well with some fundamental issues so I am starting again with those lessons learned. One of the reasons I am so keen on using C++ is that I am trying to better myself in C++ (since that is what my career is based around).

 

This time I also want to consider how I can code the engine in the best way possible to be able to 'port' it to android and IOS (as well as supporting Windows/linux/mac) since I realised the current engine I have it would be near impossible to do. I have done a lot of reading about the android NDK and Objective-C but I'm still not really sure.

 

I do understand that on any platform there will always be specifics that will need to be written for that platform regardless (I think I read that I'd have to code the UI myself for android at least) but I'd like to avoid rewriting code as much as possible.

 

Ideally I would like to avoid tools like Unity as that is C# and costs a fair bit of money for licensing extra platforms which I just don't have at the moment. I also want the experience of writing more of the engine than a tool like Unity will allow (even if it is just piecing a few pieces of middleware together).

 

Will it just be easier to write 3 separate engines? One for PC/Mac/Linux and one for each mobile platform? Should I try and brush up on plain old OpenGL and OpenGL ES 2.0 for phones.

 

Am I trying to do too much for a one man job?

 

I'd be glad of any thoughts any of you have on this matter.

 

Thanks for reading,

Nixius

Share this post


Link to post
Share on other sites
Being a systems programmer for one platform is hard. Doing it for multiple platforms would be a good learning experience but it would be improbable to become expert at all of them at once without many years of experience.

You will likely come up with a set of multi-platform common code using per-device abstractions.

If that is your passion then go for it. I don't know too many people who have that passion once they understand what it really means.

Share this post


Link to post
Share on other sites

Thanks for your reply.

 

Hmmm... you are probably right there, maybe I am biting off far more than I can chew at my current level and for a project on my own.

 

Perhaps then, I will initially concentrate on a PC/Mac/Linux engine and get proficient at that, populating the engine's functionality with a few games and then try my hand at a mobile platform completely separately.

 

Once I feel I have mastered those, perhaps then I may be in a better position to tackle something like I initially proposed.

 

Do you think that sounds like a more plausible approach?

 

It just irks me that I will be starting something I know I will probably have to rewrite, perhaps that is just something I will have to swallow; at least for now.

 

Nixius

Share this post


Link to post
Share on other sites

You dont want to write 3 separate engines.  Write a single engine and put as much functionality as you can into platform-independent code.  Current mobile platforms are similar enough to the others (PC/Mac/Linux) that this should be a doable objective if you're writing in C++.

 

With each platform the parts that will mostly have to be platform-dependent will be the setup code, UI, and graphics.  If you're using OpenGL then you can get most of the graphics code to work on all those platforms.  Just make sure you still make the wrapper layer platform-independent so you can easily add new platforms later (like DirectX for Xbox, etc).  

 

As far as the setup code, just make sure you only do as little as needed to get the app up and running, then hand off the updating, rendering, input handling to the platform-independent code.

 

For UI, if you have your own UI system, then it's not a problem.  If you use each platforms native solution (Interface Builder in iOS, etc), then you do need to rewrite that for each one.

Share this post


Link to post
Share on other sites

Hello, you will need a platform abstraction that will allow you to code your game without worrying about the environment (PC/Mac/Android/etc...) ; then you will need to implement your platform abstraction for any supported environment.

 

If I'm not wrong, iOS does not support C++, so you will not be able to get a "write once, run every where" system (at least, it will not run on iOS).

Share this post


Link to post
Share on other sites

Hello, you will need a platform abstraction that will allow you to code your game without worrying about the environment (PC/Mac/Android/etc...) ; then you will need to implement your platform abstraction for any supported environment.

 

If I'm not wrong, iOS does not support C++, so you will not be able to get a "write once, run every where" system (at least, it will not run on iOS).

You're wrong. You do need an Objective C layer, though.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Announcements

  • Forum Statistics

    • Total Topics
      628377
    • Total Posts
      2982326
  • Similar Content

    • By sveta_itseez3D
      itSeez3D, a leading developer of mobile 3d scanning software, announced today a new SDK for its automatic 3D avatar generation technology, Avatar SDK for Unity. The Avatar SDK for Unity is a robust plug-n-play toolset which enables developers and creatives to integrate realistic user-generated 3D avatars into their Unity-based applications. SDK users can allow players to create their own avatars in the application or integrate the SDK into their own production processes for character design and animation.
      “Virtual avatars have recently become increasingly popular, especially in sports games and social VR apps. With the advance of VR and AR, the demand to get humans into the digital world is only increasing”, said Victor Erukhimov, itSeez3D CEO. “Our new Avatar SDK for Unity makes it super-easy to bring the avatar technology into any Unity-based game or VR/AR experience. With the Avatar SDK for Unity now every developer can bring face scanning technology into their games and allow players to create their own personalized in-game avatars, making the gameplay much more exciting and immersive.”
      Key features of the Avatar SDK for Unity:
      Automatic generation of a color 3D face model from a single selfie photo in 5-10 seconds (!). Works best with selfies, but can be used with any portrait photo.
      Shape and texture of the head model are unique for each person, synthesized with a deep learning algorithm crafted by computer vision experts
      Head models support runtime blendshape facial animations (45 different expressions)
      Generated 3D heads include eyes, mouth, and teeth
      Algorithms synthesize 3D meshes in mid-poly resolution, ~12k vertices, and ~24k triangles
      Six predefined hairstyles with hair-recoloring feature (many more available on request)
      Avatar generation API can be used in design-time and in run-time, which means you can allow users to create their own avatars in your game
      Cloud version is cross-platform, and offline version currently works on PCs with 64-bit Windows (support for more platforms is coming soon)
      Well-documented samples showcasing the functionality.
       
      Availability
      The Avatar SDK for Unity is offered in two modes - “Cloud” and “Offline”. The “Cloud” version is available at http://avatarsdk.com/ and the “Offline” version is available by request at support@itseez3d.com.
      ###
      About itSeez3D
      At itSeez3D, we are working on the computer vision technology that turns mobile devices into powerful 3D scanners. itSeez3D has developed the world's first mobile 3D scanning application that allows to create high-resolution photorealistic 3D models of people's' faces, bodies and objects. The application is available for iOS and Windows OS mobile devices powered with 3D cameras. In 2016 the company introduced Avatar SDK that creates a realistic 3D model of a face from a single selfie photo. To learn more about itSeez3D scanning software and 3D avatar creation technology, please visit www.itseez3d.com and www.avatarsdk.com.

      View full story
  • Popular Now