Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
Script Editor

csp-games
Guest
Quote
2022-03-07 19:47:15

Hi Niko, I guess I don't have to mention that I like the copperlicht engine. But there's one thing that really turns out to be a bottle neck in the development speed available, and that is the little embed text editor for the special-execute Javascript action.

Sure it's ok to add tiny scripts, one liners etc. However, if a guy like me once comprehends the power of CopperCube using scripts, particularly to init the game "before first drawing" and also set up an onFrameEvent thread for the whole game logic, things are really gaining momentum - if there wasn't this bottleneck of having to open this tiny editor with 4 clicks, scale it to readability and visually search for the line (over and over again) I want to edit - which becomes increasingly difficult with code length.

Now here's my suggestion: make it a choice to use either this embed editor, or just a path to a script file one can have open in notepad permanently, and to apply changes one only has to hit ctrl-s. Notepad has Find and Replace, which is missing in the embed editor as well, and allows to set font and font size (old as I am comas and dots often are all the same to me). Or I guess it could also use Notepad++ with syntax highlighting etc.

The look alone would be much better, but certainly also the efficacy for coders.

So, I rarely make feature requests, but this simple yet effective one I make.


Robo
Guest
Quote
2022-03-08 04:00:15

Yeah, Im also not that keen to use the default javascript code blocks within Coppercube as I used to...

As metioned it has no syntax highlighting nor search and replace functionality nor any code validation (error checking) so I use NotePad++ for everything except for code validation in which I use https://esprima.org/demo/validate.html

I used to have blocks of javascript code all over the place and found begugging a total nightmare as you were told there was a problem (sort of) but not where it occured and what line of code the probelm was...so you were left to work it out yourself...

These days since I am using multiple separate ccb files for better memory usuage and loading speed etc I need to consolidate all code into one section for easy update and sharing across all ccb files. Currently building a single behavior that runs everything and so far looks good and more efficient and cleaner way to do it.

You can also have all that game code hidden in CC ccb files also in such a way that it cannot be extracted out gain...tested and does work..so no-one can access it.

I recommend to just use a single bahavior and within it you can run different parts at different speeds as normal yet its all there in one spot and easily searched and adjusted as needed.


csp-games
Guest
Quote
2022-03-08 16:41:50

That's a way to do it, thanks. I used that too, but it also prevents you from directly assigning scripts to certain events CC already monitors, or at least from using this kind of visual connectivity. Wow did I just say that? :) I'm getting lazy. Maybe it's more the fact that I want CC to keep track on what's the current version of script X and so on.

But I may end up doing exactly as you suggested.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact