Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Looking for 3d engine suggestions for android+windows development.

  • You cannot reply to this topic
12 replies to this topic

#1 Mekamani   Members   -  Reputation: 140

Like
0Likes
Like

Posted 09 February 2015 - 08:06 PM

I am looking for possible suggestions for 3d game engine. To be honest I am not sure if I can even find what I am looking for or if there is any better solution that the one I have been fiddling with.

 

+ I would want to develop on both windows and android with one code base, or at least with very few changes needed.

+ I am cheap and want to use free engine, I do not care that much about open sources tho, because I rarely look at sources.

+ I am not that good of a programmer, so I would prefer something that works without too much of trouble.

+ I am looking something of a like full integration of things. Sound, UI, ´Touch/Mouse input.

+ I honestly do not know much about optimizing 3d, nor I am planning to do anything too complex stuff, just showing models and thats about it.

+ I would like if there was some somewhat easy to add 2D-uilayer with buttons and stuff.

+ It would be nice if there was a lot of examples / strong community behind it. I have tried using stuff where there isn't much community nor documentation and frankly, it feels really painful when you cannot figure something out and you have no where to look the answer.

+ Speed in 3d would be great.

 

I started my project with libgdx and doing 2d, then I got interested in 3d and decided to do a 3d model. I tested out the 3d, and the fps was around 8 on my android nexus 5. Arguelably I did use 220k vertices on my test which is quite a lot, and I did same test on cocos2dx, well at least roughly similar amount of stuff to draw. I noticed that in terms of performance cocos2dx (with lua bindings) seemed to be with my not so properly rigged character 2-2.5 times faster than libgdx. This made me think that maybe when it comes to 3d, there might be better engines out there. Both of these engines are seem like first 2d then 3d in priority, or at least I think so. Cocos2dx on the otherhand made my phone heat a lot more than libgdx, when it was rendering more frames per second. I have to admit that with both engines, I do get a lot which I like. For example the possibility to have good integration with googles play servies.

 

As for languages almost any procedural programming language goes.

 

Also I do know that there is unity out there, but I am afraid that there is a possibility, although extremely slim, that I would get into point of needing stuff like render to texture.



Sponsor:

#2 frob   Moderators   -  Reputation: 25715

Like
5Likes
Like

Posted 09 February 2015 - 10:26 PM

This is item #1 on the mobile forum's FAQ

 

There are many low quality cross-platform systems, but only a small number of larger, established, community-supported systems. 

 

Each one comes with its own benefits and drawbacks.


Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I write about assorted stuff.


#3 HappyCoder   Members   -  Reputation: 2992

Like
6Likes
Like

Posted 09 February 2015 - 11:21 PM

Also I do know that there is unity out there, but I am afraid that there is a possibility, although extremely slim, that I would get into point of needing stuff like render to texture.


Unity is a good fit for pretty much every bullet point you have up there. The two things that don't quite match up with what you want is all the game logic is controlled by programmed scripts so you can't avoid having to write code entirely. However, you will find lots of examples with unity and lots of premade content you could use. It also doesn't have a great GUI system IMO but it is fairly easy to get some sort of GUI working but it will take more work to make it look good.

Unless your current game calls for it, I wouldn't worry about render to texture. You don't need to commit to unity to make every game from now on either. If it is a good fit for your current game then run with it. You will still gain valuable experience that will carry over to any game engine.

In terms of speed, there isn't any game engine that will just run at optimal speed with anything you throw at it. Each platform and engine will have some different performance characteristics. If you want to push the limits of what your phone can do and still have a smooth experience you will have to spend some time profiling you game and optimizing it for your target. How fast an engine can render a single high poly mesh isn't going to tell you which of the two is more performant in all circumstances.

#4 Gian-Reto   Members   -  Reputation: 2565

Like
3Likes
Like

Posted 10 February 2015 - 04:39 AM

My vote goes to Unity or Unreal Engine 4.

 

Unity has a free version, with cut features, but nothing you will need if you are a lone wolf, especially if you are not that expierienced and reaching for the stars (you most probably never would be able to reach even with the Pro version).

 

