New Ren'Py Stand-Alone code editor

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

New Ren'Py Stand-Alone code editor

#1 Post by YiuKorochko »

Hi forum, I'd like to announce that as well as developing Sakkaku ni Dasu (as production is painfully slow) I will, in spare time, be writing a Ren'Py script editor.
"But why? Doesn't jEdit work?"
-Well yes. But what if your latest Java update fails? You need Java for jEdit.
And what if you can't seem to fix it or have no internet access (as I did approximately 2 weeks ago) ?
So does it have all the syntax highlighting and auto indentation that jEdit offers?
-Currently auto indent is nearly perfected. Still waiting on a few final code snippets.
As for colored syntax highlighting, no. All current methods include searching through the entire
block of text and attempting to fix all words, at times scrambling the code.
How will it be better than jEdit, if at all?
-File associations, for one. All rpy files will be set to this new editor on install.
(However if using Ren'Py main executable, clicking edit will open jEdit. I can't change that.)
Stores recent files and when hitting Ctrl+O or clicking File > Open a openfolderdialog appears in the last used location.
select a folder, and the script.rpy and options.rpy are automatically loaded.
Further development will open more rpy files in more tabs.
Highlight syntax WILL be finalised and will include a syntax filter
(eg: type "i" and combo box appears with all items starting with "i")
which will further improve individuals develop their Ren'Py applications.
Icons and images can simply be inserted into code (Edit > insert > Image/Sound/Video) and the file is COPIED to the appropriate directory and renamed, then it is also automatically typed into the Ren'Py code.
File > Execute will hopefully run the game via the code editor, rather the Ren'Py application.
(Doing this allows for prompt asking "Code has been modified! Save before run?")
When will the program be available?
-Not yet known. Soonest would be March 7th 2010, and not all features could possibly be complete by that time.

Anything else you'd like to know?
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: New Ren'Py Stand-Alone code editor

#2 Post by PyTom »

(However if using Ren'Py main executable, clicking edit will open jEdit. I can't change that.)
Actually, you can. Look at the jEdit.editor.py file in the launcher directory. What's more, Ren'Py will scan for editor.py files, and let the user pick from them.
-Not yet known. Soonest would be March 7th 2010, and not all features could possibly be complete by that time.
May, perhaps?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: New Ren'Py Stand-Alone code editor

#3 Post by YiuKorochko »

PyTom wrote:Actually, you can. Look at the jEdit.editor.py file in the launcher directory. What's more, Ren'Py will scan for editor.py files, and let the user pick from them...May, perhaps?
Oh you can? I see, very useful. Though I think my installer will simply ask for the Ren'Py directory and patch the editor files to make things easier for users. And May...yes, perhaps. I'll have my A levels in May, but for Sakkaku ni Dasu I need to further develop my manga/anime style and skills so I can put "RenCoder" on a higher priority and try to get it done my the start of May. The highlighting syntax will actually be the hardest part to implement for me. Might just switch to C# if that ends up being the simpler solution.
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: New Ren'Py Stand-Alone code editor

#4 Post by YiuKorochko »

Icon created.
RenCoder Icon
RenCoder Icon
RenCoder Icon.png (76.06 KiB) Viewed 2745 times
Will be converted into multi-paged .ico file in MicroAngelo Studio.
I just thought: I'm building RenCoder in Windows...I suppose most Ren'Py users are running windows anyway...
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: New Ren'Py Stand-Alone code editor

#5 Post by Jake »

YiuKorochko wrote:The highlighting syntax will actually be the hardest part to implement for me. Might just switch to C# if that ends up being the simpler solution.
Presuming you're working in VB.NET, as per your signature - you might want to look at:

- ColorCode: a .NET syntax-highlighter, which seems to have a fairly straightforward RegEx-based highlighting approach, written in C#
- SharpDevelop: which is an IDE built in (IIRC) C# which includes syntax highlighting, and you can download the source from their site to see how they did it.
Server error: user 'Jake' not found

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: New Ren'Py Stand-Alone code editor

#6 Post by YiuKorochko »

Jake wrote:Presuming you're working in VB.NET, as per your signature - you might want to look at - ColorCode: a .NET syntax-highlighter, which seems to have a fairly straightforward RegEx-based highlighting approach, written in C# - SharpDevelop: which is an IDE built in (IIRC) C# which includes syntax highlighting, and you can download the source from their site to see how they did it.
Once again, thank you Jake! I had SharpDevelop on my PC before, but I never used it thus rid of it.
I never thought it would be important so thanks again. (And thank you, open source!)

I think I'll try out colorcode first though and see where that gets me.
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

luminarious
Veteran
Posts: 353
Joined: Thu May 01, 2008 1:12 pm
Projects: Winter, winter
Location: Estonia
Contact:

Re: New Ren'Py Stand-Alone code editor

#7 Post by luminarious »

YiuKorochko wrote:Icon created.
RenCoder Icon.png
An icon should be distinct and understandable at 16*16px. This one is blurry at 32*32. Please consult someone more artistically inclined before releasing the final version of the icon.

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: New Ren'Py Stand-Alone code editor

#8 Post by YiuKorochko »

luminarious wrote:
YiuKorochko wrote:Icon created.
RenCoder Icon.png
An icon should be distinct and understandable at 16*16px. This one is blurry at 32*32. Please consult someone more artistically inclined before releasing the final version of the icon.
It's not final yet. And smaller versions wont have the same picture, it will be different picture containing either the color set copper and Ren'Py or RC in their respective colors on the large image.
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: New Ren'Py Stand-Alone code editor

#9 Post by YiuKorochko »

Converted through MicroAngelo and added more images.
Final:
RenCoder.zip
Final edition of RenCoder icon for Windows.
(231.96 KiB) Downloaded 41 times
To view all included sizes, use IrfanView. (IrfanView Home Page)
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: New Ren'Py Stand-Alone code editor

#10 Post by YiuKorochko »

Icon implementation/look:
(16x16)
16x16 icon
16x16 icon
16x16.png (7.44 KiB) Viewed 2714 times
(32x32)
32x32 icon
32x32 icon
32x32.png (11.33 KiB) Viewed 2714 times
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: New Ren'Py Stand-Alone code editor

#11 Post by YiuKorochko »

Visual implementation near complete (unknown changes, considered complete for now):
Screen.png
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

Sin
Veteran
Posts: 298
Joined: Thu Oct 18, 2007 3:43 am
Contact:

Re: New Ren'Py Stand-Alone code editor

#12 Post by Sin »

A friendly advice from a fellow programmer: if you're already spending time on the icon, you need to reconsider your priorities dude. Most of my failed projects failed because I let myself get distracted by surrounding things rather than solve the core problem. I think you're understating the amount of work required to create a tool that people will actually use.

I don't think there's a need for yet another text editor unless it adds anything new that the users needs but lacks. What the Ren'py community really needs is an intelligent IDE with code completion i.e. "Intellisense" and tools that lessens the amount of code an author has to type. Syntax coloring is helpful, but it does not an IDE make.

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: New Ren'Py Stand-Alone code editor

#13 Post by YiuKorochko »

Sin wrote:What the Ren'py community really needs is an intelligent IDE with code completion i.e. "Intellisense" and tools that lessens the amount of code an author has to type. Syntax coloring is helpful, but it does not an IDE make.
The core code of the program will be a library. I am currently designing a library of Ren'Py terms and etcetera and placing them in a second form which will appear above (or below) the cursor. In this form are all the terms available with the typed characters, and double-clicking one of the terms in the form inserts it automatically. I'm going to make it as close to Visual Studio / Sharp Develop as possible. Syntax Highlighting will have to be done on a later date, but for now typing "i" and having "init", "insert", "if", "if_changed" and etcetera pop up, as well as lines containing "init", "label", etcetera will auto insert a colon on the end of the line.
Pressing enter currently auto-inserts four spaces and if there is an "if statement" before the current position an extra four spaces are added. Typing "endif" will turn off the if statement and "endif" will be cleared.
Next is "menu:" indentation.
Plus if I'm looking at May as a release date and I'm doing this myself, I need to get the visuals done whenever Ren'Py sources aren't available.
Though I highly appreciate your input and I value your opinion, Sin. Don't worry visuals are done and all that's left is the library really. I just need to find a big list of all (or most) of Ren'Py's terms and maybe a short description for any unusual terms or whatnot.
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: New Ren'Py Stand-Alone code editor

