05 Apr, 2014, Davion wrote in the 21st comment:
Votes: 0
quixadhal said:
The amount of RAM you'll save from having less code will probably outweigh any savings you'd see using that complex bit manipulation. Consider that your bash shell sucks up 20M of RAM, all by itself.

Maybe mud hosting sites charge extra because they can… I know it's not horribly expensive to just get a hosted VM these days, and do whatever you want with it. I think linode charges $20/month for 1GB of RAM, 48GB of disk, and 2TB of data transfers per month. I can't imagine any MUD using more than that, no matter how it was written.


Well, I'm not entirely able to test things yet, but I appear to have everything loading from the DB, then resetting in the world. And according to PS, the RSS is about 27.5MB. I'm doubting it'll take up much more when done as everything left is mostly just to make things function. Just past 10k lines of python. Amazing what it can do!
05 Apr, 2014, Davion wrote in the 22nd comment:
Votes: 0
I'm probably going to attack fight.c and all that. Looking to do all the do functions last! On that note! I figured I'd give this a shot :). I've posted a pastebin of act_comm.c. I've already run a bunch of stuff on it to make it more python however, it still needs the final pass. If you're bored and feel like translatin some python! Take a look. The scopes have to be pythonified (from __future__ import braces doesn't count!!). I use 4 spaces for a tab.
The if statements need pythonifying -> C if(..) and python if..:
The (!)exclamation point using to denote a false value (!IS_SET) needs to be (not IS_SET).
Switch statements need to be converted to if/elif/else or dictionary/lists.
Containers need to be converted along with any tables.
Gotta remove all the initializing of variables. Watch out for default values.
one_argument is now read_word, and returns a set of the remainder and the next word. eg. argument = one_argument(argument, arg) becomes argument,arg = read_word(argument)
All built in rom functions namings have remained the same as well as capitalization.
06 Apr, 2014, Pymeus wrote in the 23rd comment:
Votes: 0
Nathan said:
Of course. No idea why a shell should use 20MB anyway.

"It's too big and too slow." is, fittingly, the first entry under BUGS on bash's manual page.


The thing to remember with "full" VMs is that there's system software using significant memory too. (and some disk) Depending on the setup, that could include admin panels, ssh/ftp services, Apache or another web server, keeping enough free memory for daily system maintenance like backups, an RDBMS, half-a-dozen services related to mail, and whatever else.

On paper our VPS should be overkill for our mud. Our memory footprint is small for our world size (and < 15% of total available memory). But we've still spent a surprising amount of time tuning the rest of the VPS (especially memory usage) to keep things at "adequate".
06 Apr, 2014, Nathan wrote in the 24th comment:
Votes: 0
quixadhal said:
IMHO, the only people who should be spending money on hosting a MUD are serious people who already have a small player base and want to grow into a larger game. If you're reading this forum, you have a machine capable of running a MUD. Yes, even if you're reading it on your cell phone! I always encourage people to just download virtualbox (free) and setup their own VM to work on their MUD.

Most home PC's these days can easily run a VM in the background that's likely going to use very little RAM, very little disk I/O, and an almost ignorable amount of CPU. It's not as nice as having a spare machine, or an actual hosted site… but it works quite well for development, and with a small amount of effort, you can easily let a few others in to work on it with you.

THEN, once you're ready to go and maybe already have a few players, you can take your time thinking about how you want to host it for real. At that point, you've invested enough time and energy into it that spending a small amount of cash is probably worth it, and even if you don't have much to spare, odds are good you'll find a way.

I know to many, $20/month sounds expensive. I usually try to put it in perspective, which admittedly is from a USA point of view. Here, going to see a movie for 2 hours costs $10… $20 if you want a drink and popcorn. Eating lunch at most restaurants is $10, dinner being $20. A month of game time for World of Warcraft is $15. A coffee is $5. You see where I'm going with this.


