Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   What language? (http://www.topmudsites.com/forums/showthread.php?t=387)

Aeran 04-23-2007 05:59 PM


Mabus 04-24-2007 05:47 AM

There are advantages and disadvantages to each language.

My advice?
1) Unless you are coding the game as a means of learning a specific language pick the language you are most familiar and comfortable with.
2) Plan the features and systems of the game before you even code one system, then pick the language that will make the systems you have designed easiest to code and modify.

Best of luck no matter which language you choose.

cappen 04-24-2007 11:45 AM

I would suggest looking at what other people have used. I found this webpage which gives a nice list, as a start.


Having said that, I personally like dynamic languages such as Ruby, Lua and Python.
I think they make the development a lot quicker, although come at the cost of some resources... As a result you will see results from your programming more quickly.

(And since I think the largest reason to abandon a project is a lack of seeing results, it might help to actually finish it. )
But all that depends on the reasons that you have to create an engine.

Kylotan 04-25-2007 05:40 AM

Yes, there really is little reason to start a project in 2007 using C++, C#, or Java when more effective languages exist. Unless you need the extra performance - which you almost certainly don't - go for Python or Ruby.

KaVir 04-25-2007 06:14 AM

If you're renting server space, the performance of the mud can make a big difference in terms of hosting costs.

Some of the newer muds seem to be taking a hybrid approach - for example is written in C but uses Python for scripting.

Aeran 04-25-2007 06:58 AM

After having pondered on this I have decided to use C# for the MUD. That gives benefit of fast running speed with the JIT compiler, and "easier" memory management than in C/C++.

Zhiroc 04-26-2007 10:23 AM

I'd personally look for a language that doesn't tie you down to a platform. AFAIK C# is Windows-only, and most MUD/MUSH hosts are Linux-based these days.

I looked into Ruby once, and was disappointed to see that it didn't support native threads, meaning that it couldn't take advantage of multi-CPU systems.

From an ease of implementation viewpoint, I'd go Java, but from a performance standpoint, either C++ or C. The latter would make it easier to imbed a scripting language like Ruby, Lua, Perl, or what have you.

Aeran 04-26-2007 10:41 AM

You can run many C# applications in Linux using .

Kylotan 04-27-2007 10:15 AM

Yet the difference in performance is unlikely to manifest itself unless you're doing something spectacularly different. The main benefit of Python is that it does a lot of the hard tasks for you, and it does that by providing libraries for them, which are implemented in C anyway.

It's also hard to see which operations would need to be in C instead of in Python in a dual approach. Well over 95% of mud code I've seen is essentially text handling or networking. Python handles both of those as quickly as all but the best C code. Anybody asking which language they should use will not be emitting such code. (No disrespect to the original poster.)

I think worrying about performance for a new text and networking game to the extent of changing the language you use is very premature optimisation.

KaVir 04-27-2007 04:11 PM

I've not used Python myself, so I tried doing some searches for benchmarks:



It showed interpretted Python being as much as 60 times slower than C++, and even the Psyco-compiled version was several times slower. Even places like python.org suggest using other languages such as C++ or Java for the performance-critical parts of the application.

I can certainly see Python's value as a scripting language, but writing a mud entirely in Python would seem to result in considerably worse performance than C++. Speaking as someone who had to spend a lot of time rewriting and optimising C++ code, after initially approaching my mud project with a "premature optimisation is evil" mindset, I can assure you that lots of apparently insignicant performance issues can really start to add up over the years.

I can't help but disagree - choosing the language is precisely the time when you should take into account potential performance issues (i.e., pick the right tool for the job). It's really not the sort of thing you want to discover two years down the line, when your code has become so slow that it requires a dedicated server you're not willing to invest in.


All times are GMT -4. The time now is 07:49 PM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022