#14 Post by Jake »

YiuKorochko wrote: In this form are all the terms available with the typed characters, and double-clicking one of the terms in the form inserts it automatically.
Visual Studio intellisense completes on a tab or even just when you hit space, period, open-bracket or some other after-the-current-symbol key when it's halfway through completing. I would advise that you have some keyboard way to autocomplete, because otherwise people will have to switch between the mouse and the keyboard, which would get very frustrating very fast. People who are practised programmers can usually type fairly well (even if they don't touch-type properly), and won't like having to shift their hands off the keyboard when they're writing code.

(I would also advise that a far more useful kind of intellisense is the kind which tells you which variables exist in the current scope, which is a lot more challenging to code than hard-coding a library of keywords.)
YiuKorochko wrote: lines containing "init", "label", etcetera will auto insert a colon on the end of the line.
Please make this feature optional! If there's one thing that will turn me off an editor very fast, it's features which are intended to 'help' me but prevent me from being able to simply type the same code I've always typed. So if you auto-insert colons, and I've already typed a colon because I've been coding Python for a while and I'm used to it, will I get two colons?
YiuKorochko wrote: Pressing enter currently auto-inserts four spaces and if there is an "if statement" before the current position an extra four spaces are added. Typing "endif" will turn off the if statement and "endif" will be cleared.
...and this sounds far, far worse to me than the auto-colon - you're talking about introducing new keywords that people have to learn just to use your editor! Couldn't you just allow a backspace to go back a whole level of indentation, and assume the 'if' is over?
Server error: user 'Jake' not found

YiuKorochko
Regular
Posts: 63
Joined: Wed Apr 14, 2010 7:44 am
Projects: Sakkaku ni Dasu (Delving into Illusion(s)) +18
Location: Behind you.
Contact:

Re: New Ren'Py Stand-Alone code editor

#15 Post by YiuKorochko »

Jake wrote:Visual Studio intellisense completes on a tab or even just when you hit space, period, open-bracket or some other after-the-current-symbol key when it's halfway through completing.
This will be implemented sooner or later. Just want to get the beta up for May, if I get it done before May then I'll go straight ahead with this.
Jake wrote:I would also advise that a far more useful kind of intellisense is the kind which tells you which variables exist in the current scope, which is a lot more challenging to code than hard-coding a library of keywords.
Yes, all defined variables will be added to the keyword set. The way I'm doing it, it's not actually very difficult at all.
Jake wrote:Please make this feature optional!
But of course! Those who make upgrades to their software or create dedicated software which changes the design method from the one originally created and makes it unchangeable are devious and evil. Any format changing things not available in jEdit will be checkboxes, on or off, off by default.(Until I fix the syntax highlight, it is disabled by default and won't do anything if it is enabled.)
Jake wrote:So if you auto-insert colons, and I've already typed a colon because I've been coding Python for a while and I'm used to it, will I get two colons?
No you will not. When the application starts, a global variable is created named "currentitem" which is set to null ("").
When a key is pressed with the richtextbox focused, currentitem = currentitem & e.keycode, thus it will read if you type double colons. Pressing the space, enter, up, down, left or right key sets currentitem to null ("").
Now unless double colon serves a purpose in python, RenCoder will auto-correct it.
Jake wrote:The endif thing sounds far, far worse to me than the auto-colon - you're talking about introducing new keywords that people have to learn just to use your editor! Couldn't you just allow a backspace to go back a whole level of indentation, and assume the 'if' is over?
Very good point. I'll change this method to analyse for four consecutive backspace strokes.

Thank you for your input, Jake!
Please fell free to ask more.
Sakkaku ni Dasu (錯覚に出す)
Programs I'm working on can be found here.

Post Reply

Who is online

Users browsing this forum: No registered users