Running a VM on your own machine isn't an easy or pleasant task (unless your day job is a sysadmin or something) and it's really not going to work if your primary machine is a laptop. You have to run a whole os just to run some server code. At least if the code is Python/Ruby/Java/? you can run it on Windows/Linux/Mac or whatever fits your fancy. I think you can be fairly serious about making a game without ever reaching the point of having help with it or enough players to justify paying a sizable chunk.

My point simply was that at $5-8 a month a person might be willing to stomach it for having something running without their constant attention and I can't why those services that cost around that can't allocate more memory and/or storage per person. If they run one of those servers with 16gb ram and 500gb hard drive space they can definitely accommodate 200+ games w/ 64mb of ram and close to 2gb of storage. If they could even get that many people… Frankly, with that many paid accounts at $5/month you'd be taking in $1000/month, but you do have to consider expenses, etc. If they charged $10/month they could double the amounts at half the users for 100 games w/128mb ram and 4gb storage.

I explicitly noted that one's view of expensive likely depends on whether you have a job or not, and also that the people with the most time for this sort of thing are generally the ones without full time jobs. I personally don't go to movies unless my parents take me (just because I'm in college doesn't mean I have much money or a car). And there are definitely reasons I don't play WoW – money is definitely up there.
06 Apr, 2014, Rarva.Riendf wrote in the 25th comment:
Votes: 0
>Running a VM on your own machine isn't an easy or pleasant task (unless your day job is a sysadmin or something) and it's really not going to work if your primary machine is a laptop.

Is is as easy as installing whatever os, even more so that you do not need to look for drivers. If youcan code, you can definitely install an os in a vm.
I do this to code in the same kind of OS the game run.
The only reason you do not want to do it on your personal laptop is if you actually move your laptop around, so being disconnected at times.

Running a VM on a recent computer (whatever dual core is enough to un a mud within a VM without affecting your processing power) has for only cost the ram it uses (so basically, without graphical interface, as low as 512 meg)
06 Apr, 2014, quixadhal wrote in the 26th comment:
Votes: 0
Nathan said:
Running a VM on your own machine isn't an easy or pleasant task (unless your day job is a sysadmin or something) and it's really not going to work if your primary machine is a laptop.


It's not that hard these days. You download virtualbox from Oracle and install it. They have versions for several flavors of windows, OSX, and linux. It might want you to reboot once, as it tries to install a few kernel level drivers for speed. The actual VM has very little overhead and isn't likely to even be something you'd notice unless you have things IN the VM that are chewing up resources.

Once you have it installed, you create a new VM. It's pretty simple. You tell it what OS you'll be running inside the VM (windows, linux, etc), and pick the closest match. Then you pick how much RAM you want it to be allowed to use. This can be as little as 4MB, or as much as all of your system RAM. I usually use 1GB, since my system has 8G of RAM. For a MUD in development, even 256MB should be fine. Remember, these were developed on hardware which only had 8MB total.

Then you create a virtual disk image. It's just a pretend hard drive that sits in a file on your disk. Again, for MUD stuff, I see no reason to go over 20GB. You can easily fit things in less, but if you can spare 20 you don't have to waste time being picky about what you install. I just use the default type (VDI), since I have no reason to do otherwise. If you are trying to make a VM to move to other VM software (vmware, etc), you can do so. I also let it dynamically allocate the space. It grows as needed up to the limit you specify, but never shrinks.

Once you've specified those things, you have an empty VM.

The only thing you really might want to adjust before installing your new OS is the network settings. By default, virtualbox gives you one pretend network adapter that's configured to use NAT. That lets anything inside the VM talk to the outside world as if it were your own machine (just like your modem/router does for your LAN), but there's no easy way back in. If you want to let anyone else work on your MUD with you, you either need to fiddle with your host machine to have it forward ports into the new VM's pretend network, or do what I do. Change the networking type from NAT to Bridged.

If you set it to be bridged, it will hook onto your actual network card and talk to your LAN just like your own machine is doing. Since I have a router that does DHCP, this lets me just assign an address to the VM as if it were a real piece of hardware, and as far as anything else knows… it *IS* a real machine. If you run sshd on it, and your forward a port on your router, people can ssh into it and have no idea it's a VM.

