Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Announcements (https://forums.graalonline.com/forums/forumdisplay.php?f=240)
-   -   Gs3 (https://forums.graalonline.com/forums/showthread.php?t=134268072)

fowlplay4 04-13-2013 05:03 PM

I still don't see why there's no 'with' statement in GS3. It helps clean up code and is very useful in GUI Building and other object work.

I.e. How I've used it in GS2:

PHP Code:

temp.window addWindow("Example");
with (temp.window) {
  
this.title "Example Window";
  
with (addButton(this"Button")) {

  }
  
with (addButton(this"Button2")) {

  }
}

function 
addWindow(obj_id) {
  
temp.window = new GuiWindowCtrl(obj_id);
  return 
temp.window;
}

function 
addButton(parentobj_id) {
  
temp.button = new GuiButtonCtrl(obj_id);
  
parent.addcontrol(temp.button);
  return 
temp.button;


Quote:

Originally Posted by devilsknite1 (Post 1716124)
but I would really like to see thorough documentation on this if other languages like Lua will not be used.

Even if he implemented Lua that isn't going to change the fact he still needs to document how the language works with and manipulates the Graal engine. A lot of GS2's current function usage isn't going to change that much in GS3 by the looks of it.

Loriel 04-13-2013 06:01 PM

I'm a bit of a PL nerd now rather than invested into a gscript codebase so I'm all for type system change for change's sake here. :)

I'm curious about first-class functions/closures, and what kind of polymorphism you're going to support. Also will there be generic user-defined types or is that only for dictionaries? Are you going for an llvm backend eventually?

Edit: Function-local type inference?

Edit: Also what happens when a gs2 script triggers a gs3 scripts and sends along arguments with the wrong types?

Loriel 04-13-2013 06:01 PM

Also **** y'all, varname:type is the best syntax

Pandar 04-13-2013 07:34 PM

...too easy.

Hezzy002 04-13-2013 09:41 PM

I think you should just use LuaJIT because it's fast, commonly used (More free developers for you!!). Whatever you make will be worse in every way.

Tim_Rocks 04-14-2013 03:45 AM

http://i46.tinypic.com/2v1noep.jpg

Draenin 04-14-2013 06:12 AM

Quote:

Originally Posted by Stefan (Post 1716075)
Hello Graalians,

We have just started the work on a new scripting project and want your ideas and feedback about it. The idea is to create new Graal Script version (GS3) which will make scripts faster and more fit for bigger projects.

http://replygif.net/i/939

Quote:

Originally Posted by Stefan (Post 1716075)
This first means some more work for scripters

http://replygif.net/i/827

Quote:

Originally Posted by Stefan (Post 1716075)
Scripts can run faster

http://replygif.net/i/726

Quote:

Originally Posted by Stefan (Post 1716075)
More reliable because it will complain when a variable has not been declared or is used incorrectly.

http://replygif.net/i/628

Quote:

Originally Posted by Stefan (Post 1716075)
We can possibly convert the scripts to other languages (C++, Javascript etc.)

http://replygif.net/i/193

Quote:

Originally Posted by Stefan (Post 1716075)
so it can possibly run in a browser in the future

http://replygif.net/i/837

Quote:

Originally Posted by Stefan (Post 1716075)
We are already working on a converter which helps to convert scripts from GS2 to GS3. So a lot of work will be lifted from the programmer, and you can also use this tool for testing how the new scripting will look like.

http://replygif.net/i/280

Quote:

Originally Posted by Stefan (Post 1716075)
existing scripts will still run, we don't force the new syntax and semantic, but it can be interesting for server-side logic and also new client-side code

http://replygif.net/i/218

Quote:

Originally Posted by Stefan (Post 1716075)
just add a //#GS3 line to your script to use the new syntax and semantic

http://replygif.net/i/386

Quote:

Originally Posted by Stefan (Post 1716075)
everything is still possible

http://replygif.net/i/149

Fulg0reSama 04-14-2013 07:30 AM

Quote:

Originally Posted by Draenin (Post 1716205)
-Images-

This was my reaction in a nutshell minus the browser statement reaction image.

Loriel 04-14-2013 07:57 AM

I dunno how offline development would even work anymore with half your systems running on the server. It'd be great to be able to deploy completely isolated dev environments loclly so you could use stuff like decentralized source control without bending over backwards, and it's not like in tyool 2013 the npcserver is such a trade secret that it can't be integrated into the client. Lots of multiplayer games with a singleplayer mode basically ship the game mechanics if not the networking bits of their server in the client. shrug.

Crono 04-14-2013 02:08 PM

Quote:

Originally Posted by Loriel (Post 1716211)
I dunno how offline development would even work anymore

it won't ;[

scriptless 04-14-2013 05:47 PM

Quote:

Originally Posted by Crono (Post 1716219)
it won't ;[

Yeah it wouldn't. A lot of things are now being done on serverside. For example if you tried taking GK offline, it would not work since most of it is serverside script and we do not have a NPC Server to use in combination to the level editor.

DustyPorViva 04-14-2013 06:00 PM

Quote:

Originally Posted by Loriel (Post 1716211)
I dunno how offline development would even work anymore with half your systems running on the server. It'd be great to be able to deploy completely isolated dev environments loclly so you could use stuff like decentralized source control without bending over backwards, and it's not like in tyool 2013 the npcserver is such a trade secret that it can't be integrated into the client. Lots of multiplayer games with a singleplayer mode basically ship the game mechanics if not the networking bits of their server in the client. shrug.

Just being able to do clientside would be good enough, in my opinion.

xXziroXx 04-14-2013 06:08 PM

Quote:

Originally Posted by DustyPorViva (Post 1716228)
Just being able to do clientside would be good enough, in my opinion.

Agreed. Scripting offline is mostly for newer developers attempting to learn the language, and I don't think most of us would've been here today if we didn't have access too it way back.

Admins 04-14-2013 09:53 PM

We more think of making a better tool for level editing. It should support basic attributes (drawunderplayer, dontblock) and joining of a class, but scripting should be done on server-side, possibly via web-based tools.

DustyPorViva 04-14-2013 10:19 PM

Quote:

Originally Posted by Stefan (Post 1716246)
It should support basic attributes (drawunderplayer, dontblock) and joining of a class

And >8bit pngs?


All times are GMT +2. The time now is 02:56 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.