Page 1 of 4

RF2 script editor?

Posted: Mon May 28, 2007 5:07 pm
by AndyCR
I think we need a script editor. Basically, it's hard to find a cross-platform, open source Python editor, and it's nearly impossible to find one that has enough features to satisfy projects as large as games.

It's also hard to satisfy this feature spec:
If there is an error or an uncaught exception during the execution of bootstrap.py, RF2 will check for the existence of the toolset. If it exists, it will open the RF2 script editor, opening all scripts with errors in them, marking all script errors with the error indicator, inserting the appropriate information about the error, and bringing the cursor to the first error. If the toolkit is missing, a message box is created which shows the exception type, error, and traceback.
Without a custom script editor.

So here is what I am thinking. I think we can make a decent script editor for RF2 in a reasonably short amount of time (how much exactly I would have to write the spec and schedule first to find out).It would have features useful to those writing games, including some navigation features (right-click on a function name and choose go to definition to go to the definition of the function, etc.) and hopefully some autocompletion as well. This would also allow us to implement RF2 built-ins as autocompletable, so if you type rfobjects.coord( it will remind you that you need an integer x value and an integer y-value.

The editor would be written in C++ with wxWidgets, using wxScintilla for the editor component.

I have embedded a basic mockup of the editor. It is not functional, it doesn't show all ideas, just a basic layout idea. It also does not contain syntax highlighting. What do you think?

Image

Posted: Tue May 29, 2007 1:54 am
by zany_001
not bad,itd b good if it had syntax checking and colour coding,styuff like that,but im not fussed. :D

Posted: Tue May 29, 2007 4:43 am
by AndyCR
Thanks!

Progress on the spec is going well, and a second mockup is done.

Image

Posted: Tue May 29, 2007 5:48 am
by AndyCR
Yet another mockup; changed window title, removed ugly text box border, added syntax highlighting.

Image

Posted: Tue May 29, 2007 6:15 am
by darksmaster923
omo(oh my omg!) that looks so cool. now if only i knew python :?

Posted: Tue May 29, 2007 9:54 am
by psYco
great work andy, and i see your running vista now, at least we'll know that any compatability with RF2 and Vista will be sorted now :D

Posted: Tue May 29, 2007 3:37 pm
by AndyCR
Thanks guys! :D

Yeah, Vista came with my new laptop. Surprisingly I didn't have to do anything to get anything RF2-related to work.

Image

Mockup 3. Added "being edited" indicator, multiple scriptsets visible in workspace, error indicator on both file and line, error indicator on tab of file with an error, and arrow on scriptset which is the current default for RF2 to start with.

Posted: Tue May 29, 2007 8:31 pm
by Juutis
O' nice! Looking sweet, Andy! :D
I always get all excited when you tell about new stuff in RF2. :P

Since scripting is such a powerful tool in RF2, it is indeed wise to make an editor of your own. I use notepad to write scripts in RF and your editor sure looks a lot friendlier and nicer!

Posted: Wed May 30, 2007 3:04 am
by jonas
Sweet! Keep up the good work.

Posted: Wed Jun 20, 2007 2:32 am
by AndyCR
Image

Progress so far.

Im on a trip, so sorry to be brief.

Posted: Wed Jun 20, 2007 3:48 am
by MakerOfGames
WOW, thats amazing! Great work Andy!

That will make RF2 even easier to make games!

On a side note, I am using Vista Ultimate 64bit edition with direct x10 and have no problems running the current RF build.

Posted: Sat Jun 23, 2007 1:55 am
by zany_001
i was thinking that rf2 should have one editor you open up,and it has tabs,such as one for a script editor,one for world editing,one for modifying INI's,one for viewing models,etc.this would make it easier to work with,because you wouldnt have to keep going from the editor to the rf folder,and having to open 5 apps at once,and so on.perhaps ill do that when im a better programmer if its too much work.

Posted: Sat Jun 23, 2007 2:05 am
by AndyCR
Yeah, I've considered that as well. My plan is to write them as separate apps, at least for now (might change in midflight), and then I can merge them VERY easily (few hours work at most) if everyone would prefer that.

Posted: Sat Jun 23, 2007 2:47 pm
by ardentcrest
One app for all sounds the best.

Posted: Sat Jun 23, 2007 6:16 pm
by scott
unless one crashes, then the other go aswel.