Jump to content
  • Advertisement
Sign in to follow this  
FDsagizi

What are you thinking about refactoring AngelScript scripts?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Andreas!


I really love AngelScript!!!

But, i need to write scripts, many many code lines, and need to change, change code!

when code lines > 10, 20k it a realy problem!

What are you thinking about refactoring code ?

Share this post


Link to post
Share on other sites
Advertisement
You mean in terms of having an IDE to help automate refactoring, e.g. identify all locations where a function call needs to be modified, or renaming classes, etc?

I have no plans on writing an IDE myself, as I'm fully occupied with the library itself. Though if someone wants to do so I'll gladly aid with any features that might be necessary in AngelScript to make it easier to write that. Edited by Andreas Jonsson

Share this post


Link to post
Share on other sites
identify all locations where a function call needs to be modified, or renaming classes, etc?[/quote]

yes yes yes!

AngelScript have methods for work to debbug - it's greate work, easy implement !

and need functions to work with refactoring

where is definition( ctrl + mouse click )

where is use ( find use, rename, height light after select )

classes in this file ( see pix )


and if possible, work to intellisense, I do not know maybe it's done or not - because Information will need at the time of writing the script (which means the script will not compile)


class Dog
{
void Gav(){}
void Sleep(){}
void Update(){}
}

Dog a;

a. <- after wrilte '.' get type from var "a", and get all method's to show

Share this post


Link to post
Share on other sites
Is it possible to trick visual studio to run intellisense with Angelscript?

syntax is similar enough that it might just work.

Share this post


Link to post
Share on other sites
The implementation of these kind of things belong in the IDE.

There are however a few things that I'm planning on implementing in AngelScript that might help with the implementation of an IDE. One such is to add methods for querying where a function or other entity has been declared (i.e. script section and line number). I may also implement ways to enumerate what variables and functions that are accessed from a function.

Still, all that I will implement will only work on scripts that compile correctly. An IDE should be able to work with scripts that are not compiled too, so it needs to have it's own parser that can identify declarations etc on its own, without first compiling the script.

The code that is in the CScriptBuilder add-on shows how declarations can be identified without compiling the script, as this is used to collect the metadata for functions and variables before compiling the scripts.

Share this post


Link to post
Share on other sites
I've heard that codelite has support for intellisense with AngelScript code. I haven't tried it myself though, nor do I know if it is part of the stable release or if requires manual compilation of the codelite source code from a specific branch.

Share this post


Link to post
Share on other sites
Good news for Visual Assist X users!

Add *.as extension to HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\ at ExtSource

Code completion works, jump to implementation work, parses all files in project, Find references works, knows class methods and members, Renaming works etc... lots of stuff work.

why was i struggling with text editors :)

Share this post


Link to post
Share on other sites

The implementation of these kind of things belong in the IDE.

There are however a few things that I'm planning on implementing in AngelScript that might help with the implementation of an IDE. One such is to add methods for querying where a function or other entity has been declared (i.e. script section and line number). I may also implement ways to enumerate what variables and functions that are accessed from a function.

Still, all that I will implement will only work on scripts that compile correctly. An IDE should be able to work with scripts that are not compiled too, so it needs to have it's own parser that can identify declarations etc on its own, without first compiling the script.

The code that is in the CScriptBuilder add-on shows how declarations can be identified without compiling the script, as this is used to collect the metadata for functions and variables before compiling the scripts.


let's waitsmile.png

Share this post


Link to post
Share on other sites

Is it possible to trick visual studio to run intellisense with Angelscript?

syntax is similar enough that it might just work.


It definitely is: http://www.gamedev.net/topic/594639-symbols-table-andor-syntax-tree/page__p__4806355#entry4806355
Some more screens: http://www.gamedev.net/topic/603001-creating-as-ide-thoughts/page__p__4817006#entry4817006
It needs a bit of preparations to work (like making a tool to replace T[] with array<T> all over the code), but once they are done, it requires no further maintenance and the benefits are great - most of the msvs features work like gold.

Share this post


Link to post
Share on other sites

There are however a few things that I'm planning on implementing in AngelScript that might help with the implementation of an IDE. One such is to add methods for querying where a function or other entity has been declared (i.e. script section and line number). I may also implement ways to enumerate what variables and functions that are accessed from a function.

Still, all that I will implement will only work on scripts that compile correctly. An IDE should be able to work with scripts that are not compiled too, so it needs to have it's own parser that can identify declarations etc on its own, without first compiling the script.

That is great news to hear! Now I have to do many of this things by myself, adding them in the future to the library would clean up all the additional code I had to write for my intellisense sysem :).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!