UE4 will cost you 20$ minimum, but you get full source (not that interesting), no cut features (much more interesting), and a currently more cutting edge engine than Unity (at least until Unity 5 gets released). Yes, it ain't free, but 20$.... 3-4 beers less one weekend, and you are good again.

UE4 has 5% royalities for anything earned above 50k$ with your game, but I don't think that will bother you...

 

- Both engines have large communities and lots of tutorials.... for someone lazy that is NOT cheap, there is a huge wellstocked asset store for Unity that can save quite a lot of time if you purchase the right plugins and assets....

- Both engines will build both for windows and android. About building for both without ANY changes: good luck. Most probably not gonna happen. But as long as you don't care about performance, aspect ratios or things like that, might at least start up on both platforms.

- not optimizing your game is fine as long as you either make it rather resource friendly (low poly assets, small number of objects on the screen, low render distance, and so on), or you are okay with only getting 30 FPS on highend PC Graphics cards... on android, not optimizing might severly limit what devices can play your game without the thing turning into a slide show though either way. Mobile devices are still quite weedy, especially when most sold android devices cost below 300$

- define full integration. Both engines I listed give you functionalities for UI, sound and so on out of the box, and they are resonably easy to use. If you don't need anything special, just drop already prepared prefabs into the scene and you should be fine.

- Speed, but no optimization? Again, good luck. As stated above, you can get away without optimization only for very simple scenes and games... on the other hand, both engines should be among the best speedwise, I would give UE4 a small edge when it comes to performance because Unity is just now catching up to the cutting edge, but even with Unity you get more than enough performance... as long as you use the engine in a sane way (either make it simple, or optimize it).

- Coding: you will not find ANY engine out there that you can use to build a game without any coding. Forget that. Learn to program or hire a programer, it is that simple.

In UE4, you can use an integrated visual scripting engine that will hide the syntax of the language used for engine scripting... in Unity, you can buy something similar from the asset store. How far they get you until you will not be able to create what you need with the tool IDK though, and certainly if you have no idea of basic programing, even the shiniest interface will not make your scripts any better. An infinte loop is an infinite loop, no matter if you have written it in C++ or if you dragged and dropped it together in a visual scripting tool.



#5 Mekamani   Members   -  Reputation: 140

Like
0Likes
Like

Posted 10 February 2015 - 06:42 AM

I suppose I should have been a bit more specific with my post.

 

I should have mentioned that what I have in my mind is something like Final Fantasy Tactics like game. I also did have somewhat working system game on 2d, but due to some reasons, which I didn't think in the beginning of the project, I feel like going 3d would be easier way to do some stuffs. The whole map/level can almost be shown in one screen so I figured that there would not be that much optimization to be done, maybe just some simple if not shown in view, cull out stuff.

 

The model that I used for testing rendering has according to blender 383 verts, 410 faces, 746 triangles and only one texture. So I drew 120 models on the screen with animations and checked the fps. The cocos2dx seemed to be running almost at double the speed. So I had 270k vertices, 120 models with moving animations drawn on screen on my nexus5 at 28fps cocos2dx, 15 on libgdx. I doubt that there is need for this much drawing, but lets say something more realistic like 20 models ~1k triangles per piece and ground, so simple math would say that there is roughly 1/6th drawing needed to do, and with libgdx linear math would say that it barely can keep up on my android phone for 60fps, not to mention on less powerful than nexus 5... For some reason although libgdx said that it had roughly 250 draw calls which part comes from drawing text to screen for showing stats, it was showing almost 2.5k gl calls. I have no idea what made such things.

 

I checked the UE4 engine, and it seems to be 19 dollars per month + 5% out of 3k I would make. I honestly doubt I will make any money, and I would have gladly pay even 50 dollars for ue4 but having it as a 19€ monthly fee I probably am too cheap for paying at least for now.

 

As for not being a good programmer, I didn't mean that I do not know any programming at all. I have used C++/Java/C#/PHP and Lua before. I did do something that draws projects 3d vertex data in 2d by drawing simple lines. Although I never made any kind of culling or more advanced stuff like that like rasterization nor I didn't have to deal with conclave shapes nor nurbs, but I at least have some grasp on matrixes and how they work together and that you can multiply several matrixes together to get the end translation of a vertex. Still my knowledge on 3d programming is very slim, a bit knowledge here and there but not that much. As for general programming I have taken some courses on OOP, Algorithms and datastructures, some UI-design stuff and some things about databases, but I still do not think that I am a good programmer compared to people.

 

Full integration for engine, I mean not having to plug in yourself some sound system, or swapping around stuffs to make things work. For example for a long period of time, cocos2dx didnt even have working sound system for building windows desktop, unless you changed it yourself.

 

I have considered at least checking out, if I can make them work engines like Urho3d and Gameplay3d, something that I have completely missed. Although if they do not seem to be much faster than cocos2dx I probably will go with cocos2dx. Although testing unity3ds speed might not be a bad idea just for reference at least.


Edited by Mekamani, 10 February 2015 - 06:42 AM.


#6 Lactose!   GDNet+   -  Reputation: 4442

Like
4Likes
Like

Posted 10 February 2015 - 06:47 AM


I checked the UE4 engine, and it seems to be 19 dollars per month + 5% out of 3k I would make. I honestly doubt I will make any money, and I would have gladly pay even 50 dollars for ue4 but having it as a 19€ monthly fee I probably am too cheap for paying at least for now.

You can pay for 1 month and cancel the subscription. You'll still have access to whatever you had access to, but you will not be able to get updates and patches until you resubscribe.


Project journal, check it out!

http://www.gamedev.net/blog/1830-lactoses-journal/

 

Hello to all my stalkers.


#7 Gian-Reto   Members   -  Reputation: 2565

Like
3Likes
Like

Posted 10 February 2015 - 11:45 AM

I suppose I should have been a bit more specific with my post.

 

I should have mentioned that what I have in my mind is something like Final Fantasy Tactics like game. I also did have somewhat working system game on 2d, but due to some reasons, which I didn't think in the beginning of the project, I feel like going 3d would be easier way to do some stuffs. The whole map/level can almost be shown in one screen so I figured that there would not be that much optimization to be done, maybe just some simple if not shown in view, cull out stuff.

 

The model that I used for testing rendering has according to blender 383 verts, 410 faces, 746 triangles and only one texture. So I drew 120 models on the screen with animations and checked the fps. The cocos2dx seemed to be running almost at double the speed. So I had 270k vertices, 120 models with moving animations drawn on screen on my nexus5 at 28fps cocos2dx, 15 on libgdx. I doubt that there is need for this much drawing, but lets say something more realistic like 20 models ~1k triangles per piece and ground, so simple math would say that there is roughly 1/6th drawing needed to do, and with libgdx linear math would say that it barely can keep up on my android phone for 60fps, not to mention on less powerful than nexus 5... For some reason although libgdx said that it had roughly 250 draw calls which part comes from drawing text to screen for showing stats, it was showing almost 2.5k gl calls. I have no idea what made such things.

 

I checked the UE4 engine, and it seems to be 19 dollars per month + 5% out of 3k I would make. I honestly doubt I will make any money, and I would have gladly pay even 50 dollars for ue4 but having it as a 19€ monthly fee I probably am too cheap for paying at least for now.

 

As for not being a good programmer, I didn't mean that I do not know any programming at all. I have used C++/Java/C#/PHP and Lua before. I did do something that draws projects 3d vertex data in 2d by drawing simple lines. Although I never made any kind of culling or more advanced stuff like that like rasterization nor I didn't have to deal with conclave shapes nor nurbs, but I at least have some grasp on matrixes and how they work together and that you can multiply several matrixes together to get the end translation of a vertex. Still my knowledge on 3d programming is very slim, a bit knowledge here and there but not that much. As for general programming I have taken some courses on OOP, Algorithms and datastructures, some UI-design stuff and some things about databases, but I still do not think that I am a good programmer compared to people.

 

Full integration for engine, I mean not having to plug in yourself some sound system, or swapping around stuffs to make things work. For example for a long period of time, cocos2dx didnt even have working sound system for building windows desktop, unless you changed it yourself.

 

