Page 1 of 3

What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 5:19 pm
by Dog G6
I would like to start creating OXPs. With Windows, I have Notepad++ and of course Notepad. I would prefer to be able to use Notepad++ or a similar editor, but even though it has Objective-C support, I don't think it has full GNUstep functionality. I could still program it in NPP, and save it as a .plist file and it would work, correct? The JavaScript side wouldn't be a problem.

Otherwise, are there any good editors that support all of the required libraries required for OXP programming?

Also, the OXPs could be written in XML, right? NPP does support XML, although I'm not sure how hard it would be to add compatibility with other OXPs, as I believe it said on the wiki that it would still need to be translated?

Thanks.

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 5:56 pm
by Cmd. Cheyd
I use NPP for all of my OXP dev because OXPs are all in JS (and plists).

Obj-C is only needed of you're attempting to modify core/trunk code.

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:00 pm
by Dog G6
Really? I thought JS was only supported for AI and planet scripts. Cool! What I had in mind was an economy and AI OXP. That would be possible, or would the economy part require alterations to core code?

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:04 pm
by GGShinobi
Dog G6 wrote:
I would like to start creating OXPs. With Windows, I have Notepad++ and of course Notepad. I would prefer to be able to use Notepad++ or a similar editor, but even though it has Objective-C support, I don't think it has full GNUstep functionality. I could still program it in NPP, and save it as a .plist file and it would work, correct? The JavaScript side wouldn't be a problem.

Otherwise, are there any good editors that support all of the required libraries required for OXP programming?

Also, the OXPs could be written in XML, right? NPP does support XML, although I'm not sure how hard it would be to add compatibility with other OXPs, as I believe it said on the wiki that it would still need to be translated?

Thanks.
Well, I don't know if it is the right recommendation for a beginner, but I do almost ALL of my work with the nearly omnipotent vim (or gvim, if I'm on Windows). Although I have to admit that it might not be the easiest editor to learn, this might be mitigated by the fact that there is a game where you can learn the basics: http://vim-adventures.com/. :)

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:08 pm
by Smivs
I hope it goes well - developing OXPs can be enormous fun and very rewarding.
Just two points I'd like to make. Firstly, although XML is acceptable openStep is generally preferred as it is far more 'human-readable', which is why most authors use it now and most OXPs are coded in openStep, as is the core game. :wink:
Also, be aware that Windows is not case-sensitive wheras Linux and Macs are. I've probably seen more 'silly' OXP errors caused by this than anything else, so watch your cases, and see if a Mac or Linux user can give anything a quick test for you before release.

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:10 pm
by Thargoid
Hammer, bottle of whiskey, stress toy, phone number of the Samaritans, solid brick wall (see <-- for instructions)...

But slightly more seriously, all you need is a good editor (N++ is my tool of choice), the game itself, including the JS console and debug.oxp (the latter ships with the game, but you may need to tick a box to get it to install). Most of the files are either Javascript or openStep/XML plists, and all are text files. The slight exception are AI files, and those are still text files.

Oh and a web browser fairly permanently pointed at the Wiki, as useful reference.

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:15 pm
by Dog G6
How would I use openStep on Windows? Does NPP support it, or is there an editor that does, or should I just use Notepad for it? Thanks guys for all of the quick replies! I'll also look into the gvim GGShinobi.

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:18 pm
by Tricky
Some pointers on using Notepad++ for OXPs...

Save your files as "ANSI as UTF-8", makes sure that special symbols can be shown on other systems. Make sure your file names use the same case, Windows doesn't care, other OS's do! If you use the JSlint plugin (which I do) you will find it is very picky about the format, which is why my JS is formatted differently to other OXPs*. I've associated plist with ObjC (in Notepad++) and it seems to syntax highlight it OK. Use sessions, I use .npp as the extension and have associated it with Notepad++ in Windows so I can just click on the file to load it in.

--
* [EliteWiki] Jaguar Company

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:20 pm
by Thargoid
It's just a way of coding the file (both openStep and XML are basically text files).

An example, from the wiki:

