• NOW LIVE! Into the Woods--new character species, eerie monsters, and haunting villains to populate the woodlands of your D&D games.

Developing a cross platform program, what to use?

Cergorach

The Laughing One
I'm thinking of making a RPG tool that's cross platform and is released under the GNU GPL.

I've not programmed in any language (except php) for some time, but i've (some) experience with over a dozen languages, but my skills have been in disuse for so long that i'll need to read up on everything, so i have no specific preference for any progamming language (just as long as it allows me to do the above).

APIs like wxWidgets http:\\www.wxwindows.org looks interesting, any particular reason why not to use it? Folks keep complaining that PCgen is slow because it's written in java, is that a valid reason why not to choose for java?

I've spent a long time browsing the net, but i get swamped by all the options and shortcuts to choose from...
 

log in or register to remove this ad

Cergorach said:
I'm thinking of making a RPG tool that's cross platform and is released under the GNU GPL.

I've not programmed in any language (except php) for some time, but i've (some) experience with over a dozen languages, but my skills have been in disuse for so long that i'll need to read up on everything, so i have no specific preference for any progamming language (just as long as it allows me to do the above).

APIs like wxWidgets http:\\www.wxwindows.org looks interesting, any particular reason why not to use it? Folks keep complaining that PCgen is slow because it's written in java, is that a valid reason why not to choose for java?

I've spent a long time browsing the net, but i get swamped by all the options and shortcuts to choose from...

It's really a question of use and preference. Here's my take.

If it's an online app, stick with Perl (or Embedded Perl), PHP, Java/JSP or python. Each of these is very good and widely supported. I'm more comfortable with Perl, so that's what I use. Stay away from anything requiring more than basic Javascript for your interface, though, as browser version vagrancies can be a real PITA (from personal experience).

If it's offline and you want it to be portable, stay away from Microsoft's MFC, Visual Basic or .NET. If you use it, you guarantee it will only be used on Windows, or with some kind of emulator or virtual PC on other platforms. I find that distasteful.

I prefer C++ over C, simply because it's easier to structure. And the choice of wxWidgets (the new name for wxWindows) is spot on. You will allow your app to be compiled on Win32, UNIX, and Mac.

The impression that Java is slow is just that: an impression. Properly coded Java will perform similarly to C++. PCGen's problem is its history and code bloat. They are working hard to fix that, but it's a ways off. I personally dislike Java, however, because of the requirement of having a VM installed. It's perfectly fine for online apps as a back end (JSP) or for more elaborate GUI controls.

So I would go with C++ and wxWidgets.

My turkish $0.02, and hopefully this won't degenerate into a religious debate over which language is best.

Andargor
 

It depends on what you mean by "cross-platform", but for Mac/Windows cross-over, depending on your application's nature, you might find Konfabulator to be right up your alley. It does make the cross-platform thing a breeze. It's a javascript runtime that lets you build simple applications. I used it to create my StatBlockPaster application, which runs on both Windows and Macintosh. There's a version of each posted in this forum

Windows: http://www.enworld.org/forums/showthread.php?t=112956

Mac: http://www.enworld.org/forums/showthread.php?t=106927

With respect to more general cross-platform (including Linux), I'm not so sure. It depends on what you want to build. You could easily build an online application in PHP if you've got somewhere to host it. I hear very good things about Python, but I'm not sure what the cross-platform issues are.

And no, PCGen's spectacularly bad performance has nothing to do with the language it's written in. It has to do with the application's design. You can write perfectly speedy applications in Java, no question.

My recommendations are -- if your application is simple and you're only concerned with Mac/Windows, go with Konfabulator. If your application is more complex, start investigating Python -- everything I've heard says it's easy to work with and it should enable cross-platform functionality. Though I'm not 100% on that.

I'm not an experienced programmer, however, so wiser voices may offer differing opinions. They usually do.
 