I have considered at least checking out, if I can make them work engines like Urho3d and Gameplay3d, something that I have completely missed. Although if they do not seem to be much faster than cocos2dx I probably will go with cocos2dx. Although testing unity3ds speed might not be a bad idea just for reference at least.

 

lactosel already covered your misunderstanding of the UE4 sub fees. Of course, every time you NEED an update (Because epic fixed an important bug for example), you will have to pay for an additional month to download the newest version. Still pretty cheap for a fully blown engine with source code.

 

As for programming, if you know the basics, you should be able to use Unity or UE4 for simple tasks. Some optimizations can be done with this engines without coding, there is an occlusion culling system built into Unity for example, though it is only accessible in Pro AFAIK. Stuff like combining meshes and creating atlases of your models can contribute A LOT to your games performance. These only need you to be somewhat comfortable with a 3D Program like blender. In Unity Pro, batching can take care of that, but it just makes your life easier by you not having to combine your level geometry yourself (and enabling you to disable batching for certain objects that you need to move around for example, while enabling it again later).

 

I wouldn't worry too much really. At some point, you need to jump into the water, so to speak. Just try to get stuff running, and learn from your mistakes. Unity has a good API documentation up, as soon as you are fluent enough in C# or JavaScript to be able to write behaviour scripts, and have the API documentation bookmarked, you should be ready to go.

 

About model quality / optimization:

Your models sound rather low poly.... nothing to worry about. Even a 1k poly model is fine, as long as it has a single material, it should render quite fast. What you describe there with text rendering using so many draw calls (if I understood that correctly) could mean that your text objects are not batched, which means a huge overhead for the GUI. Most professional UI systems use batching to make sure the UI is rendered in a single draw call. IDK how the stock Unity GUI system solves this, but it has just been completly revamped for Unity 4.6, and at least in NGUI I use for my GUIs, all GUI objects are cleanly batched into very few draw calls.

 

About the 2D vs. 3D question:

3D Graphics have a higher overhead. Modelling something in 3D takes more time (6 sides to model instead of drawing a single side in 2D), and setting up stuff for animation can take quite some time, if its a skinned mesh.

On the other hand, 3D objects scale better compared to 2D sprites for complex or isometric scenes. When a sprite needs to be redrawn for multiple directions, or has very complex animations, the amount of frames to draw start to exponentially grow.

While in 3D, as soon as the model is rigged and ready for animation, there are many tools available nowadays to help with said animations (MoCap with Kinect for example), and you do not need to redraw a model for different animation frames.

 

But keep in mind, while low quality 3D graphics is not that hard to achieve and quite in reach even for lone wolves, steer clear of trying to achieve AAA quality.

 

About the engine integration:

Don't worry about that with Unity or UE4. Some of the stock systems might not be as good as some thirdparty systems, or the stock systems of other engines, but at least you will find quite capable stock systems integrated into both engines.

 

As for other engines, you need to check their "specs" so to speak... something that might help you is the engine database on devmaster.net


Edited by Gian-Reto, 10 February 2015 - 11:51 AM.


#8 Scouting Ninja   Members   -  Reputation: 955

Like
3Likes
Like

Posted 10 February 2015 - 08:15 PM


The model that I used for testing rendering has according to blender 383 verts, 410 faces, 746 triangles and only one texture. So I drew 120 models on the screen with animations and checked the fps. The cocos2dx seemed to be running almost at double the speed. So I had 270k vertices, 120 models with moving animations drawn on screen on my nexus5 at 28fps cocos2dx

So just doing some basic math, 746tri * 120 models is 89520tri / 6 =14920tri per model (120/6 =20).

That means that you can have 20 models of 7460 polygons at 28 fps, this isn't 100% correct because of draw calls, around 3730 polygons for 60 fps.

 

Now if you plan on allowing players to run the game on lesser cellphones you can go with 3000 polygons, or just keep it at 3600 considering that by the time you have made this game, cellphones would have upgraded four or five times.

 

AAA titles have around 50,000 - 25,000 polygons for main characters. PS3/Xbox360 10,000-7,000 polygons. PS2 4,000-2,500 polgons.

Considering the above your game will fall in the PS2 era, by my calculations this is where mobile games should be at the moment.

Note that games like Final fantasy X int the PS2 era used 10,000- 7,000 polygon models, just as in the the PS3 era there where games that used 25,000-20,000 polygon models.

 


Also I do know that there is unity out there,

I would not recommend Unity if you don't want to pay, it withholds much needed features and you will need a few extension to have a proper workflow.

You could code around the disabled features, but if you are that good with code you could use Panda3d, it's code only.

 

UE4 is a great engine, it fixes a lot of things that I hated about udk. Mostly that udk made it near impossible to make a game on your own.

UE4 has the blueprint system that allows even unskilled programmers to make games.

 


I honestly do not know much about optimizing 3d, nor I am planning to do anything too complex stuff, just showing models and thats about it.

There are three things that you MUST know before using 3d models.

Culling, Batching and Lod these are things that you must and will use, even with 2D games you need Culling and Batching.

It's important to know that on it's own a Lod manager gives only a small performance boost, batch manger will give a moderate performance gain on it's own.

When a batch manager is used with a Lod manager you can get massive performance gain.

If you have a prop at 3000 polygons and ten int the background at 300 polygons the batch manager could merge the ten and display them at the same cost as the single model near the camera. Saving nine draw calls.

 

Then if you want you can check on normal maps, thy help a lot.



#9 Mekamani   Members   -  Reputation: 140

Like
0Likes
Like

Posted 12 February 2015 - 09:18 AM

I tested out the unity3d. I noticed that the free version lacks profiler for mobile. I suppose it is possible to get by this by just profiling the pc-version and assuming that it works pretty much the same. I made some easy method to draw fps on the screen to at least get an idea how well it worked. It did indeed work a lot faster than cocos2dx or libgdx in terms of speed. I managed to draw roughly 3 times the amount of models with roughly same fps on unity compared to cocos2dx, which would translate to close to 10 times more stuff than libgdx.

 

After pointing out simple calculation of how 746 triangles * 120 turned out to be almost 300k vertex on both cocos2dx and libgdx, I suspect there is probably some major error on my model, which wouldnt be a surprise. I did notice though that the triangle count actually doubled from blender when transforming to fbx, and then from fbx to their own format, the count increased again when rendering it. On both engines the vertex count was actually pretty much the same. There is probably something that I have missed for the performance improvement, like culling back faces, because the vertex count stays same regardless of which side I look the model from. I also thought that maybe for some reason the faces become double sided after exporting.

 

I then tested out the urho3d. It seems that with my model, it can do about similar speed as unity, if not even faster considering that I can also draw shadows with it. On the other side, it probably lacks a lot in terms of features compared to unity, but at least quick peak on the engine, it seems pretty solid. For now the huge down side for me is, that the engine is relatively unknown, and there is not really much tutorials out there besides the roughly 40 samples. They do seem to cover pretty well about most of the features that I would probably need to use, but some stuff seems to be missing. The creating UI-part is pretty vital for my game, which seems to be working with the engine, but sadly there are very little amount of examples about ui, but probably enough to get things done.

 

There was mention about Panda3d. I don't think there is really fully working android version of this engine. I do remember fiddling with it couple of years ago, and it seemed pretty nice. Arguelably my knowledge about 3d was even worse back then.


Edited by Mekamani, 12 February 2015 - 09:19 AM.


#10 Mekamani   Members   -  Reputation: 140

Like
2Likes
Like

Posted 12 February 2015 - 06:16 PM

I suppose these past few days have really showed to me how thin my knowledge about 3d is.

 

I did notice that urhos profiler is really nice, but after playing around with different engines and testing stuff, I realised that what I measured was not exactly what I should be measuring. There were many things said about draw calls, and I figured 1 draw call per model is not so bad and 130 draw calls would be fine.

 

I noticed that in both libgdx and cocos2dx both I think one of the problems for the slow downs is actually animation. If I use non-animated objects I can put a lot more of those, which made me try more vertices per bone. I subsurfaced my model 2 times, so it had 16 times the verticles in blender. So in blender I had 12530 triangles, which seems to become close to 40k triangles.

 

