Author Topic: [Dev] Evaluate  (Read 521 times)

Offline McTwist

  • Programmer
  • Forum VIP
  • Exceptional Member
  • **
  • Posts: 841
  • Reputation: 20
  • Scrambled eggs
    • View Profile
  • Alias: Tyzaack
  • Blockland ID: 9845
[Dev] Evaluate
« on: January 11, 2017, 08:46:41 PM »
As mentioned here, there was an interest in said Add-On named Evaluate. It first just spawned as an idea and then became just a concept of a functionality I thought was in demand for Blockland. A couple of months ago I got more ideas for the concept and started to write a bigger list of what I wanted it to have. I'll write down here, as I've done with my other projects, all my ideas, issues and conclusions.

The concept with this Add-On is to give developers easier tools to develop better Add-Ons for Blockland where it seems feasible. Currently I have only made a prototype to test and see what can be done and the rest is still ideas that can be done.

  • Auto reload of scripts determined to be executed. That is, if you mark a file to be reloaded, it will sense changes to that file and then execute it. This gives the possibility for creating scripts in your favorite editor and when you save, it will instantly be available within the game. This can also be done with Add-Ons to be reloaded. Default setting will make it work like my previous Add-On LoadAddOn with reloading of datablocks and such, but that could of course be added so you could disable it globally or for each script you're deciding to load.
  • Each functionality should be able to be toggled to so that changes to settings is always saved to ensure correct behavior between changes.
  • Call events manually so you can test them out. This might even allow to try out functions directly.
  • Put trace on only certain functions. Sometimes it's a pain to go through the log because putting a trace in the console and then try things and then disable trace will make it really hard to find one handful of functions among a thousands of calls.
  • File manager. Why not have access to all files in Blockland folder? Of course, there's some limitations, but this is more trivial than one might think. Someone made a Notepad that got a similar functionality.
  • Modify certain values. That includes brick groups, trusts, players, clients, etc... It could easily be anything that you probably want to change or check data from. On top of this you might be able to create false data, like fake clients and players. That is the hardest part and might result in several issues.

Of course, I stumble upon issues that is worth a mention: The auto reload on scripts currently can only be used safely(No crashes) if the editor can save the file as atomic. Sublime Text, for example, does this by first saving to a temporary file and then rename the temporary over the current file. This could also be done for Add-Ons as the issue is in there as well.

Along with this there will be a difference between development of client and server. On your client, you can send and receive debug data for the server, but on the client itself you can manage it locally. Of course some may think that the server needs a global eval that you can access, but I think that is just a waste of power and instead give the user what it wants instead of sending the server script lines that is bloating the system. This system should avoid doing such things.



What do you guys think? Think this is useful enough? Need anything more? Is it something you will never use? I'm currently using the first functionality while I test out new smaller things to be developed and it makes it a lot easier to test out new things without having to restart Blockland or manually insert your script in console or execute a script.
« Last Edit: January 12, 2017, 06:33:28 PM by McTwist »
"I did not bump this topic. I was just late replying."

Offline Boom

  • Basement Dweller
  • Moderator
  • Jukebox Hero (Stars in their eyes)
  • ***
  • Posts: 5964
  • Reputation: 130
  • Changing the world one brick at a time.
    • View Profile
  • Alias: Deathwishez
  • Blockland ID: 9740
Re: [Dev] Evaluate
« Reply #1 on: January 14, 2017, 02:11:09 PM »
I'm sold on the idea of being able to reload on Add-On without restarting Blockland. That's become a real pain since v20.

Offline McTwist

  • Programmer
  • Forum VIP
  • Exceptional Member
  • **
  • Posts: 841
  • Reputation: 20
  • Scrambled eggs
    • View Profile
  • Alias: Tyzaack
  • Blockland ID: 9845
Re: [Dev] Evaluate
« Reply #2 on: January 15, 2017, 10:56:56 PM »
Well, I did went through my LoadAddOn Add-On and added extra functionality for loading certain Add-Ons. I don't really know if it really will help the instability it had. However, as this is only for development purposes, it is strongly recommended to not use it on production servers. I'll leave a disclaimer when I release this so people cannot blame me for their idiocy.

I just noted that this functionality is the biggest feature of this Add-On. I would be happy if there was more bigger features, but I'll see what I can find out later on in the future. It would be fun if other developers could give ideas of new additions.
"I did not bump this topic. I was just late replying."

Offline Boom

  • Basement Dweller
  • Moderator
  • Jukebox Hero (Stars in their eyes)
  • ***
  • Posts: 5964
  • Reputation: 130
  • Changing the world one brick at a time.
    • View Profile
  • Alias: Deathwishez
  • Blockland ID: 9740
Re: [Dev] Evaluate
« Reply #3 on: January 19, 2017, 02:16:52 PM »
Why not release these as separate add-ons? They each hold enough weight to stand on their on.

Offline McTwist

  • Programmer
  • Forum VIP
  • Exceptional Member
  • **
  • Posts: 841
  • Reputation: 20
  • Scrambled eggs
    • View Profile
  • Alias: Tyzaack
  • Blockland ID: 9845
Re: [Dev] Evaluate
« Reply #4 on: January 20, 2017, 10:52:56 AM »
That is indeed a very interesting suggestion. I have three problems with it, though:

1. I want the file manager to be able to load an Add-On or script on when clicking on it. This is still possible when splitting them up, but then I need to check if the Add-On is enabled or whatnot. Also, I've tested this sort of design before and people didn't really get it.

2. It's a complete pack. It should contains everything that you need to make your development easier and faster. If you split it up you'll miss out functionality you certainly will use any time.

3. Some of the functionality relies completely on previous functionality, which makes that you need to implement it into that Add-On anyway, and then there's two functionality in one Add-On instead of one, as you suggested.

Of course, there's the possibility that you may be able to pick the package you need and ignore the ones you don't really need. But then again, why did RTB give a whole package instead of several Add-Ons?
"I did not bump this topic. I was just late replying."