News for hackers. Stuff that matters.
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by lmm on Tuesday February 09, 2016 @08:25AM (#11065062)
Five years ago using C# for a serious game would get you laughed at. But every day the balance shifts: computers get faster, but developers don't get smarter, so a language that sacrifices performance for ease of development becomes a better choice. If you're looking to the future I'd recommend sticking with C#.
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by thecatspaw on Tuesday February 09, 2016 @09:03AM (#11065280)
isnt the main problem with C#, Java and similars the garbage collector? which can at its worst kick in while you're in the middle of a fight or something. Even if its just 20ms, in a online FPS it potentially makes the difference between winning and loosing it.

edit: I am a Java guy myself, and would like to do some amateur gamedev in that direction (online FPS), but im worried about above mentioned point.

Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by shinymark on Tuesday February 09, 2016 @10:55AM (#11066081)
Yes. Explicit control of memory is one of the big reasons C++ wins for high performance realtime applications like games.
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by lmm on Tuesday February 09, 2016 @09:11AM (#11065329)
True as far as it goes. Modern GC can mostly be done concurrently (it's only heap compaction that requires stopping the world). Fully pauseless GC is very much possible (see e.g. Azul C4), as are e.g. architectures involving multiple short-lived processes with individual heaps. Even without that, it's often possible to do a relatively small amount of manual work to do the things that require pausing only at appropriate times.
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by autoreleasepool on Tuesday February 09, 2016 @12:57PM (#11067217)
Possible != usable in production.
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by lmm on Tuesday February 09, 2016 @05:42PM (#11069421)
C4 is absolutely a production product. It's used in systems that insane amounts of money depend on. As for the manual approach, I've seen it work in production.
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by pjmlp on Tuesday February 09, 2016 @05:44PM (#11069437)
Well, not everyone is writing the next version of Crysis.

There are plenty of production games that can live with < 10ms pauses.

Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by Nang1975 on Wednesday February 10, 2016 @08:26AM (#11072539)
It's not just the pauses though. Cities Skyline has terrible performance, far worse than other more-intensive 3D games, and I can't help but feel that their choice of game engine is a major reason behind that.
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by pjmlp on Wednesday February 10, 2016 @08:58AM (#11072714)
The engine or the programmers?
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by UK-AL on Tuesday February 09, 2016 @01:16PM (#11067379)
Modern C# allows you to define a code path where GC is not allowed to run. I'm not sure if unity allows for this.

I'm also not sure about the new c# -> to native compilers coming out.

Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by 0xffff2 on Tuesday February 09, 2016 @04:18PM (#11068850)
Could you link to the feature you're talking about? Unity uses a relatively ancient version of Mono IIRC, so it's unlikely that the feature is available in Unity unless your definition of "modern C#" is "after generics were added".
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by pjmlp on Tuesday February 09, 2016 @05:38PM (#11069393)
Modern C# means .NET 4.6

For example GC.TryStartNoGCRegion

https://msdn.microsoft.com/en-us/library/dn906201%28v=vs.110...

SafeBuffers

https://msdn.microsoft.com/library/system.runtime.interopser...

Or using array segments

https://msdn.microsoft.com/en-us/library/9cc4bx8k(v=vs.110)....

Unity has made a lot to spread C# love among game devs, but it also gave a bad reputation to those unaware how .NET really is.

Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by UK-AL on Tuesday February 09, 2016 @05:31PM (#11069340)
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by shmerl on Tuesday February 09, 2016 @04:56PM (#11069102)
> If you're looking to the future I'd recommend sticking with C#.

Not really. If you look to the future, I'd recommend Rust for making game engines. They by nature should be latency sensitive, and any kind of non deterministic behavior caused by garbage collector is really unacceptable.

Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by eropple on Wednesday February 10, 2016 @02:26AM (#11071238)
"Really unacceptable"? The literal hordes of games using Lua, JavaScript, and Python as game-logic languages seem pretty acceptable to me.

Rust is a nice language, but Unity already uses C++ outside of the user-facing scripting layer.

Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by bobajeff on Tuesday February 09, 2016 @09:12AM (#11065335)
"computers get faster"

Not everywhere. Phones, tablets and older or low end laptops are very popular.

Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by lmm on Tuesday February 09, 2016 @09:30AM (#11065443)
Phones are really quite fast these days. C# is a perfectly reasonable choice for a phone game.
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by autoreleasepool on Tuesday February 09, 2016 @01:01PM (#11067258)
C# is a perfectly reasonable choice for a phone game that can afford garbage collection pauses. This means turn-based.

In every other case, you're better off using a language whose resource management model doesn't fight you.

Swift is the best of both worlds in this regard.

Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by UK-AL on Tuesday February 09, 2016 @01:18PM (#11067408)
Considering virtually every major mobile game is unity these days, is this really an issue?
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by outworlder on Tuesday February 09, 2016 @01:49PM (#11067670)
Not at all. Memory management for games is something you have to pay close attention to, no matter what's your strategy for dealing with garbage. But this whole GC discussion is missing several years of technology development and best practices.

Besides, it is not guaranteed that you'll succeed with a manual strategy for dealing with garbage. Naive strategies have a really low throughput. They may not stop the world, but will be slow.

Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by Narishma on Tuesday February 09, 2016 @02:23PM (#11067949)
Unity is a C++ engine. Only the game code is done in C#.
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by pjmlp on Tuesday February 09, 2016 @05:51PM (#11069474)
You mean like those engines done in Assembly with C and Turbo Pascal as scripting logic 20 years ago?
Re:Amazon Lumberyard: free AAA game engine with Oculus and A... by pjmlp on Tuesday February 09, 2016 @05:40PM (#11069405)
And around 20 years ago using C for serious game development was also a joke.

Apparently we need to go through this cycle every few decades.