ID:109964
 
Keywords: dreammaker, linux
Since there is no DreamMaker IDE for Linux, you're going to have to come up with a different workflow for Linux. Here's a little information about mine, and you can decide whether you like some of it, maybe pick up a thing or two, or take whatever you want from it :)

I use vim as an editor for DM files, and I've given them C highlighting to get the important keywords a decent color. I'd like to try my hand at a .vim highlighting file some day, but the thought of doing that for DM just gives me all kinds of itches to run away screaming.

Beyond syntax highlighting, I found a few issues at first:

1) The DreamMaker command is long and ugly (Starts with a big letter, etc)
2) Zipping stuff up requires you type zip library_name.zip *.dm *.dme - That can be shortened ^^
3) If you have a repository with your game, and it uses libraries, then those libraries don't get downloaded automatically. DreamDownload doesn't download them automatically either.
4) If you use a library someone else wrote, but they have bug(s) they haven't fixed, and you want to deploy your code so others can use it, then you'll need to tell them to fix the code!
5) Jumping between files takes time

For some of this, I wrote a simple Makefile. This is the 'basic' template version:

TARGET=$(notdir $(basename $(CURDIR)))
all:
        DreamMaker $(TARGET).dme

clean:
        rm -rf $(TARGET).zip
        rm -rf $(TARGET).dmb
        rm -rf $(TARGET).rsc

zip:
        rm -rf $(TARGET).zip
        zip -R $(TARGET).zip *.dm *.dme