Once you decide which way you want to do that, you're pretty much set. At this point, my suggestion is to grab an ISO image of whatever OS you want to install and mount that in the fake CDROM device the VM made for you. You can use a real CD/DVD and have it pass through to the VM, but most of the time you're gonna be installing linux/bsd/etc, so why waste the time?

Once you power it on, it will do a pretend BIOS screen and then boot from the cd (image), just like you'd expect a real machine to do with the real cd. If you can install Debian on real hardware, installing it on the VM will be no different. For MUD developement, there's no real point in bothering with all the X windows junk… you can. But it'll be running in a window on your own desktop, so I don't see much point. I usually just ssh into each VM and work as if it were a remote machine.

At the moment, I have 6 different VM's on my system. I could probably fire them all up at once and not really notice, because they'd use a bunch of CPU initially as they booted and then just idle into the background. I have two VM's of the same debian release my real server is running, one 32-bit and one 64-bit… I use the 32-bit one to test my MUD and see if I broke anything for people on older hardware. I have a VM that's the newer "testing" release of my server's OS, to see if it's ready to upgrade to yet. I have an old Slackware 3.2 and Slackware 3.5… just to see if I could. I could run old MUD's that use MudOS on those, since MudOS won't compile on anything even vaguely new. :)

Administering the VM is as easy or hard as the OS you installed on it allows.

In the case of Debian, it's fire and forget for the most part. I've left my debian VM's running for weeks without realizing it. You can configure them to fetch updates as needed, or do it yourself when you remember. I usually choose the latter, and it's just "apt-get update && apt-get dist-upgrade".

The only caveats I would see are… your host machine should have at least 1G of RAM. If you're going to run a VM with 256M, you don't want to cripple your own desktop doing it. You obviously need some disk space. You can get by with as little as 4G if you install a small linux or bsd system without X and all the other graphical stuff. If you only have a single core CPU, what you and the VM do will impact one another. So, if you install arch linux and tell it to recompile the entire system from source, your desktop may be sluggish for a while. If you have a dual core or more, you probably won't notice it much.

Just for kicks, I'll fire up the Slackware VM…

Took about 30 seconds to boot… it had to check the filesystem, as it has been months since it ran and old ext2 linux had to fsck things every so often…

Let's see… this VM has 64M of RAM assigned to it, and 8G of disk space.
Inside the VM, it says it has used 61M of RAM, but 53M is disk buffering… it touched swap once for 44K.
Disk space… 7G available.

Process manager says the main virtualbox thread is using 18MB of RAM and not enough CPU to register. The networking service for the VM is using 7MB of RAM and not enough CPU to register. The actual VM itself is using 24MB of RAM and about 1.5% of my CPU time.

