Store Language Stack
Posted: Wed Nov 23, 2016 9:49 am
The next step of my engine in my opinion is to open the door to more complex coding involving game owners to develop things like player market or auctions.
For that a couple of things need to be implemented like:
- Being able to show a "dialog"
- Being able to put some stuff on the dialog with input boxes, buttons and more
- Being able to process those inputs and react to the buttons
- Being able to save data for the game like "object on sale", query, update and delete those entries
Up to the last point all is pretty clear and easy to implement even if you will not use HTML to fill the form but more an enhanced BB code to avoid XSS and nasty JS injections.
The last point however requires async calls, as the call will basically call back the backend and receive the data from it. Ideally the script should be blocked till the result come back and therefore makes the script coding much easier like:
To be able to do that, I need to store my script stack after the Storage.Select and restore it when I get the data from the server, however I believe I will have to heavily touch my scripting language to be able to do so. Annoying.
What do you think? Would you prefer a linear call like in this example or a system with callbacks?
For that a couple of things need to be implemented like:
- Being able to show a "dialog"
- Being able to put some stuff on the dialog with input boxes, buttons and more
- Being able to process those inputs and react to the buttons
- Being able to save data for the game like "object on sale", query, update and delete those entries
Up to the last point all is pretty clear and easy to implement even if you will not use HTML to fill the form but more an enhanced BB code to avoid XSS and nasty JS injections.
The last point however requires async calls, as the call will basically call back the backend and receive the data from it. Ideally the script should be blocked till the result come back and therefore makes the script coding much easier like:
Code: Select all
var toShow="";
var query=Storage.Select('itemsOnSale');
while(Storage.NextRow(query))
{
toShow+=Storage.GetValue('Name')+"\n";
}
Display.Dialog(toShow);
What do you think? Would you prefer a linear call like in this example or a system with callbacks?