Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 11-20-2012, 09:48 PM   #1
ww_crimson
Member
 
Join Date: Sep 2011
Home MUD: Aarchon
Posts: 62
ww_crimson is on a distinguished road
Windows IDE for C-based MUD?

Hopefully the title is accurate enough to get the point across, but I'm wondering if anyone has any experience or recommendations on using a windows-based IDE to write, compile, and test code for a MUD written in C (rom based)?

I've read some of the old threads in this sub-forum but I'm hoping for a little more guidance. Currently I edit my MUD in notepad files, and copy/paste the changes through the online cpanel to the appropriate files. I then use teraterm or putty to log in to the shell, and compile the code. This has been working fine for me, however it's slow, tedious, and has very few features.

I'd like to work on a local copy of the code, test everything, and then upload the changes to the server... however I have no idea what the best way to go about this is. I've downloaded Eclipse IDE, but I'm having trouble getting it to work. I've also started a CentOS download and will try using a VM, however I don't really like vi, nano, pico, etc.. I have really trained myself to use notepad well, and I just have absolutely no desire to learn all the commands associated with the linux based text editors.

I'm hoping someone can share some information on how to get Eclipse working properly with a MUD.. I've got the source code loaded in but I'm not really sure how to compile and run the code. Normally I have to compile the code before I can run it, and I don't see how to do that. I also normally need to run the binary from the "areas" folder because it looks for all the .are files to get the MUD loaded. Ideally I'd be able to actually connect to and test the MUD locally through an IDE and VM. I'm familiar with computers but have very limited knowledge in this realm. Any help is appreciated.
ww_crimson is offline   Reply With Quote
Old 11-21-2012, 11:11 AM   #2
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Windows IDE for C-based MUD?

You have two options. You aren't going to like either, I suspect. There may be a third, but I don't know it.

First is an ftp client. I recommend winscp. Your host provider should allow ftp access. You get that, and it acts like windows explorer: click a file to open, and when you press save in the text editor it automatically reuploads. Winscp has a built-in text editor, don't know if it's any good, but it can be reconfigured to use the text editor of your choice. You don't have to drag and drop, etc. You then go to the ssh client of your choice and type whatever the build command is, and test. So, winscp, a good text editor with syntax highlighting or whatever it is that people can see like to have, and an ssh client. You can't really test locally with this option.

The second option is a git repository, or a subversion repository, or fill-in-the-blank repository. There's bitbucket which is free, and no one can see your code unless you explicitly allow it, and that's what the mud I'm coding for is using. You can get an eclipse plugin to pull the repository, make your changes and then push the repository. Check it out on the machine running the mud when you're ready to upgrade.

To compile and test locally, you need cygwin, most likely. If you don't use anything like sql, etc, and just the standard flat files a lot of merc/diku/rom muds use, you can do this. Eclipse can compile with cygwin, but the issue here will be starting the mud. I don't know enough about eclipse to know if you can start the mud without opening a shell: eclipse likes to impose a directory structure, and most muds have the directories hard-coded. I suspect you'll either have to read eclipse documentation to make the current directory something besides the default (definitely doable, don't ask me how), or change the mud to play nice with whatever eclipse expects. If you try playing with this, you need the eclipse cdt and cygwin (not part of eclipse) or, if you're lucky enough to have a mud that compiles in visual studio, you can maybe get away with mingw. If your mud uses databases, setup is a bit trickier on a windows machine, and I wish you luck.

Finally, there are various text editors that have built-in ftp clients.

Testing locally is going to be very very painful. Probably about as painful as testing on the server, and if you test on the server, you know that it works on the server. I'd not bother, unless there's some reason to do so besides a desire to, or unless it compiles with visual studio and microsoft's toolchains. There's a lot of setup with doing that, and it'll be difficult if the mud uses mysql and such (unless you already know how to set all that up on windows...).
camlorn is offline   Reply With Quote
Old 11-21-2012, 01:00 PM   #3
ww_crimson
Member
 
Join Date: Sep 2011
Home MUD: Aarchon
Posts: 62
ww_crimson is on a distinguished road
Re: Windows IDE for C-based MUD?

Hi Camlorn,

