Best Language for Cross-Platform Content Pipeline

Started by
18 comments, last by Mike.Popoloski 11 years, 3 months ago

I'd like to make a content pipeline for some of my games/engines/etc I'm working on, and I'm not quite sure what would be the best language to use. I'm using C++ for the actual runtime, but this seems very unproductive for tools. I've seen C# recommended several times for Windows-only content pipelines, but I'd like to know if there's anything more cross-platform.

Here are some features that an ideal language would provide:

  • It also should provide some abstraction of OS-specific functionality such as directory iteration, etc. It should also be easy to use high-level features such as regular expressions and other text-manipulation techniques.
  • Integrating this language with Lua should be simple, as I want to use Lua as a data-description language for several resource types.
  • Calling external processes shouldn't be too hard -- for example, I might want to use the Cg toolkit's cgc program to compile shaders.

I suppose C++ could work if I used heaps of boost libraries -- this does seem a bit cumbersome though, and I imagine it would cause a large hit on compile times.

Anyone have any suggestions for a good language to use?

Advertisement
C# works fine cross platform.

C# requires very heavy weight dependencies, .NET on Windows, and Mono on everything else. You are looking at increasing your install process upwards of a gigabyte or more. Although it is possible to use C# on non windows systems I wouldn't really call it a practical solution. There is always Java but my personal opinion is that this can cause some slight lag in the loading process (traditionally Java performs a bit slower than C++ due to the interpreter that must intercept and parse the byte code). If you are using lightweight graphics and don't mind adding a few extra seconds to your loading screens I would recommend java. If performance is critical your a little stuck with C++.

Dan Mayor

Professional Programmer & Hobbyist Game Developer

Seeking team for indie development opportunities, see my classifieds post

If you're just making offline tools and load time doesn't matter use Java or C#. If youre going to be using it in game, suck it up and C++ your way trough it.

Out of raw curiosity, why do you need cross-platform tools?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

I use C# for that -- the huge standard library does all your directory/text/regex stuff, LuaInterface makes integrating with Lua amazingly simple (I use Lua to describe a lot of my input data), and calling external compilers, etc is easy.

I don't need it to be x-platform, as a lot of our other tools are Windows-only anyway. We compile resources for all platforms from a Windows development PC.
However Mono does make it portable if you need that, and the Mono/.NET runtime dependency doesnt bother me because only my devs need it, not my players/customers.

Thanks for the responses!

If you're just making offline tools and load time doesn't matter use Java or C#. If youre going to be using it in game, suck it up and C++ your way trough it.

Yes, I'm just making offline tools, so as you say, load time isn't too important. I don't like Java much, but I'm interested in the possibility of using C# as a cross-platform language.

Out of raw curiosity, why do you need cross-platform tools?

Mostly because I don't have a PC. Also I just think it's theoretically a bit nicer.

I use C# for that -- the huge standard library does all your directory/text/regex stuff, LuaInterface makes integrating with Lua amazingly simple (I use Lua to describe a lot of my input data), and calling external compilers, etc is easy.

Wow, that stuff looks great; I'm quite intrigued by the idea of using C# now.

However Mono does make it portable if you need that, and the Mono/.NET runtime dependency doesnt bother me because only my devs need it, not my players/customers.

Okay, I'll look into Mono.

There's still a major difference between "I need this to work on {some platform besides Windows}" and "I need this to be cross-platform."

I assume you mean you run a Mac, or maybe even a Linux machine; in which case C# is still totally viable if you target Mono from day one. The only real limiter to using C# in a cross-platform setting is quirks between .NET and Mono, and those are rapidly diminishing these days anyhow.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Yes, what I meant is that I use a Mac. I'm not sure what you mean by your first sentence; are you saying that I could use a Mac-specific programming language?

I had heard of Mono, but I wasn't sure how practical it was, so thanks for the input. From what you've said, using C# with Mono sounds like a good choice then.

EDIT: My line of reasoning for wanting to make it cross-platform was that most people seem to make their tools Windows-only, so if I need to support another platform, it's probably better to support Windows as well.

Whether or not you "need" to support any given platform depends entirely on who is using your tools.

If you're making tools for you, make them for you. At the risk of being overly blunt, don't waste your time on people who will never touch your software. What everyone else does with their tools is only a relevant thing to care about if you have the exact same use cases and needs as "Everyone Else" - which you probably don't.

Do what makes sense for your particular situation. If you're writing tools to produce games on a Mac, why not use the existing (and fairly robust and rich) Objective-C ecosystem?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement