• 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?

"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."

Very easy to say, not at all easy to do. This is going to be a very ambitious project. I encourage you to code what you like, but also keep in mind that, the more complex and ambitious the project is, the more likely you will get burnt out or find it too overwhelming, which likely could cause you to just abandon it all together. I would start smaller if I were you.

Might I suggest starting smaller, perhaps with a multi-user map program, somewhat like a whitebaord that the DM can control by drawing basic maps and/or loading pre-created map images, and the players can move their tokens around for combats, dungeons, etc. Players and Dms can organize and play their games through instant messaging programs or IRC, and use the program to visualize the environments.

True, other open-source programs (namely OpenRPG) have similar features, but the turnoff is that they require the user to install additional software for them to work (OpenRPG alone requires both Python and wxPython to be installed just to run it) A craftier and more user-friendly way would be to include all that your program needs right in the installer, and leave out all the bits that it DOESN'T need. Thanks to tools like py2exe, this wouldn't be hard to do at all. It's too bad the OpenRPG folks don't do something like that.

Then, once it is reasonably complete, you could expand it to include built-in chat, dice rolling, and eventually, character generation.

Breaking your idea up into smaller goals will make things easier and you'll have something to show for your efforts much faster.


More on Python: While it is still in the talking stages, there are plans for a "real" compiler for Python. It's very possible, only it will take more time for Python to evolve to that point. I think it is planned for Python 3.0 (the next major release following the recent 2.4) As it stands now, Python is an interpreted language, and so isn't well-suited for process intensive tasks like full 3D games, but the introduction of a compiler to convert Python code to machine code would remedy this. Essentially, it would allow Python programs to run/launch as fast (if not faster) than those coded in C++, plus the development time would be dramatically lower. If you decide to go with Python now, you have this to look forward to in the near future. Game development in Python, which already is thriving and growing, will then become an easy choice for newbies and pros alike.

Something to consider.

Anyway, I'm a big supporter of Python, but C++ is still the better choice if you are willing to spend the time it takes to learn it proficiently. I just wanted to show that choosing to learn Python could pay of bigger than you may have thought. There's nothing to say you can't learn multiple languages either. Once you master one language, the others will be easier to grasp (especially if they are similar, and Python is similar to C in many ways)
 
Last edited:

log in or register to remove this ad

Seriously, why bother with the hassle?

When it comes down to it, code what you want and how you want to do it because when it comes down to it, thats all you will have. I would listen to Zulithe's comments vert closely, start with a dice roller, then make it work and display over a network. I have spent the past 5 weeks just getting stat blocks right and been coding since september so let me tell you, this is no picnic. Not that I or myself are trying to talk you out of doing anything, more just to understand the vast world you are entering. I know from my NPC Designer, I code for atleast 6 hours pretty much everyday and I have trouble getting 2 different people to take a look at things. So it better be something you are having fun doing and doing for yourself.

In case you missed it, most of all have fun.
 

Cergorach, IMO these guys are giving you good advice.

Cergorach said:
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...

Um... 'Cergorach' wouldn't happen to be dutch for 'Heracles', would it? ;)

Don't get me wrong, what you're trying to do is possible even though the task is a monumental challenge. If you succeed the next four generations of gamers will know your name.

I'm happy to see so many people recommend Python! :D I would use Python and wxWidgets if I were to undertake a project like this. Ruby would be my second choice. Since you already know PHP, you would learn Ruby faster than Python.

C++ or Java? Now you need a team, and that team will need more than one Heracles on it. :)

Good luck man! I look forward to using your program.

Sam
 

*chuckles*
Heracles huh! Close, but it's the name of the Laughing One (or Laughing god), some might recognize the reference...

My first objective is to create a system that seperates the game system from the actual program, this is the biggest hurdle imho. While i can get non RPGers to program dice rollers, GUIs, or communication protocols, i can't get folks that don't play RPGs to understand how they work without explaining it to them.