To compile: Type make (:make inside vim works as well; I've bound :make to F5).

To zip the project up, type make zip

To remove dmb, rsc and zip files, type make clean.

The Makefile will assume that your .dme file is named exactly the same as the directory its in - If that isn't the case, the Makefile will screw things up.

In order to get around the issue of library dependencies, my own game has a 'make depend', that looks like this:

depend:
        DreamDownload byond://Alathon.services
        DreamDownload byond://Alathon.telnet_input
        DreamDownload byond://Alathon.callwrapper
        DreamDownload byond://AbyssDragon.Parser
        cp parser.patch ~/.byond/lib/abyssdragon/parser
        cd ~/.byond/lib/abyssdragon/parser && patch -p1 -i parser.patch Parser.dm


It will download the libraries I need, and will patch AbyssDragon.Parser because theres a bug with numbers in there. The patch was created by running 'diff -Naur oldfile fixedfile >> parser.patch', and can be applied as you can see, with the patch command. Patches are handy stuff!

I can also really suggest autojump. It makes moving around your hard-drive a *lot* faster, if you're not a cd or two away from where you want to be.

As for actually working in vim, I use a VIM plugin called winmanager, you can find a patched up version of it here. Below is an example screenshot of me inside a project, with a few files open (They're listed in the 'File List' in the bottom left), and the file browser in general on the left side.

I've mapped the file browser to an easy key (F2), so that I can open and close it at will - If I need more screen real-estate to work on some code, I hit F2 and it closes. I need to switch to a file? I hit F2 and it opens right back up the way it was. It also works with mouse interaction, so you can click on files to open them.

Click to view VIM screenshot
Neblim wrote:
Close, but no cigar. Being able to run your applications at run time is very necessary in debugging and testing.

Handy nonetheless. Thanks for sharing! :)

Huh?
He means that developing is near impossible when you can't run the application and test it out.
Way to bump my post off the front page in under 3 hours. You couldn't wait a day? It's not like it took me over 2 hours to write my protocol or anything... Thanks. >_>

This also doesn't address what is to me the most important issue: rapidly switching between files in DM. What you propose is the equivalent of editing .dm files using WordPad.
If it's any consolation I personally use nano.
In the Archives somewhere someone had created custom syntax highlighted for DM for both gedit and kate.
Gakumerasara wrote:
Way to bump my post off the front page in under 3 hours. You couldn't wait a day? It's not like it took me over 2 hours to write my protocol or anything... Thanks. >_>

This also doesn't address what is to me the most important issue: rapidly switching between files in DM. What you propose is the equivalent of editing .dm files using WordPad.

If you submit your post again, I'll accept and we can have it reposted, if you think that's an okay way to go? I'll clear the old post.

Also, who accepted this at the time they did? I need to give you a stern telling off, young man.
Gakumerasara wrote:
Way to bump my post off the front page in under 3 hours. You couldn't wait a day? It's not like it took me over 2 hours to write my protocol or anything... Thanks. >_>

I don't have authority to approve posts here, so someone else did that :(

This also doesn't address what is to me the most important issue: rapidly switching between files in DM. What you propose is the equivalent of editing .dm files using WordPad.

I don't quite agree - I can't compile my DM project from WordPad, nor does it give me syntax highlighting, regex-based search and replace, etc. etc.

Regardless, almost every editor for Linux has either tabs if they're graphical, or a notion of buffers you can switch between in the case of vim and emacs. For vim, there are a plethora of file-tree plugins that work rather well, such as NERDtree, and WinManager
Airjoe wrote:
He means that developing is near impossible when you can't run the application and test it out.

What is preventing you from doing that? If its a telnet game, you can test it via telnet. If its a graphical game, you can host it and then connect through DreamSeeker running in wine, running in a VMware/whatever-have-you Windows installation, or just plain from a Windows machine.

I don't particularly see the problem.
Alathon wrote:
What is preventing you from doing that? ... If its a graphical game, you can host it and then connect through DreamSeeker running in wine, running in a VMware/whatever-have-you Windows installation, or just plain from a Windows machine.

If you need a Windows machine or VM that can run dream seeker for testing, why not run dream maker there too? I could understand some benefit if you want to edit the code on a dedicated server running Linux, but I'd think you could write some scripts to remotely update the .dmb on the server and you could still do all development in dream maker (so you can edit maps and icons too).
Alathon wrote:
I don't have authority to approve posts here, so someone else did that :(

No problem.

I don't quite agree - I can't compile my DM project from WordPad, nor does it give me syntax highlighting, regex-based search and replace, etc. etc.

You can't compile using gedit/nedit/nano/vi/etc. either. Using the DreamMaker command itself is trivial; the hard part is managing your code in Linux. When I create a project, I can easily end up with dozens of .dm files split between several sub-folders, and my point is that having to manually open each file is annoying and impractical.

I have used gedit and nano to do a limited amount of BYOND programming in Linux, and while I don't mind programming in gedit/nano, managing multiple files is a nightmare. The lack of syntax highlighting is not a problem for me. However, having to hunt through multiple files for [line of interest] using "find" or "grep" is a pain in the ass.

Regardless, almost every editor for Linux has either tabs if they're graphical, or a notion of buffers you can switch between in the case of vim and emacs. For vim, there are a plethora of file-tree plugins that work rather well, such as NERDtree, and WinManager

I'm really not a fan of vi. (Yes, I know it's supposed to be the be-all editor for programmers, but if I have to spend more time looking up commands than typing code, it's not very useful for me.) Is vim a more user-friendly implementation of vi?

And yes, if I can get a "tree" structure similar to DM, even if it doesn't highlight syntax, that would be more than acceptable.

---------------------------------------

I should also mention that your compilation scripts look useful.
Sorry for snapping at you; I put a lot of effort into my protocol.
Stephen: There was a problem with my post the other day where it went to the queue but then some-how got automatically accepted.
Your post and Gaku's were both accepted by a person, Alathon's just seemed to go straight in. Unfortunately I can't straighten up the permissions to stop this.

I'd recommend you just double check you're doing "Submit Only" in future guys, as clearly some of us have funky permissions. Same goes, a lot of us can approve posts, so remember to check dates and previous content before accepting stuff.
Stephen001 wrote:
Your post and Gaku's were both accepted by a person, Alathon's just seemed to go straight in. Unfortunately I can't straighten up the permissions to stop this.

That's because I deleted the post and re-submitted. I hit "Submit Only" the first time and it went straight through, and Flame Sage was just sort of "WTF'ing".
I checked the logs...

Flame Sage Flame Sage blog submission "Our CSS is bugged!" accepted. Feb 28, 2011
Nadrew Gakumerasara blog submission "Linux: DD setup and hosting - beginner to advanced" accepted. Feb 23, 2011
Android Data Audeuro blog submission "Recent Going-Ons" accepted. Feb 20, 2011
Android Data Audeuro blog submission "Recent Going-Ons" accepted. Feb 20, 2011


Removed a few admins that are considered inactive now.