RF2 script editor?

Discuss the development of Reality Factory 2
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

RF2 script editor?

Post by AndyCR » Mon May 28, 2007 5:07 pm

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

User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 » Tue May 29, 2007 1:54 am

not bad,itd b good if it had syntax checking and colour coding,styuff like that,but im not fussed. :D
Once I was sad, and I stopped being sad and was awesome instead.
True story.

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Tue May 29, 2007 4:43 am

Thanks!

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

Image

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Tue May 29, 2007 5:48 am

Yet another mockup; changed window title, removed ugly text box border, added syntax highlighting.

Image
Last edited by AndyCR on Tue May 29, 2007 3:04 pm, edited 1 time in total.

User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA
Contact:

Post by darksmaster923 » Tue May 29, 2007 6:15 am

omo(oh my omg!) that looks so cool. now if only i knew python :?
Herp derp.

User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco » Tue May 29, 2007 9:54 am

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

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Tue May 29, 2007 3:37 pm

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.

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis » Tue May 29, 2007 8:31 pm

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!
Pain is only psychological.

User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas » Wed May 30, 2007 3:04 am

Sweet! Keep up the good work.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Wed Jun 20, 2007 2:32 am

Image

Progress so far.

Im on a trip, so sorry to be brief.

MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames » Wed Jun 20, 2007 3:48 am

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.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.

User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 » Sat Jun 23, 2007 1:55 am

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.
Once I was sad, and I stopped being sad and was awesome instead.
True story.

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Sat Jun 23, 2007 2:05 am

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.

User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Post by ardentcrest » Sat Jun 23, 2007 2:47 pm

One app for all sounds the best.
He's a Bot Jim, But not as we know It.

User avatar
scott
Posts: 1151
Joined: Tue Jul 05, 2005 1:59 am
Location: United Kingdom

Post by scott » Sat Jun 23, 2007 6:16 pm

unless one crashes, then the other go aswel.
*GD*

Post Reply