Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

considering a switch to Unity3D from unreal

Discussion in 'General Discussion' started by burntbyhellfire, Mar 30, 2018.

Thread Status:
Not open for further replies.
  1. Lagermeister

    Lagermeister

    Joined:
    May 13, 2017
    Posts:
    18
    I did not wanted to say that Unity has unlimited resources - nobody has and so you have allocate all available resources. Epic may have basic features but Unity has also basic features. When you talk about advanced features there will much more light and shadows.

    The question ist not if engine X or Y is better, the real question which engine matches your project, your abilities (you or your team) at best and for hobbyists you have to consider your hardware (on low machines Unreal is out) . The answer can be for different people or projects different.

    The problem for beginners is that they can evaluate their abilities correctly and do not know how to make a game. In addition all these engine vs engine comparisons have often only limited value as they are often outdated, biased by the reviewers abilities and style and when you want top performance you need top hardware.

    For me Unity is the best solution (C#, tutorials and documentation, personal work flow, commitment to develop the engine, Job system and so on) - but it was a tight decision.
     
    Ony and Lu4e like this.
  2. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    As we all know Unity's merit, really curious to know recon0303's mind, just give him some room to speak.:)
     
  3. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I use both engines at the moment, though Unity has always been my main one and I'm always reevaluating things.

    The next 18 months should be very interesting, as Jobs/Burst/ECS and HD pipeline & shadergraph mature. At some point we will also be able to compare GPU-based modern effects systems, since both UE4 and Unity have systems coming for this later this year.
     
    antoripa and Lu4e like this.
  4. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I was attracted by this post reading many comments about c++ and c# .. sorry. there are really funny theories. It is really not nice to circulate wrong information. I think that most people wrote about c++ and c# have never used both languages and they have never written a c# application in environment differently than Unity and for enterprise application.
    C++ is not based managed code and it is compiled in machine code, so it does not rely on .NET framework. So really you cannot compare those and really C++ is powerful than C#. Core functions in Unity are written in C++ for performance reason. Another important point is how C++ handle memory using pointers that is a concept that C# did not use because use is not complex. There are more differences but not easy to get if you don't have an advanced programming background. Add more does not make sense, because the core difference between the engine is not the programming language at CPU site.
    About the difference between Unreal and Unity any, .only who has released a game using both engines can tell us what is the difference.
    What I can say is that I see the a lot of AAA games are developed using Unreal and many are in the top 10 sales on Steam. And another point is the Epic develop games so they deal more with challenges that you have with large game development. It is totally wrong that because that they only add features that are required by their game, and I would invite again to circulate only correct information and not personal opinion or feeling. That will not help who asked a suggestion. Unreal has more horsepowers, but Unity is putting a lot of effort improving performance ( new Job Systems, ECS and new compiler ) and graphics rendering. But I don't expect to see those in production before 2019. I agree with @recon0303 and I would even say that at the end what is question is not what is the best engine, but it is what is the best suitable engine for your project.
    My suggestion is that if you are small indie studios or a one army man dealing with game engine in spare time. Unity is the best option as you will achieve a good result with not a huge effort. But if you expect quality like "A Way Out" or "Sea of Theives" and you have strong background and time and money to invest in development .. i have never seen a game with Unity having the same quality. i think i don't need to add more ...
    Btw ..I use Unity and I develop assets for Unity, so my choice has been Unity and reason was not that Unity is best or worst than other. But was based on my needs.
     
    Billy4184, recon0303 and Ony like this.
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,137
    It's entirely dependent on the implementation. Microsoft created a monster known as Managed C++ and others have made implementations that are interpreted instead of compiled. What's being discussed here is definitely not these though.

    Yes, but the performance you gain from switching languages can be surpassed by a better implementation. Just as an example the new Entity Component System (ECS) and Job System framework currently in development by Unity can bring very high performance.

    Yet both ECS and the Job System are written in C#. C++
     
    Lu4e likes this.
  6. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Managed C++ is a now deprecated Microsoft set of deviations from C++ . so please again .. write only if you have real hand on experience in C++
     
    recon0303 likes this.
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,137
    I do have experience in C++.
     
  8. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I dont think as you talk about managed c++ .. depracated years ago ...
    personally I have experience in financial domain and in my last position I was in charge as Senior IT Architect in rthe third biggest IT Company . I have even articles on microsoft blog .. you can check my linkedin profile .. thanks
     
    recon0303 and Lu4e like this.
  9. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,137
    I gave it as an example.
     
  10. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I don't know what language has been used to write ECS and Job System core. I hope that is not c# .. other systems like Terrain are written in C++ as is the only option.
    So topic closed at my end as it is not my intention talk about that, I only gave advice about the status of C# and C++ ..btw . I was part of Microsoft beta in 1998 for what is now .NET framework . .have a nice day . cheers
     
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,137
    To my knowledge (which is basically the Unite 2017 and GDC 2018 talks) the entire thing is written in C#.
     
  12. Lagermeister

    Lagermeister

    Joined:
    May 13, 2017
    Posts:
    18
    Sorry, this is not wrong. It was a statement by their developers on their own forum. Background was a discussion about some incomplete or not advanced features. Of course, they also add features which they do not "need" to provide a complete game engine but these features are not a priority. Priorities are their own needs and big clients. And it makes sense. They have to earn money which will support the free engine which can generate additional revenues. Unity has an other business model.
     
  13. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I expect a system compiled in native code and that has full control of the memory using pointers and without garbage issue..
    If that is going to be achieved using c# I will be happy to learn something new as mostly I use C# language and c++ only for few core components...
     
    recon0303 likes this.
  14. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I would just add that I am already using the Job System implementing few core function of my asset Cascade. I am not new to this topic
    During the design, I have already followed a DD approach as I was aware of new coming stuff that requires a different design than OO. But more horsepowers are also added by new compiler. I can report some performance on one use cases i tested what was the creation of ocean waves using multiple noise generators on a large mesh with 65545 vertices. You can do the same
    So below my results.

    1) Monobehavior 12 FPS
    2) Job System 46 FPS
    3) ECS + new Compiler 90 FPS
     
    Lu4e likes this.
  15. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    After reading the JobHandle of ECS, avoid empty calls is just awesome. Salute to our Unity God.;)
     
    antoripa likes this.
  16. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    @recon0303
     
  17. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    always avoid empty calls .
     
    Lu4e likes this.
  18. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    Deprecated doesn't mean she doesn't have real hand experience, I see you are veteran C++ big brother, give some love <3.
    C++ in fina field reminds me the old days writing dll for dirty users forecasting on VBA:p
     
    antoripa likes this.
  19. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    yeah, they finally fixed this for MonoBehaviour:)
     
    antoripa likes this.
  20. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    ahaha . yes .. i can understand ...but there are people that still do that :)
     
    Lu4e likes this.
  21. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Well it is still early days for Burst and thats clearly when some of the performance action is.

    You might find the following blog interesting, as it takes an early look at the performance of some pathtracing code, comparing the c++ version to C# using .NET utside Unity, Mono inside Unity, IL2CPP and then the new Burst compiler.

    Daily Pathtracer Part 3: C# & Unity & Burst
     
    antoripa likes this.
  22. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Few posts above I shared my result from a test I did last week ..and I could not optimize the noise generator code as there are still missing data type you can use with the new compiler, so noise generator was not impacted by performance increase using the new compiler
     
  23. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,137
    Like I mentioned it was just an example that just because a language is traditionally implemented one way doesn't mean it has to be that way. I have never used managed C++ or interpreted C++ myself. I tend to steer clear of oddities like that. My C++ experience is with MinGW (GNU C++).
     
    Lu4e likes this.
  24. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I did not get it was an example because you mentioned in your post "It's entirely dependent on the implementation. Managed C++ does exist."
    So you can agree that from a general point of view C++ and C# are languages that rely on compilers with 2 deeply different concepts and that they have a huge difference in the design on how you can handle the memory allocation.
    And that makes difference when you deal with performance. Unity a few years ago launched IL2CPP
    Do you know how it works? CPP stands for C++ and the system starting from a c# code generate c++ that is going to be compiled in native code. (high-level process ) . I am just trying you to give the right view. Hope you don't get me wrongly
     
  25. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    There is even another point to consider. Currently unity generate managed code. that can be easily get reversed engineering with a lot of free tools getting the original c# code.
    using IL2CPP , as example, you will get native code . the only code that you can code is the assembly
     
    Lu4e likes this.
  26. burntbyhellfire

    burntbyhellfire

    Joined:
    Mar 30, 2018
    Posts:
    53
    i am really interested to see what sort of new games come out of the upcoming unity release which is supposed to make it capable of far better graphics.. and looking at your average small team game vs a similar one between unity and unreal (say ark for unreal and the forest for unity), the graphics right now for an average game seem to be on par..

    sure, unreal can do some photo realistic stuff but in the grand scheme of an actual game, most PCs wouldnt be able to run a lot of what unreal can technically do and for practical uses, i do not see the graphics between the two to be that big of a deal, and with unitys next release having a PC/console preset, i think unity will close the gap in that department.. id be interested to see what unreal does to keep ahead.. isnt competition fantastic?

    as far as cryengine goes.. yeah, i couldnt even get that crap to run citing cryrenderd3d11.dll errors and such (and yes, i most definitely have a DX11 capable GPU) so if the editor software is that buggy, im not going to waste my time trying to delve any further into something with almost zero available tutorials or community support
     
    antoripa likes this.
  27. burntbyhellfire

    burntbyhellfire

    Joined:
    Mar 30, 2018
    Posts:
    53
    there is one more comparison between the two engines that i have been testing out that i have not mentioned yet.. i started a similar thread on the unreal message board to see what kind of response or attitude id get from the unreal community compared to the responses and behavior witnessed here, to see which group would easier and better to talk to to potentially maintain a message board presence with, and i have to say the unity community wins that hands down.. ive gotten a lot of responses, none rude while my similar thread on the unreal forum was largely ignored
     
    Lu4e, antoripa and Ony like this.
  28. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,137
    Yes. It translates C# into C++ then compiles it with a C++ compiler. From a high level perspective that's not too different from the way modern compilers work in general. Modern compilers have a front end that translates into an intermediate language and then the back end compiles that into machine code.
     
    antoripa likes this.
  29. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,973
    That's a good point, and one of the main reasons that keeps me sticking with Unity. The great community. Come for the engine and stay for the donuts.
     
  30. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    May I ask the reason of that ?
     
  31. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    [
    I know that you can answer .. i was just trying to show even from unity side that c++ has a lot of benefit so far ..
    but I can telly you that new stuff are really powerefull and using c# is easier than c++
     
    recon0303 likes this.
  32. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    You can have a look to that video



    It is something that will be fully supported by the end of year . but potential is amazing
     
  33. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,137
    Likewise you already know the answer. Modern C++ compilers generate very optimized code. I'm not at all surprised that it's being treated as an intermediate language.
     
    Lu4e likes this.
  34. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Nope ...
    reason is that c++ compiler generates native code ( so unmanaged ) and not managed .. and not relyes on .net interpreter anymore + memory handling by c++ that is different ...huge differences . anyway .. i don't want to add more . focus on the topic .. you can rely on your opinion/feeling or try to improve your nice skill ..i have you few inputs ..have a great day
     
    Lu4e likes this.
  35. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,137
    Technically the back end generates native code. Unity could have very easily written their own front end and completely skipped C++, but using C++ meant they could leverage the advanced optimizations that the front end performs.

    It's literally one of the key points they make in their earliest blog posts.

    https://blogs.unity3d.com/2014/05/20/the-future-of-scripting-in-unity/

    Yes, but it is possible to implement some of the concepts you find in C# in C++. Unity uses the Boehm GC with code generated by IL2CPP. You can find information on it at the links below.

    https://en.wikipedia.org/wiki/Boehm_garbage_collector
    https://github.com/ivmai/bdwgc/
     
    Last edited: Apr 1, 2018
    Lu4e likes this.
  36. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    ok . good luck ..
     
  37. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    The discussion is very informative, thank you antoripa:)

    Ryiah...what a charming Unity girl:oops:
     
    antoripa likes this.
  38. burntbyhellfire

    burntbyhellfire

    Joined:
    Mar 30, 2018
    Posts:
    53
    thats what has me considering a switch or at least giving unity a better shot, its not so much about what it does right now, but it has potential that it seems to be realizing very soon, with their HDRP its going to give unreal a good run for its money.. if they could offer a bit better functionality on top of it without having to rely on paid for external programs, it'd force unreal to either drop its price or come up with something even better

    bottom line is, the unreal community needs unity, and unity community needs unreal because when both are fighting over customers, we all win.. if people never contemplated switching, the engines would become complacent and stagnant
     
  39. burntbyhellfire

    burntbyhellfire

    Joined:
    Mar 30, 2018
    Posts:
    53
    quick question... lately ive been experimenting with a gerstner wave formula in UE4 to create realistic waves by generating a moving heightmap based on a mathematical formula calculated by a script... the mathematically calculated, changing height map results in waves that actually move up and down and push and raise/lower objects floating on them

    i have it mostly figured out in UE4 blueprints.. does anyone have a sample script of this same task coded with C#?.. it was a real PITA and spaghetti monster mess to do in blueprints so im wondering what a similar task scripted in C# would look like?
     
  40. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    Gerstner wave should be done on shader side, since periodic vertex movement.
    Perhaps you can open the source of hlsl from ue4, just rewrite it in cg inside unity. (edit: only if the algorithm itself is not bounded by ue4 license)
     
    antoripa likes this.
  41. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    You nailed it. Which is why I never will use the best , nor comment on C# OR C++ in that regards, since I to been using C++ out of of game engines. I stated programming since the 80's using Commodore 64..I also was in the auto industry where I had to program computers for racing, and modern computers for cars, trucks, etc. But I ALWAYS find it funny when people try to say an engine is better..... I will only comment on my experience, not personal feelings, or some fly off the pants, fan boy comment..I hate that.... Which is why in my statement, I refuse to say such... Unreal, can be better for most teams, but from my experience, Unity is much harder and lacking for larger games.. Not saying its impossible as I'm making one right now and made others... But as you said Unreal has many more successful games, for a reason... Cry also has some as well, and been around for years.... what makes Unity good is for people who want to learn game development a bit or mess around for fun.....


    Can a AAA game be made with Unity sure.. I have no doubt.... But when I see people making silly comments about an engine..missing typical game functions.. and saying Unity has them........that tells me they no way have used any other engine......This is why Unity is adding many basic functions...Like Pro Grid, Pro Builder etc...Even in colleges, they do not use Unity for everything...Unreal was used alot more for level design, World Building, and much more...Unity was used for some things, but on a smaller scale.. This was about 5 - 6 years ago.. Also look at Speed Tree, Modo, Substance....Most engines you can use with out issues......Unity we have to wait months to get support to use the new stuff...That's a problem.. I could go on and on, about issues with each engine....But it boils down to what I already said in my other post.....I use Unity, I also use , Cry, Unreal and Many In house.....Depends...
     
    antoripa likes this.
  42. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    You say you are ignored, I would disagree, do you realize, many developers DO NOT Have time to bother with this comment?? They are busy making money, or could careless...They are professional enough, to not want to get into these battles, HELL I typically don't not worth the hassle... It may sound rude, but i'm honest......If you posted this on a In house engine, people wouldn't give you the time of day..as they DO NOT CARE... use the engine or don't... When people compare engines, its a matter of taste, and can be very subjective.......So that is why They won't bother either....as some who has used Unity for 9 years, mostly professionally, and Unreal for longer... Cry and many more....

    Unreal vs Unity do a search, its been around for years....all over the net...People do not care anymore.... Use what you like or want....to use..

    Unreal vs Unity
     
    antoripa likes this.
  43. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    As a general rule of thumb, I don't trust the opinion of anyone in programming who hasn't mastered the art of the full stop. If your syntax is as terrible as you grammar, compilers of all languages will eat you for breakfast. I just can't take seriously anyone who says they are a programmer, but who's posts look like they have never touched a compiler.

    This.

    The strength of the Unity community is probably the best thing the engine has going for it. Its not just here either, go to any of the places where game developers hang out, and you will find a significant community of Unity users. Unreal users are harder to find. This covers everything from general support to hiring staff.

    The performance discussions of C# vs C++ are mostly a waste of time. Shaving off a few micro seconds off of your code execution will not make or break your game. If you want to compare the engines, discuss feature set and workflow. These will be far more significant concerns.
     
    Ony, Ryiah, Lu4e and 1 other person like this.
  44. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I agree. I that is a typical task to implement at GPU side.
     
    Lu4e likes this.
  45. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,759
    I haven't written code that generated garbage in ages. There are plenty of practices you can use to avoid GC calls.
     
    tatoforever and Ryiah like this.
  46. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    My first game I created using assembler Z80. 8x8 sprite and 16kb ram. ( ZX Spectrum by Sinclair ) I was 13 years old
    Now after 25 years in financial and pharmaceutical industries, back to my passion. But I am disappointed to read comment that are really ridicolous and that you cannot try to shape properly without get bitched. People should give advice only when they have huge experience on the topic, and not just because they spent somewhere in their life a bit of time on that topic. Being humble ..
     
    Lu4e likes this.
  47. Lu4e

    Lu4e

    Joined:
    Mar 23, 2018
    Posts:
    276
    Basically, the whole discussion is about personal preference, it's kind of chopsticks and spoon. recon0303 is giving a very good advice, try more engines, and pick the most suitable for your task, and earn your money.:)
     
    Ony and antoripa like this.
  48. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I agree with both of you. At the end of month, bills are on our table and we need to pay those.
    And how I wrote in my first post, that approach led my decision to develop bunch of assets I designed using unity.
     
  49. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    good luck man ..my colleagues and myself are not so smart to make stuff simple like you do.
     
  50. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    simply a genius. You should talk to next keynote and explain Joachim Ante how they are wasting time with new stuff to get sorted GC issue dealing with stack and heap allocation properly ...wow ..if I knew ...
     
Thread Status:
Not open for further replies.