Clojure-CLR and Mono for Unreal Engine

1,060 views
Skip to first unread message

Raju Bitter

unread,
Nov 26, 2014, 8:05:27 PM11/26/14
to cloju...@googlegroups.com
Some of you might have heard/read about Mono for Unreal, a project to support C# based development for the Unreal engine:

On the roadmap the project owners mention F# support as well, how difficult would it be to run a Clojure-CLR REPL inside the C# project connecting to the Unreal engine? They support .NET framework APIs up to version 4.5.

How much work would it be to get the Clojure-CRL REPL running with Unreal? Since Mono for Unreal uses a much more modern version of the .NET framework many of the problems the Arcadia folks had with getting the Clojure-CLR to play with Unity3d and Mono might not exists.

I'll have some time next week to play around with Mono for Unreal, but if could provide me answers to the following questions, it would be really helpful:

1) What does it take to get a Clojure-CLR REPL running inside a C# application? Do you have some example code?
2) Which version of Clojure-CLR should be used?
3) Has anyone else tried to connect Clojure to Mono for Unreal?

An open question is how Clojure would fit into the development approach with Mono for Unreal, since the development approach is to use Xamarin Studio and then extend one of the Unreal Engine API classes like the Actor class:

I guess there should be a wrapper around the Unreal APIs written in C# or Clojure.

- Raju

Adam Hill

unread,
Dec 4, 2014, 11:50:52 PM12/4/14
to cloju...@googlegroups.com
Ramsey Nassar (@ra) and Tims Gardner (@timsgardner) have a Clojure REPL working in Unity3D under Mono.

Checkout their project on Github and their videos that explains what they did to get it working.



Elliot Bulmer

unread,
Dec 11, 2014, 3:40:15 AM12/11/14
to cloju...@googlegroups.com
I've been looking into this today. One problem I have come across is that the embedded mono version is "mobile" which I think roughly corresponds to v2.0:


I suspect that you would need to get ClojureCLR to compile against this version of Mono to be able to be loaded by the runtime inside UE4.

Jacob Goodson

unread,
Dec 30, 2014, 2:46:44 PM12/30/14
to cloju...@googlegroups.com
This looks exciting, unreal is better than unity imo.

Tims Gardner

unread,
Jan 1, 2015, 5:18:57 PM1/1/15
to Jacob Goodson, cloju...@googlegroups.com, Ramsey Nasser
Clojure in Unreal is a very interesting question. We (the Arcadia folks) have looked at it a bit, and may well do an Unreal version of Arcadia if it seems feasible. Unreal is notable for its beautiful 3D graphics, and was used to make a number of games I'm quite fond of personally, such as Naissance and The Vanishing of Ethan Carter. Xamarin's hack of Mono into Unreal has the advantage of a more up-to-date VM and compiler than Unity's, though Unity may upgrade theirs. Presumably a solid port of modern Mono to Unreal, their main competitor, would put more pressure on Unity to do so.

There are a number of drawbacks to Unreal as a Clojure target, however.

1) The stability of Xamarin's integration of Mono is yet to be determined. At the moment it involves an unofficial patch to a particular version of Unreal, and is hopefully under active development. A port of Clojure would therefore have to maintain compatibility with a potentially fast-moving Mono port, which in turn needs to keep up with Unreal's undetermined machinations. It may make sense to let the Mono-UE project mature a bit before targeting it for a major language port.

2) Unity's model and API is amenable to Clojure in a way Unreal's doesn't seem to be. This isn't surprising, since Unreal was designed for C++ and Unity for C#. Unity places very heavy emphasis on representing the scene graph as serializable data, which lends itself naturally to immutable modeling. Games written in Unreal, on the other hand, typically involve pointer manipulation and manual memory management and so on. Mono-UE doubtless changes some of that, but it's very new and inevitably full of kinks. With enough effort it may be possible to gracefully retrofit Unreal with Clojure idioms, but the gap to bridge is wider than for Unity. 

3) Unity boasts many years' worth of 3rd-party library development in C#, with an active marketplace for assets and code built into the UI. The ecosystem is strong enough that some people make their living selling assets and code on the Unity marketplace, all of which can be consumed directly by Clojure. The Unity marketplace, in turn, can in principle be used to distribute and sell Clojure projects. This greatly increases the possibility of a serious culture of game development in Clojure, and suggests a new source of revenue for Clojure programmers generally. Anything like that is probably years off for Unreal.

That said, Unreal is a fascinating engine used to make some beautiful games, and it remains a very tempting target. We want to take a deeper look at it as soon as time allows. Right now we're focussing on getting a more stable and much better documented release of Arcadia (Unity) together, about which more soon.

- Tims Gardner

--
You received this message because you are subscribed to the Google Groups "clojure-clr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-clr...@googlegroups.com.
To post to this group, send email to cloju...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojure-clr.
For more options, visit https://groups.google.com/d/optout.

Jacob Goodson

unread,
Jan 3, 2015, 12:24:15 AM1/3/15
to cloju...@googlegroups.com, submissio...@gmx.com, r...@nas.sr
Nice, thanks for the info!  I was wondering something, are you guys also thinking about vsClojure as an IDE for unity game dev?
Reply all
Reply to author
Forward
0 new messages