# Creating AS IDE; thoughts?

This topic is 2607 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello folks! I've been lurking for some 4-5 months now and figure it's time to post. To WitchLord et all - AngelScript is brilliant! I can't tell you how exciting it's been to use.

Long post; edited for brevity but I had to include a lot of rationale too. Context: I'm an enthusiast programmer for some 8 years, gearing up for a tech college program (building maintenance doesn't cut it anymore ) and want to have portfolio material part way through the course if at all possible.
Question #1: Is anyone aware of a language parser that may not be perfect but weighs in under 5,000 - 10,000 lines? My brain's already packed, and ANTLR seems overkill.
Question #2: If nobody is aware of #1, would the approach I've outlined below seem to be the right one?
Question #3: Would anybody actually like to use this software? I hope the editor & my engine's binding methods would make for a great contribution, as I'd love to give back in some way. Trying to decide where to spend my time though!

I'm writing a cross-platform 2D game/GUI engine. In the process of writing scripts the most WYSIWYG editor I've found is Programmer's Notepad. My needs quickly outgrew what it provides. I realize 2D engines are very passé, so my goal has been to create a set of tools that allow complete novices to get a serious jump start on programming.

As such, I need to write an IDE and have completed a little mock-up in C# (see imperfect screenshot). Sheer simplicity is the main goal, with autocompletion being the lofty target. I'm sticking with C# because it makes my life easier and I can port to Mono later without massive headaches.

All the classes in the C++ engine implement a static method allowing me to bind everything quick & clean inside main(). After everything is bound and the scripts compile, a definition file is written containing symbols the binder & AngelScript are aware of. A snippet of this file:
 Operator(>>>) StatementEnd( Operator(,) BlockStart({) Var(GameInfo,Game) Var(ConfigFile,Configuration) Var(AnimationManager,Animations) class(WindowManager) Method(void,Run,) Method(void,Start,) Method(void,Render,) Method(void,End,) endclass() class(LayerManager) Method(Layer@,Create,) Method(void,Destroy,Layer@ which) endclass() 

Using some string search & regex kludges I can get syntax highlighting working fairly easily using this data alone. The big problem comes in when considering speed of (1) scanning script files to create symbols & (2) autocompletion. I'm currently splitting each script file into tokens (designated with start/end positions and retrieved with properties) and assigning them a loose type to start (function, variable, primitive, class, etc). This lets me use a TokenBrowser to jump around a pre-split file to resolve type names and determine which block I'm in, etc. Down the road, it should allow for relatively fast while-you-type insertions into the token list to provide an experience similar to what Visual Studio is capable of.

Leading to Question #4: In essence, I'm trying to decide whether I'm going about this all wrong. If the general opinion is that this is a redundant idea that will land 2 downloads, nothing to give back to AS, and strange glances from future employers, I'll be off to the next thing. If there's even a glimmer of hope for such a tool's use I'll keep plugging away though! Any advice is welcome.

##### Share on other sites
I would like to see that happen, although I have found a reasonable substitute. See http://www.gamedev.net/topic/594639-symbols-table-andor-syntax-tree/page__view__findpost__p__4806355

Some screens with autocompletion and code definition lookup:
[attachment=2525:vcp.png]
[attachment=2526:vcp2.png]

##### Share on other sites
I'm also developing AS IDE in our company . It's integrated with our game engine (which we are currently creating), here is one screenshot:

You can view variables values, classes with it's properties, step in, step out, step over, change values on the fly . My "intellisense" is not ready yet, but it can show you function/method arguments in tooltips . Oh, and it also highlights syntax .

##### Share on other sites
@ TheAtom: Aye! The target people who may use my little system are very unlikely to have Visual Studio. Hence putting in the effort .
@ virious: In my lurkings I've seen plenty of your posts - glad to hear this is your goal too! Out of curiosity, what language are you developing in? Are you using a similar approach?
@ the unspoken: Still messing with this as time permits.

Thanks for the feedback so far!

##### Share on other sites
This AS IDE is created in C++/CLI (aka Managed C++). We will by using it only on Windows, so I don't have to worry about portability . For syntax highlighting I'm using ScintillaNet library.

##### Share on other sites
DescenderX: so far the only version of MSVC that I tried and where it worked is 2008 Express, which is available for free - if that's what you meant. I also explored other ways of creating (proper) IDE using MSVS SDK (keywords: isolated shell, irony language parser), but I was unable to find MSVS extension that provides Intellisense for some C-like language, something that could be used as a base for AS Intellisense support. I don't feel like having the time to develop this from scratch (and there's lot to learn on the way).

##### Share on other sites
I'd be very interested in seeing a generic IDE for AngelScript come to life. I've never really written an IDE, so I can't give much advice on whether you're going about it the right way or not. But you may be interested in seeing that AngelScript exposes a useful method ParseToken that you can use to break down the script file into the tokens that AngelScript understands. After that it is a pretty simple matter of identifying declarations that you want to use for syntax highlighting and code completion. The CScriptBuilder add-on uses this to identify declarations that it will then bind the metadata to.

Related to IDE's you may also be interested in knowing that I'm writing a CDebugger add-on for the new release, which I hope will become one of the standard ways of debugging scripts. You can already find the initial implementation of this in the SVN. I've plans to provide the debugger with pre-implemented support for remote debugging, though perhaps not in the first version.

1. 1
2. 2
3. 3
Rutin
16
4. 4
5. 5

• 10
• 14
• 30
• 13
• 11
• ### Forum Statistics

• Total Topics
631788
• Total Posts
3002356
×