The Mono project (http://www.go-mono.org) has a pretty nearly complete open source implementation of the 1.1 .NET framework and a C# compiler (the Visual Basic compiler isn't as far along, but you can always compile things with Microsoft's compilers and run the .NET binaries via Mono). They've got binaries for Linux, OSX, and I think a few BSDs.

My opinion is that cross-platform development is a waste of time. 90% of desktop users run Windows, and 90% of the rest run Macs. Other platforms are irrelevant (and the Mac is only marginally relevant). And if a Mac app looks like a Windows app, or a Windows app looks like a Mac app, no one will use it. You'll get a lot more users by building a great Windows app than a mediocre (or even good) cross-platform app.

For server-based applications (typically web apps these days), you presumably control your server, so it doesn't matter what you write things in. So use what you know and like.
 

barsoomcore said:
Listen to Andargor. And I know this much: you won't be sorry you learned C++.

I don't want to drop too far into religious wars here, but developing a small desktop application (and any desktop-based RPG tool is going to be small) in a language without automatic memory management (usually garbage collection, though pre-.NET Visual Basic used reference counting) is almost certainly more trouble than it's worth. And doing a lot of text processing in a language without a native regular expression library and a poor native string library (and any RPG tool will be doing a lot of text processing) is also a bad idea; going with any .NET language, Java, or Python will make things much easier for you.
 

Two points:

The question under discussion is what are viable cross-platform development environments, not is cross-platform development itself viable.

Since Cregorach hasn't given any details about what his tool is like, or what his priorities are, it's impossible to say that any given toolset is de facto better than others. This thread's usefulness will be in inverse proportion to the degree to which people indulge in religious wars.
 

There are many, many options available to you.

Given your history with scripting already, a language like Python shouldn't be difficult for you to learn. It is cross-platform by nature, and there is a port of wxWidgets for Python to do GUI stuff (wxPython). For a lot of RPG-centric tools, this should be sufficient, and your development time will be speedy.

You could also go with C++, learning C or C++ will do a lot of good in the long run. It's still the most popular language used, and that isn't likely to change for years. Developing cross-platform is easy this way too, using something like, as you mentioned, wxWidgets will make porting software almost a trivial matter. There is also a great compiler, MinGW, a port of GCC to Windows, that anyone can use for free. The IDE I use with MinGW is Dev-C++. I highly recommend this learning path, since it really opens up your possibilities for future projects despite the learning curve.

Personally I would stay away from Java. Yes, well-coded Java programs are not "slow" as the popular assumption holds, but one thing you can't get around is the startup time for a Java program, which *will* be slower than something like C++ no matter how you go about it.
 

Thanks guys, sorry for not being more clear.

Cross-platform: any windows variant (possibly including CE), MAC OS, Unix (and variants, such as Linux).

For website/web-based development i'll use php with a little java, it does what i want and i know how to use it. The RPG tool i want to make would eventually be a cross between PCgen and OpenRPG, but initially it would be a very basic character generator that is not RPG-system specific. Rules and rulesdata will be stored in xml files and depending on what the xml file says the character generator configures to. My first and biggest head ache is defining a system that explains how a particular RPG works and putting that in a xml file in such a way that a program can interpret that. The second headache will be the user interface, there are a lot of folks that don't like PCGen because it's so 'full', making a flexible user interface is my second objective. Maybe it would could use a seperate xml file that configures the user interface...

Most users will probably be windows users that know very little about computers, so installing seperate programs to make the core program work isn't a good idea, that's why i have a problem with using java. On the other hand using C++ usually means i have to do a lot of thing from the ground up (such as memory management), things that are probably interesting, are not why i want to build the application. Python sounds interesting because it handles a lot of 'basic' stuff for you, while it leaves me to concentrate on the important things (like how to make my program do what i want it to). Speedy development is what i want, but down the road (years from now) i might want to try my hand in 3d game development and C++ would probably be more usefull then (but Ogre and Crystal Space also seem to benefit from Python knowledge), but would the investment now (and the slower development time) justify what i might (possilbly) do in five or ten years?

I'm not afraid to use/reuse code from others, as long as it's OSS. I'm not someone that wants to make another RPG tool because it needs to be mine, i want to make another RPG tool because what's out there doesn't serve my needs or isn't OSS.

ps. don't expect a program to popup overnight, i'm a slow programmer...
 

drothgery said:
My opinion is that cross-platform development is a waste of time. 90% of desktop users run Windows, and 90% of the rest run Macs. Other platforms are irrelevant (and the Mac is only marginally relevant). And if a Mac app looks like a Windows app, or a Windows app looks like a Mac app, no one will use it. You'll get a lot more users by building a great Windows app than a mediocre (or even good) cross-platform app.
Although your right that probably 90% of the desktop users use windows, but that other 10% is probably a lot more important then you think. As i want to make the program OSS, it's possible (and desireable) that down the road others will work on the program as well. Folks that are good programmers and are willing to work on an OSS program will most often have an idiological preference for OSS, an OSS OS will most often mean a Linux variant is prefered and windows is only used if there are no other options. So while most of the users will be Windows users, a lot of potential developers will use another OS. Mac OS might be a small group of users, but it's a vocal one, and a vocal group is always welcome ;-)

I'm currently trying to migrate from Windows XP to Linux (which will take a long while), my little brother is getting himself a powerbook as his main computer, and both of us have to deal with windows environments at work. So as you see, doing anything besides cross-platform is pretty much out of the question...

I'm trying to make a great application and be cross-platform at the same time, probably more work, but it's worth it imho in the long run (especially when the Linux user group is expanding ).
 

Into the Woods

Remove ads

Top