Thanks for the great reply. It sounds like testing locally is going to be a bigger pain than it's worth. Really, I just wanted that functionality because I know my home PC will compile code a lot quicker than the server.. although it only takes about 6-8 seconds to compile.. I get impatient when I'm testing incremental changes.

I think what I'm going to end up doing is setting up the FTP software, and then managing the code that way (pushing to the server).
ww_crimson is offline   Reply With Quote
Old 11-21-2012, 04:31 PM   #4
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Windows IDE for C-based MUD?

Well, here's a thought. It should be possible, and no I don't know how, to get an xwindow server working on windows. Basically, there's no reason you can't start up gnome, or whatever window manager your server has, and get remote access to it. I believe cygwin (again) has this functionality. I haven't used it: no audio, and I'm visually impaired. But gnome, for example, has things that look like notepad, and you can run eclipse in an xwindow session I believe.

Eclipse can pull and push to and from a server, but it isn't easy. I looked into doing it once, and couldn't find a straightforward way of doing it: I couldn't get it such that I just hit the magic build button, at least without following instructions I couldn't understand at the time, and had the server build it, etc. I'm sure this can be done, somehow, but good luck.

Putting your mud in a repo is probably a good thing to do, whether or not you do development on the pc. If you're going to use ftp, though, just check out the repo on the server and use a good ftp client (winscp or an editor with it built in ) to transparently edit files as though they were on your local machine. You almost can't tell that they aren't. I taught myself git in an afternoon, at least enough to do what needs doing as a coder, and don't regret it: if you introduce a bug and need to see what changed, you can do so easily.

There are other things, but it really probably isn't worth the bother (WEBDAVS, I think it's called, but I'm not 100% sure that's the right name: an extension to something or other that almost no one uses but that windows can mount as a drive).

Finally, you can learn the linux editors, and you will be much much faster. I know this, but haven't learned them myself, mostly because until you do you're much much slower (by orders of magnitude, heh).
camlorn is offline   Reply With Quote
Old 02-24-2013, 09:43 AM   #5
Szarta
New Member
 
Join Date: Feb 2013
Posts: 1
Szarta is on a distinguished road
Re: Windows IDE for C-based MUD?

Hi - I know it has been a while since you posted and maybe you have found a solution by now, but I thought I would chime in for other people who might be interested in building their MUD on something other than their mud server, especially if their home PC is relatively beefy.

You have 3 things you want to do:

1. Edit the code
2. Compile the code
3. Execute the corresponding program - preferably in the same way you would on the server

I recommend doing this using a virtual machine that is running Linux. The virtual machine runs within Windows. For beginners I really recommend something like Ubuntu or XUbuntu as a Linux distro. CentOS is more of a server distro and does not come with all the GUI stuff you will need when you are first learning. For the actual virtual machine program, I recommend either Oracle's VirtualBox or VMWare. All of this software is free and there are guides online describing how to set them up.

VM software usually provides the ability for you to set up something called a shared folder, which is a folder that both your Linux OS and your Windows OS can see. If you kept your code in this shared folder, you could edit it within Windows and then compile it from Linux and run it when needed. HOWEVER...

You said you are using notepad to edit. Notepad is great for some things, but horrible for editing code. For one-off edits here and there, okay, but you really want an editor designed for programming. A lot of linux editors can be scary initially (emacs and vi/vim) - mostly because their purpose is to run from the console and a lot of times mouseless. There are plenty of other good graphical editors, however, again all free. If you are interested in code development, I recommend GVim (graphical/gnome vim) to ease your way into VIM. It has a GUI that explains the commands. There is also Kate, gEdit (for your notepad/like needs), and you mentioned Eclipse.

Eclipse is different than just a code editor - it is an IDE (integrated development environment). It is a good IDE that is cross platform (you can run it from Windows no problem). You could use Eclipse to just edit code and that would be enough - at the very least you'll get syntax highlighting. For most muds, though, you can also build from Eclipse by creating a Makefile project - because most codebases come with a Makefile. If you are interested I could try to walk you through how to set up your mud project to build out of Eclipse.

In the beginning there is a lot to learn but getting proficient with editing and understanding how to build code will go a long way if this is something you are really interested in.
Szarta is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 02:57 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014