11 ms·
Mono for Unreal Engine
- cantorRuth 9y agoWhy is this interesting.?
- bastijn 9y agoWhy wouldn't it be? There are tons of entries on HN on [insert random project]. If enough people upvote in short enough time it hits the FP and is considered interesting. Not sure what else there is you want to see answered? The question: "Why is this interesting to me." Is entirely different and we cannot possibly start to answer that for you. We can give you the executive summary though. This brings access to UE4 to people without c++ knowledge. You can compare it to any managed wrapper around an unmanaged library. Some will curse it, others love it.
- Blaaguuu 9y agoPreviously you could only write code for the Unreal Engine with C++ or the visual scripting system, Blueprints. This allows people to use C# for everything that they would normally need C++ to add to their games - which will particularly help with people who are trying to transition from Unity to Unreal.
- Arwill 9y agoUE3 had UnrealScript, a VM based scripting language, similar to Java or C#. It is odd, that Epic removed it in UE4, and now someone makes it as plugin.
- SXX 9y agoThere was one good podcast (that sadly not in English with) Nick Atamas (senior engine programmer in Epic). They had serious reason to not provide any official scripting support in UE4. Basically there no single language and runtime that would work well across all platforms: between Python, Node.js, Mono none of them work on every platform Epic target. Some don't have good support for consoles and other for mobile platforms and maintaining fork is hard even for Epic. So instead they try to extend blueprints instead since for them there are no such problems with C++.
- throwaway2048 9y agoDon't make comments like this https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- thehardsphere 9y agoWhat's wrong with the comment? I think you're assuming that it is disparaging when the person is simply asking why this is interesting.
- protomyth 9y agoIs there something wrong since it seems to be missing and a lot of the links don't work?
- paste0x78 9y agoYou will need source access to Unreal Engine on GitHub to get access to the MonoUE fork.
- ivanbakel 9y agoA good thing. The C# bindings for Unity are great for scripting - the language is surprisingly suited to lightweight logic. This should be a nice gift to developers not yet familiar with C++.
- garaetjjte 9y agoFor 'lightweight logic' maybe, but using GCed language for almost all logic executing every frame is bad idea.
- BoorishBears 9y agoC# has value types, it takes some careful coding to avoid GC stutters, but imo not nearly as careful as C++
- thehardsphere 9y agoUh, what? C++ doesn’t have garbage collection. Did I misread this comment?
- com2kid 9y agoStill possible to have huge deallocations in C++. On top of that, C++ makes it possible to fragment memory, whereas .NET's GC can compact references. In both languages you have to be conscientious of types of allocations.
- MaulingMonkey 9y agoI've had to deal with "huge" deallocations causing stuttering before - by e.g. deferring deallocation over several frames. Deferred deallocation is also occasionally important for working around use-after-free bugs in middleware or system APIs that you don't have the source code to. Building and using the tools to track down and break up circular references, dangling pointers, leaks, visualize memory fragmentation, etc. has eaten up a lot of my time. I've considered attempting to write what would amount to a compacting GC in a C++ codebase to deal with memory fragmentation issues before - but retrofitting such a beast into an existing codebase was a huge enough undertaking, that we went for other simpler half measures instead. Being unable to control some middleware and system allocations meant any such GC would involve half measures and hacks as well anyways.
- Nelkins 9y agoThe lead for this project[1] recently gave a great talk[2] at .NET Fringe on some of the interesting things coming up for Mono. Definitely worth a watch. [1] https://github.com/mhutch https://github.com/mhutch [2] https://www.youtube.com/watch?v=uxzS-grpN4c https://www.youtube.com/watch?v=uxzS-grpN4c
- Nelkins 9y agoHmm...looks like the repo is not available?[1] [1] https://github.com/mono-ue/UnrealEngine https://github.com/mono-ue/UnrealEngine
- squeeeeeeeeeee 9y agoIt's forked from EpicGames/UnrealEngine, you have to be logged in and have access. https://www.unrealengine.com/ue4-on-github https://www.unrealengine.com/ue4-on-github
- deleted 9y ago[deleted]
- TazeTSchnitzel 9y agoC# is Unity's main programming language, now there's this for Unreal, and Godot 3.0 will also have C# support. Is C# becoming the lingua franca of modern game engines?
- chupasaurus 9y agoNope. This project is using patched engine and easily could be in the same position as present Linux support (which is "Builds for, not working well").
- b0rsuk 9y agoSounds suspiciously like Embrace, Extend...
- clock_tower 9y agoMicrosoft's sponsoring Mono now, and they've always been pretty benevolent towards game companies, especially with how seriously they take backwards compatibility. I wouldn't worry too much, at least not at this point.
- thehardsphere 9y agoI would certainly hope not. C# implementations are terrible for lots of games on not-Windows. The version of Mono that has been included with Unity is particularly bad with respect to stop-the-world garbage collection pauses.
- hacker_9 9y agoPros: 1. The GC provides a huge time-saving net over a ton of possible memory errors. Not to mention the code is so much easier to read when you aren't having to deal with memory on every line. 2. The debugging experience is brilliant - because there is always metadata available, you can literally inspect everything. 3. Compilation time is super fast. 4. Code samples are available for pretty much everything. And when there aren't, you can always interop into C++ or whatever else. Cons: People unfamiliar with the language forget about the GC and let it do all their dirty work. They then get angry when it bites back because of all the allocations they are doing each frame. The answer is to use pooling, and structure your code in a way that works with the GC (not against it), and all these problems go away.
- org3432 9y agoWould be interesting if the author could comment on the memory footprint and performance of having an additional GC'ed language running alongside the engine. It seems like it could lead to complex hitching issues.
- laythea 9y agoI can guess: Too many cooks, spoil the broth! :)
- Drakim 9y agoWouldn't it be roughly like when games embed Lua?
- org3432 9y agoI think the difference would be that UE is used more in AAA games that have high performance requirements, which can be non-trival. You can see an example of troubleshooting lock hitches using a 3rd party tool to get an idea of the complexity. https://www.youtube.com/watch?v=RE04LQffZfs https://www.youtube.com/watch?v=RE04LQffZfs
- 0xFFC 9y agoA little bit unrelated, but serious question. Mono and .net core are not going to converge? I mean that would be awesome. Since most of game developers nagging about Mono's bad performance
- tracker1 9y agoThey're not strictly converging, but there is ever increasing code reuse where it makes sense. Mono supports a lot more in the box than .Net Core currently does. I could see a point where .Net Core covers as much as Mono does within reason, and the rest of Mono eventually becomes separate packages in Nuget. But wouldn't expect that in under 3-5 years. Just an observer from the sidelines.
- markatkinson 9y agoBeen waiting a long while for this. Super keen to get stuck in. Huge thanks to the whole team.