So, in total, sitting idle doing just the usual background stuff a linux OS does, this thing is using 50MB of RAM, a tiny amount of CPU, and about 2.2GB of disk space (according to the file browser… looking at the VM's directory). I see no reason a laptop can't run that. Maybe you should give it a try.
07 Apr, 2014, Pymeus wrote in the 27th comment:
Votes: 0
quixadhal's got it. I've run a half-dozen Ubuntu VMs concurrently in Virtualbox on a 4GB laptop. YMMV, but in my case that's more than enough to test non-trivial cluster configuration changes before anyone even thinks about touching the production environment.
07 Apr, 2014, Kelvin wrote in the 28th comment:
Votes: 0
I'll just leave this here for you http://www.vagrantup.com/
07 Apr, 2014, Davion wrote in the 29th comment:
Votes: 0
Well one of the nice things about python is that it's platform independent! You'll be able to boot it up on any OS. Unless you marry the codebase to a particular service, you should be able to boot it up anywhere. I think even the iphone has a python interpreter on it
08 Apr, 2014, Nathan wrote in the 30th comment:
Votes: 0
@Quixadhal
Perhaps tedious is a better word than hard. It's pretty clear that you do sort of thing A LOT and are now familiar and comfortable maintaining that level of thing all the time. While there certainly may be room to ask what brand of insanity you happen to possess if you aren't ok with putting that much work in, I still think that's excessive effort required.

Personally, I find running a VM annoying and would infinitely prefer using someone else's server over that. It probably doesn't help that I prefer the notion of there being one OS and one machine. If I ran linux on my laptop it wouldn't be as much of an issue, but some of us are tied down to Windows for games, among other things and don't want to jump through all the hoops to dual-boot (and there seem to be more nuisances w/Windows 8 than ever before not to mention this UEFI nonsense). I just don't really like the notion of VMs to begin with. It does not help that it is just too much of a hassle to go through to use just for one thing, like coding or running a mud. I did it once and it was just a cancer on my machine as far as I am concerned. I want to be able to focus on the thing I want to do and not the tons of other things that running a VM entails. I don't think it unreasonable to conclude that other people might find it equally bothersome.

@Davion
Yes. That is a very nice thing.
08 Apr, 2014, Tyche wrote in the 31st comment:
Votes: 0
Nathan said:
@Quixadhal
Personally, I find running a VM annoying and would infinitely prefer using someone else's server over that. It probably doesn't help that I prefer the notion of there being one OS and one machine. If I ran linux on my laptop it wouldn't be as much of an issue, but some of us are tied down to Windows for games, among other things and don't want to jump through all the hoops to dual-boot (and there seem to be more nuisances w/Windows 8 than ever before not to mention this UEFI nonsense).


I run Windows 8 and more than 2 dozen different VMs on it. For many years I ran VMWare and more recently set up VirtualBox as well. There isn't any dual booting involved.
The VMs run under Windows while it's running just like any other application, full screen or in a window.
I regularly run Windows XP, Windows Vista, and Windows 7 VMs under Windows 8.1 which is useful for testing on multiple versions of Windows and is also useful for running a lot of old games and other software that will no longer run on Window 8.
08 Apr, 2014, quixadhal wrote in the 32nd comment:
Votes: 0
Yep, I use Windows 7 for my desktop, as I game more than anything else. :)

A VM isn't dual-booting or anything like that. You launch virtualbox just like a web browser or a game client. It pops up a window showing you the list of VM's you have made, with a button to make a new one if you want. If you click start on one of your existing VM's, it'll pop open a new window (or full screen if you set it up that way) and you'll see your "machine" booting.

Usually, it captures the mouse so it can use it for the VM's desktop, and you have to hit a special key (right-ctrl?) to "escape" it back to the main desktop. There's a setting for that too, but I've never bothered to change it as it never gets in the way really. I've left VM's running and played games before and not really noticed any issues either. Obviously, they share resources so if your VM is compuing PI to the billionth place, it might slow down other things… but mine mostly sit idle waiting for me to type something in them.
09 Apr, 2014, Kelvin wrote in the 33rd comment:
Votes: 0
Nathan said:
I want to be able to focus on the thing I want to do and not the tons of other things that running a VM entails. I don't think it unreasonable to conclude that other people might find it equally bothersome.


It's really not that bad. Download Virtualbox and the Linux ISO of your choice, only start the VM when you want. Or take it a step easier and use Vagrant, which will go even further in allowing you to download pre-built boxes to run through Virtualbox on the command line.

This is getting to be super common in the software dev world, it's not a huge burden and some even run VMs with the same OS as the host machine in order to keep dev environments separate.
09 Apr, 2014, Ssolvarain wrote in the 34th comment:
Votes: 0
Tyche said:
useful for running a lot of old games and other software that will no longer run on Window 8.


I get out dosbox when I'm feeling nostalgic.
09 Apr, 2014, quixadhal wrote in the 35th comment:
Votes: 0
Kelvin said:
Nathan said:
I want to be able to focus on the thing I want to do and not the tons of other things that running a VM entails. I don't think it unreasonable to conclude that other people might find it equally bothersome.


It's really not that bad. Download Virtualbox and the Linux ISO of your choice, only start the VM when you want. Or take it a step easier and use Vagrant, which will go even further in allowing you to download pre-built boxes to run through Virtualbox on the command line.

This is getting to be super common in the software dev world, it's not a huge burden and some even run VMs with the same OS as the host machine in order to keep dev environments separate.


Actually, you can download pre-built boxes for virtualbox too. http://virtualboxes.org/images/
09 Apr, 2014, Nathan wrote in the 36th comment:
Votes: 0
@quixadhal
With regard to dual-booting I was pointing out that I would consider that as an alternate to VMs (which I don't particularly like) and that recent developments in software/hardware have made that more frustrating than in the past. Nevermind that relatively new/recent hardware in laptops/desktops frequently isn't well supported in linux by default (ever tried to use a multi-touch trackpad in fresh linux install? especially a couple years ago…). I know how a VM works, I just don't like them and don't consider them a good solution for a local need to for somewhere to run servers or do coding. Maybe a pre-built one would help, but it's obviously not going to come the way I want it so what's the point. Tbh, if I was doing software development I would much rather use ssh and x tunneling than run a VM (assuming that the network connection is viable).
10 Apr, 2014, Ssolvarain wrote in the 37th comment:
Votes: 0
If you planned on releasing it publicly, and the areas are compatible, I might be able to contribute an area or two so you've got some new stuff to throw at people.
10 Apr, 2014, Davion wrote in the 38th comment:
Votes: 0
It is public. I've made it public since the beginning. I've already translated most of it and I have all the areas booting. The game only loads stock rom. I think. I'm currently in the process of translating all the player commands. Just knocked off act_comm.c. Heh 10k lines to go! It boots to the point where you can get in the game and watch it crash. But the world boots and resets.
10 Apr, 2014, quixadhal wrote in the 39th comment:
Votes: 0
All I know is, thanks to VM technology, I don't need to keep an entire rack of old hardware running anymore. If I want to know if my MUD code will still compile on a 32-bit system, I don't need to poke around the back room for my old server, hope the hard drive still spins up, curse the monitor cable for not being connected, and then walk back and forth between my desktop and the cruftbox, waiting for software updates to download and finally get to actually compile my code and see what breaks.

It also means I no longer have to waste my time burning new CD's or DVD's to try out a new OS… download the image and make a new VM. So if somebody says my code won't compile with FooOS 8.78.1, I can actually grab a copy and install it in a reasonable amount of time to see for myself.

In fact, I've been thinking about this… a little off topic maybe, but it might also swing back around to the Python MUD idea… bear with me. :)

Back in 1990 (roughly), a group of LPMUD people sat down and wrote a new LPMUD driver because Lars wasn't actively working on it anymore, and they wanted new features. They jokingly called it MudOS, because it had so much stuff in it and was nearly as complex as an OS. We now have the ability to create virtual machines that consist of a free OS installed WITH one (or more) MUD's already pre-installed and ready to go, and to release that VM image as a one-step solution for people. Essentially, a real MudOS. :)

While I think people will always want to be able to grab their favorite MUD driver (and mudlib) and compile it on their own machine as they like… I also know there are quite a few questions on these forums that essentially boil down to "How do I just make this work?". Would there be any interest in actually trying to create VM images of some popular muds that are ready to run?

I don't think we need this for the more modern codebases, as they compile pretty easily. But some of those older ones… nobody wants to spend more time fixing const char * errors for them… but loading up an older OS on a VM that uses the compilers from that day isn't so bad.
10 Apr, 2014, quixadhal wrote in the 40th comment:
Votes: 0
Davion said:
It is public. I've made it public since the beginning. I've already translated most of it and I have all the areas booting. The game only loads stock rom. I think. I'm currently in the process of translating all the player commands. Just knocked off act_comm.c. Heh 10k lines to go! It boots to the point where you can get in the game and watch it crash. But the world boots and resets.


Are you going to keep the old area formats, or do something clever like have it read/write JSON file formats natively? I've been pondering rewriting my own DikuMUD in another language (maybe perl!), and think I'd rather make the old C code emit JSON formatted files so the newer version stays lean and doesn't have to hold onto so much legacy stuff.
20.0/93