I want to develop server based games via Julia.
It’s going to be awesome if you write about your honest experience and opinion.
julia_is_ideal = readline()
if julia_is_ideal == 1
print("please suggest libraries")
not for call of duty of course, just 2D games
however I expect high potential
println(" why not? ")
println(" what programming lang do u suggest for it? ")
I’ve found Julia to be super fun for developing a little game where I can live-code new game rules while my children are playing it. See: https://github.com/c42f/Gameoji
Gameoji is very much a quirky bespoke game which I doubt anybody else will play, but we’re having fun with it. Some features:
Terminal-based tile rendering of emojis (with low-res raycast visibility )
2D dungeon crawler like gameplay
“In-person” multiplayer (multiple devices with keyboards can connect, but all rendering happens on the main screen)
Change the game logic and game state interactively via RemoteREPL.jl
I highly recommend using an Entity-Component-System abstraction for your game logic; I use @louisponet’s Overseer.jl and this hugely cleaned up the game logic in my game.
I think there’s a few reasons not to use Julia for a game:
Distribution! Creating a reasonable-size game bundle for low-latency startup and distribution could be hard. If you care about game distribution you should investigate this early on (see PackageCompiler.jl and related tools).
The library ecosystem isn’t very complete (though for 2D you might be fine with the SDL bindings (maybe via GameZero.jl?) and an ECS via Overseer.jl?)
Although the ecosystem of game-specific libraries in Julia isn’t large, many of Julia’s scientific and technical computing libraries are very useful for game development. For example, Julia has various high quality libraries for geometry and image processing, many of which are very applicable to game programming.
I’ve been in the game industry for 35 years, and have been playing with Julia.
I think it’s a pretty solid language for using as a game scripting language -ie a replacement for things like LUA, C#, in-house languages, and I have integrated it into my distributed simulation engine. The ability to run at compiled code speed and easy integration with the mainstream game dev language (c++) are strong positives.
The risks I would say are GC, and big issues about load-time compilation. I think the first is maybe not such a problem, and because of the ability to do code introspection, you could define “allowed” and “not allowed” constructs in your game logic scripting. The second seems a bit problematic though, julia’s startup times for even relatively simple code packages could easily become the bottleneck in game/level startup time.
If you mean “the logic in server” and “the UI is in browser” games when you say “server-based game”, yes Julia may be a nice choice if you use a web framework to handle HTTP connections, cookies, and sessions. Genie is a good candidate for this.
Right, if a game is latency sensitive or creates a lot of garbage then GC pauses could be an issue. People have used Julia for realtime control of robots which is even more demanding, so low latency is possible. I think they had to pay a lot of attention to avoiding allocation though.
That’s basically the same problem that the main Julia audience faces with time-to-first-plot. There’s been a lot of effort put into this but there’s still no really slick solution for end users. I guess we’ll have streamlined sysimage creation at some point via the REPL and this may be less of a problem. Separate compilation has also been discussed.
Link to timestamp discussing the problems faced by robotics user (2018) with 1-millisecond cycle time:
At 37:00 he says it would be much easier to debug memory management issues if there were a macro that disallows allocations in its context, turning allocation into error. At ~39:00, Jeff responds positively to this suggestion. Is this macro possible now?
, if a game is latency sensitive or creates a lot of garbage then GC pauses could be an issue. People have used Julia for realtime control of robots which is even more demanding, so low latency is possible. I think they had to pay a lot of attention to avoiding allocation though.
Yes. For a 3d game to be viable, it’s got to get through a whole simulation+rendering loop every 10-15ms or so. For VR, you really want 8ms, and much longer will make people nauseous.
If you can architect your game to work that way, you may be able to run the Julia parts in another thread walled off from the c++ parts
Yeah, I’ve used Julia as data management & balancing tool in my previous mobile game project. Free to play game requires a lot of calculation and sometimes simulations with game data, and I think Julia is perfect for such task
I have been working on developing a general data manager tool with Julia. It’s still in the early stage, but if anyone is interested; here is the link to my package