So I tried rendering 121 40k triangle animated mesh, to my surprise the fps dropped to around 15 from 30 on cocos2dx, and to 15 from the roughly 50 fps without shadows and 40 with shadows on urho and on libgdx the fps remained 11 like what it was with the old mesh. I guess adding even more triangles would make them all equal, when it fully uses the whole capacity on rendering.

 

So my conclusion is, that the speed doesn't seem to be issue as long as I understand why the slow downs do happen. Also I am sorry if someone else who has been reading the posts and my own tests have drawn wrong kind of conclusions from my wrong kind of testing methods. At least I myself am now more aware of this.



#11 Mekamani   Members   -  Reputation: 140

Like
0Likes
Like

Posted Yesterday, 10:41 AM

So UE4 came out and is free now. I was eager to test out my test on performance on my android... and it was worse than libgdx, cocos2dx, unity and urho3d...

 

Most likely there is something wrong with my model, settings with UE4, maybe I would need to figure out how to batch animated models with ue4 to get the performance up.

 

So what I had was: I used the nothing scene, setup mobile, scalable and no starting content. I generated blue print that spawns 100 animated objects. The mesh was imported from blender and uses 1 diffuse texture. The ue4 engine added some specular lightning to objects though, which might explain some of the performance.  Each model has somewhat of 1.1k faces, 13 bones and no ik-rig. It ran roughly 30 fps, before the processor started to slow down the process down to 17fps. The draw calls were something like 120, so most likely it doesn't use more than 1 draw call per mesh.

 

So I guess ue4 isn't my silver bullet to fast mobile graphics without any need to know optimize things either. Although I am pretty sure it is something to do with the configurations I have. I tried to disable just about everything from the render options except culling.



#12 Gian-Reto   Members   -  Reputation: 2565

Like
1Likes
Like

Posted Today, 05:06 AM

I would have guessed a draw call limitation, but seems you checked that already. Does UE4 give you some kind of profiler? Unity Pro has one, and it is sometimes extremly helpful to see which method of your own scripts take what percentage of the frame time, or where in the rendering the time is lost.

 

 

I wouldn't hope for a silver bullet really... I'd expect differences between top tier engines to be pretty close... but that goes the other way round too, I also suspect something going wrong with your setup.

Maybe setup the same scen in Unity (if you haven't done that already), create both a Unity and UE4 build, and analyze the GPU and CPU usage of both. There are GPU profilers that let you do that visually...

You should be able to tell better why exactly FPS are lost (like if its CPU or GPU that is eating up the frametime)...

 

Of course I have no idea if you have this tools available for mobile... and no idea if performance difference is the same on PC. Maybe test that first.



#13 Mekamani   Members   -  Reputation: 140

Like
0Likes
Like

Posted Today, 05:27 AM

Now that Unity 5 personal edition has most of the limits that have been stopping me from using unity, gone, I decided to run my test on unity as well. I put 121 units like before, boom 60 fps on unity on my mobile (Nexus 5). I pumped it up to 15x15 clones of same unit, fps starts to drop, where as in urho it still running at 60 fps. I bump this up to 400 units, 20x20 and unitys fps drops to 20, where as on urho runs at 40. I figured there is probably something that I am missing, so I check the options for unity, btw I had removed all shadows and stuff like that before, so I was only drawing the animated mesh. Finally I try to remove hw skinning, and fps goes up to 40, same as on urho. This makes me wonder if the ue4 mobile version of my test iis ounded by gpu skinning on my mobile (the fps was higher on unity/urho with 4x amount of animated units). Sadly I didn't find a way to turn of gpu skinning for my mesh in ue4 to test it out.

 

Also this means that most likely my test itself, like I've suspected, is bit faulty by using a lot of copies of one animated mesh. Basically it would be something like rts-type of a thing, where there are tons of simple clone units moving on a screen without having any other components like AI or navigational mesh for path finding involved. I have no idea how different would it be if all my meshes were different and/or used different skeleton for deforming.







PARTNERS