XML

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>my_custom_adder</key>
  <dict>
    <key>like_ship</key>
    <string>adder</string>
    <key>name</key>
    <string>Freak Adder</string>
    <key>model</key>
    <string>custom_adder.dat</string>
    <key>roles</key>
    <string>trader my_freaky_adder</string>
  </dict>
</dict>
</plist>
OpenStep:

Code: Select all

{
  my_custom_adder = {
    like_ship = "adder";
    name = "Freak Adder";
    model = "custom_adder.dat";
    roles = "trader my_freaky_adder";
  };
}
Both are equivalent and interchangable (as separate files - you can't have both styles within one file). Some people prefer one and some the other - personally I like openStep as it's easier for me to read and edit. There are a few pro's and con's for each - it's very much a matter of personal taste and the game will happily ingest either.[/color]

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:26 pm
by Smivs
Re openstep, Thargoids quotes from the Wiki illustrate nicely the differences (and similarities) between the two. You will see that the openStep is both shorter and easier to read.
Take look at the files in the 'Resources' folder of the core game for examples - in fact as they cover every entity in Oolite there is probably something similar to your project there and the core files therefore also make excellent templates to work with.
Just c&p something similar to what you want into your text editor and start changing the numbers. :)

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:34 pm
by cim
Dog G6 wrote:
Really? I thought JS was only supported for AI
AI is one of the few things that doesn't (yet) use Javascript. There's a simple state machine language used instead, which is written using plist entries. N++ will be fine for it, though.

People have already recommended the Wiki: the two pages I keep open almost permanently when doing OXP programming are [wiki]OXP_howto[/wiki] and [wiki]Oolite_JavaScript_object_model[/wiki]. There is a link to almost every necessary reference page on one or the other. [wiki]OXP_Distribution[/wiki] is also worth reading.

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:50 pm
by Diziet Sma
Dog G6 wrote:
I would prefer to be able to use Notepad++ or a similar editor, but even though it has Objective-C support, I don't think it has full GNUstep functionality. I could still program it in NPP, and save it as a .plist file and it would work, correct?
Unless you're using a Mac, there is NO editor that has full GNUstep/openStep functionality, sadly. I've recently been searching hard for one, with no success. Yes, NPP will do the job, however.

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 6:59 pm
by gizmo
Diziet Sma wrote:
Unless you're using a Mac, there is NO editor that has full GNUstep/openStep functionality, sadly. I've recently been searching hard for one, with no success. Yes, NPP will do the job, however.
For Linux there is at least CodeEditor and ProjectManager (an IDE).

Edited to add:
another good cross-platform editor: SciTE

Although I have to agree with GGShinobi: vi is the only editor you'll ever need. :mrgreen:

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 7:48 pm
by Diziet Sma
gizmo wrote:
Diziet Sma wrote:
Unless you're using a Mac, there is NO editor that has full GNUstep/openStep functionality, sadly. I've recently been searching hard for one, with no success. Yes, NPP will do the job, however.
For Linux there is at least CodeEditor and ProjectManager (an IDE).
CodeEditor has not been maintained since April 2004, and uses StepTalk for scripting support, which has not been maintained since June 2005. ProjectManager hasn't been maintained since mid 2008. That does not bode well. Much has changed since then.

I will take a look at CodeEditor, that is, assuming it will even run on Mint13.

I've already checked ProjectManager out, and apart from the clunky menus which act up under gnome2, the file browser cannot even SEE a folder with an .oxp extension, which would make it a real PITA to use for writing OXPs. :roll:
gizmo wrote:
Edited to add:
another good cross-platform editor: SciTE

Although I have to agree with GGShinobi: vi is the only editor you'll ever need. :mrgreen:
There are plenty of good editors around, but how many can syntax-check openStep code? SciTE can't, and nor can vi/vim.

And if you want a good cross-platform editor, you may as well go with Sublime Text 2 and actually enjoy using it. :mrgreen:
(and you can even enable vi-mode on it, if you're that way inclined)

Re: What Tools Are Good For Windows OXP Programming

Posted: Tue Jan 22, 2013 8:19 pm
by Diziet Sma
Oh, and since we've all gone and forgotten our manners..


Welcome aboard, Dog G6! 8)

(and welcome to the Dark Side, which is what we call OXP writing around here.. :twisted:)