I'll also have to write a project proposal/manual, but this is good practice, as i also have to start doing this at work. This would eventually be huge, but i'll start small, a dice roller is a good idea ( i don't need network capabilities for a while), from there i could start with something as simple as 'attribute' generation for different systems...

As for an eventual 'team', i was thinking of approaching schools that have programming courses, maybe i can motivate some students to help 'build' the program as school projects, maybe i can even motivate some teachers. It's always neater on your resume if you have programming experience that goes beyond school bound projects (i programmed an advanced 'Hello World' program at school vs. i was a programmer on the RPG Tool project, for more info see the following site).

Python is starting to sound better and better, Ruby is interesting, but there seems to be more support available for python. If Python does suffice it can always be extended through c++...

Let's say i would go with Python and WxWidgets, any advice (besides reading the manual)? Maybe some usefull OSS RPG programs/dicerollers/whatever written in Python that i can take a look at (the smaller, the better, that way i won't get burried under all that code). I'm one that learns fastest by looking at a small program, changing something and seeing what it does (i love big red buttons that don't have any known application, friends call me a big kender)...
 

I hate to be the one throwing cold water on your ambitions here, but you've got some incompatible goals.

You can't have rapid development and quality multi-platform development at the same time; quality multi-platform development (where the idiosynracies of individual platforms are catered to, not brushed over) is hard, slow, and not something that inexperienced programmers (or even seasoned professionals) should attempt lightly. Cross-platform toolkits can make it easier to build things that run on multiple platforms, and even run with acceptable performance (which is relatively new; ten years ago, when I was a CS student instead of a professional programmer, the thought of getting acceptable performance with a cross-platform GUI would have been amusing; also, ten years ago I liked C++, whereas now I wouldn't touch it with a ten-foot pole). But at the end of the day, you'll still end up with something that feels like a Mac app on Windows, or a Windows app on Linux.

You can't use the best tools for a project of this type (C#/VB.NET or Java; Python would be capable, but the available IDEs just aren't anywhere near as good and they're just not as a widely used, so finding example code is more difficult) and build something that will be embraced by the mainline OSS community, which has almost no significant projects written in something other than C (Mozilla is in C++, and there a few others, but most of the big OSS projects are written in C).

You'll absolutely want
1) Automatic memory management, because there's nothing more frustrating in programming than tracking down pointer errors, and in any modern language (which is to say pretty much anything except C or C++) you don't have to.

2) Strong standard networking libraries. Low-level networking code is messy. Don't write it if you don't have to.

3) Strong standard XML libraries. Doing XML processing right is a black art; let someone else do the work of getting it right.

4) Strong standard string libraries. Anything with a lot of user interaction does a ton of text processing.

5) Strong standard GUI libraries, for obvious reasons.

... and that's going to restrict your choices pretty quickly.
 

While your right that i can't have everything on a platter, but i can try ;-)

Python is being very actively developed and to be honest i would be happy if i got a working prototype of the rules interpertation in the beginning of 2006, that's a year down the road for improvement on issues that don't directly affect the character generator.

While typing things out and you guys throwing things out like cold water and advice, i am starting to get a better feel for what i want to do or need to do. I think that currently rapid development is more important then anythinhg else, it's also important that it works on multiple platforms, that it not feels like a native program is currently less important, as are network features. When i get a prototype working in for example Python, i can always decide to move to a different language. For now programming isn't the biggest problem, but making a structure that seperates rules from a program is, not to mention making a system that is flexible enough to handle just about any RPG system...

Btw, while looking at Python i found that while it's cross-platform, it also allows to use OS dependant libraries and functions. That would make it possible to make the 'engine' work on all platforms, but also to make platform specific options...
 

Cergorach said:
My first objective is to create a system that seperates the game system from the actual program, this is the biggest hurdle imho.

I wholly agree with this approach, and it has been my opinion for a long time that PCGen has not leveraged this. The data is mixed in with scripting which depends on code, so any changes in data have a great probability of breaking backward compatibility, even with recent minor versions.

Don't get me wrong, the PCGen people are working hard to make the program stable, and I don't want to seem to disparage that.

I've myself taken a stab at this approach, and other people as well. You may want to look at their work for ideas.

You may want to take a look at Vascant's effort in this thread. What he's building is an NPC generator, but there may be ideas you can reuse. I don't know if he makes the source code available, but you can always ask.

Frugal has attempted a Java version of a Universal Character Generator (UCG) that implements an engine-data separation approach, and it is very promising. It uses XML as data and for processing directives. His code is available in the PCGen-XML yahoo group, here. You may have to subscribe to the group (free). The code is in the Files section, and is called charactergen-0.0.2.zip. He has a CVS set up here. I can give you his email address, just contact me at andargor@yahoo.com.

For myself, I have a small demo of a C++ application using XML to load game system data here. It just generates a 25th level Barbarian, and it includes the SRD system definitions in XML.

It's a combination of C++, LibXML, and SpiderMonkey (Mozilla's Javascript engine). I know I warned you about Javascript, but that's because of the different ways browsers implement it. For offline use, it's great. What I use it for is to allow user scripting using a recognized language. This allows the game system to be defined outside of the C++ engine, and allows users to add custom content or other "modules".

I heven't worked on my engine in quite a while, time being at a premium these days. :)

HTH,

Andargor

EDIT: I forgot to add that there are commercial products as well that use XML data, like Twin Rose's CSX. But of course, sources are not available.
 
Last edited:

I will be the first to say, to get everything to work outside the Core engine is a complete pain. I think at this point I have achieved 95% of data and issues being done in script or data files beyond the Core. I kind of laugh now when I think back to September and got the initial stat blocks working in under a week and then had this wild idea.

Something to think about, you like a few others have expressed a desire to handle multiple gaming systems. Keep this in mind, no one had gotten handling 1 gaming systsem perfect yet, so ask yourself.. perhaps this should be a hope for later versions and not an initial goal.

Multi-platform: You have your reasons why and those I will not debate but understand "switching languages" at a later time should not be a back up plan. Do the research now before coding a single line and take your first step in the right direction. I will say this, most applications, especially commercial ones, have one in common, slow. I know for my own application I have had to use inline asm for handling arrays, strings and a few other bottlenecks.

Please do not think I am ripping to pieces your idea because I am not, just trying to express my own experience that I have learned. It has taken me 4 months to get NPC Generation near perfect and I have not even really started to see how far I can push things. I also work on this project everyday for a few hours, sometimes as many as twelve.

I will say this, succeed and the rewards are there. Not so much money wise but I can this from the rewards I have with my own project.
 

Although primarily for web stuff, PHP can be run from the command line and you can develop applications in PHP that will never really be run "online".

There are many books on the subject.

Seeing as though you want to go further to an OpenRPG style thing later, I would go with PHP from the start. Why?

Simply put it has everything inbuilt already.

- Need multi-user interaction on the same application? Sessions + standard Internet
- Distribution? Needs only one server running PHP, everyone just connects to it.

Having been a developer on client/server applications most of my life, the biggest pain in the rear about compiled software (the UI part of the projects) was that it had to be installed on all the client machines. You find a single error, you have to deploy that update to 100s of machines.

With PHP however you just make the change on the server and VOILA! Instant update to an infinite number of people. It is so much easier to manage, especially if you want users to be able to dive right in.
 

The e-tools crowd (www.codemonkeypublishing.com) are developing a follow-on which is cross platform, using C++, the Qt toolkit and SQLlite for the database. I guess you could substitute a number of languages for C++ there (python is probably your best bet).

The fact that a commercial product is going down this route should indicate the demand for cross-platform and non-windows in the RPG market. Neverwinter Nights also was developed for Windows, Linux and Mac - the market's an unusual demographic, more technical than average.

I haven't used Qt (I'm more involved in Java these days) but by reputation it's a relatively easy environment for developing user interfaces and definitely does run multi-platform. Another alternative is Java with SWT, which also gives you a native look and feel on different platforms.
 

Into the Woods

Remove ads

Top