Gnu Emacs mode for world files?

General talk about the map making process.
Post Reply
User avatar
The Purple Panzer
Field Marshal
Field Marshal
Posts: 244
Joined: Tue Sep 23, 2003 8:13 pm
Location: Stonington, CT
Contact:

Gnu Emacs mode for world files?

Post by The Purple Panzer » Sun Mar 03, 2013 2:43 am

I was bringing my Gnu Emacs files (various modes, etc.) up-to-date (every release seems to change a variable or function or two), and it got me thinking: has anyone ever written a mode for BZFlag world files? For version 1 map files it would of course be pretty simple, maybe some keyword highlighting, etc.; for version 2 it might have quite a bit more. Not sure it's really worth it (I think most developers use tools to generate 3D components), perhaps it might be for finding and extracting pieces of a map file - or maybe to trace down errors (that is, when bzfs tells you at line 1203 that something is wrong). On unix systems gnu emacs might be able to spawn off bzfs, grab the errors, and highlight them in the map file - perhaps cutting down the development cycle. Gnu Emacs was frequently used this way, e.g. to run Lisp - though I realize this approach is probably more typical of the 1980's than the 2010's.

I thought I'd at least ask. Years ago I wrote a mode for emacs (an .el file) for a 3D design format called Iges used in CAD files - not too far from the kinds of objects (meshes, etc.) in BZ. It was to some extent useful in perusing files; so it can be done. I'm not saying it should be, but if anyone has written one I'd enjoy playing with it.

User avatar
thrak
Private
Private
Posts: 2
Joined: Mon Jun 15, 2009 2:39 am

Re: Gnu Emacs mode for world files?

Post by thrak » Wed Oct 30, 2013 7:11 am

Hi, Just wondering if you any luck on this thread, especially part where you mention:
"On unix systems gnu emacs might be able to spawn off bzfs, grab the errors, and highlight them in the map file - perhaps cutting down the development cycle."
This seems like a very good idea. I have played very little with Lisp but this is motivating.
IRC
Freenode: irc.freenode.net, thrakattak, ##urbanjungle
ChatSpike: irc.chatspike.net, thrak, #urbanjungle <--- backup channel if Freenode is down.

User avatar
The Purple Panzer
Field Marshal
Field Marshal
Posts: 244
Joined: Tue Sep 23, 2003 8:13 pm
Location: Stonington, CT
Contact:

Re: Gnu Emacs mode for world files?

Post by The Purple Panzer » Wed Oct 30, 2013 11:25 am

I've heard nothing. I should mention that I did write some map generation code in emacs lisp; it was the first random mapgen stuff for my 'quickshot' map sequence. I did it because the unix server it ran on had emacs, and you can use emacs in batch mode - essentially a command-line invocation of emacs with a function to call - so the entire map generation/server start could be done in a script. I probably have that sitting around somewhere if you're interested. It's a slight tangent - it wouldn't necessarily be part of an editing mode, which should work directly on the map file.

User avatar
thrak
Private
Private
Posts: 2
Joined: Mon Jun 15, 2009 2:39 am

Re: Gnu Emacs mode for world files?

Post by thrak » Wed Jan 22, 2014 12:51 am

The Purple Panzer wrote: <snip> the unix server it ran on had emacs, and you can use emacs in batch mode - essentially a command-line invocation of emacs with a function to call - so the entire map generation/server start could be done in a script. I probably have that sitting around somewhere if you're interested. It's a slight tangent - it wouldn't necessarily be part of an editing mode, which should work directly on the map file.

Yes I would be interested. I sent you PM regarding another question but I would be interested in this. It would be a fun way to explore lisp.
IRC
Freenode: irc.freenode.net, thrakattak, ##urbanjungle
ChatSpike: irc.chatspike.net, thrak, #urbanjungle <--- backup channel if Freenode is down.

User avatar
The Purple Panzer
Field Marshal
Field Marshal
Posts: 244
Joined: Tue Sep 23, 2003 8:13 pm
Location: Stonington, CT
Contact:

Re: Gnu Emacs mode for world files?

Post by The Purple Panzer » Wed Jan 22, 2014 2:46 am

I've attached the main emacs lisp file; I'm not sure this is the last/most recent, because I don't use it anymore (one server used to). The maps are relatively simple, like the original Quickshot maps. It was named main.el, but the bboard won't allow that extension, so I changed the "el" to "txt".
Attachments
main.txt
(14.62 KiB) Downloaded 84 times

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest