Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Graal API (https://forums.graalonline.com/forums/showthread.php?t=81763)

Inverness 09-11-2008 06:17 AM

Graal API
 
The external scripted windows were supposed to eliminate the need for external tools. Stefan first predicted their release around Christmas. It is now September and they still haven't been released. At this point I'm not confident the external scripted windows will be released this year.

As a solution I propose a Graal API. This would appear in the form of a DLL file with the required C/C++ headers and library for dynamic linking. The DLL file would provide two general functions: script parsing and server communication.

For the script parsing, there would be one input function ParseScript(const char *script). The DLL file would allow you to specify callback functions that would be called during script parsing so your program would know when to load a tileset, gmap, or anything else that the level editor should be doing.

For the server communication, it would be pretty much similar to SendText() and OnRecieveText(). I don't think that needs anymore elaboration.

I believe this would take much less effort for Stefan to create than the whole external scripted windows. If it had been done back during Christmas we'd already have an up-to-date level editor with support for layers and GS2 and 32-bit PNG's.

Loriel 09-11-2008 02:32 PM

Quote:

Originally Posted by Inverness (Post 1422268)
For the script parsing, there would be one input function ParseScript(char *script).

const char* :\

I am not really sure what you are asking for, here. Do you essentially want the entire script engine and also the network code in a standalone dll? Would you not kind of need the rest of the Graal engine as well to actually do anything with the parsed script?

Inverness 09-11-2008 04:09 PM

Quote:

Originally Posted by Loriel (Post 1422313)
const char* :\

:rolleyes:
Quote:

Originally Posted by Loriel (Post 1422313)
Do you essentially want the entire script engine and also the network code in a standalone dll?

No, for level editing the dll would just have a parser that would notify your program when it should be doing something. The networking part would simply be what is available in the RC.
Quote:

Originally Posted by Loriel (Post 1422313)
Would you not kind of need the rest of the Graal engine as well to actually do anything with the parsed script?

This API would not support offline testing or anything like that. When used with level editor, it would simply be giving you a way to parse a script present in the level so that you can know when to load tiledefs or a gmap like with the current level editor.

Inverness 09-16-2008 03:03 AM

I'm suffering here without power or internet (currently using WiFi in random church parking lot) and ya'll aren't even nice enough to reply to my thread. D:

cbk1994 09-16-2008 03:07 AM

Quote:

Originally Posted by Inverness (Post 1423877)
I'm suffering here without power or internet (currently using WiFi in random church parking lot) and ya'll aren't even nice enough to reply to my thread. D:

Poor Inverness <3

Nataxo 09-16-2008 04:06 PM

Quote:

Originally Posted by Inverness (Post 1423877)
I'm suffering here without power or internet (currently using WiFi in random church parking lot) and ya'll aren't even nice enough to reply to my thread. D:

i feel your pain, once i had two weeks with only my itouch using wifi on random places...

Loriel 09-16-2008 05:52 PM

Quote:

Originally Posted by Inverness (Post 1423877)
I'm suffering here without power or internet (currently using WiFi in random church parking lot) and ya'll aren't even nice enough to reply to my thread. D:

I fixed a bug in your proposed API and you are not even nice enough to not rolleye at it :\

Yeah I do not really see this suggesting being all that useful. :(

Inverness 09-16-2008 07:35 PM

Quote:

Originally Posted by Loriel (Post 1423972)
I fixed a bug in your proposed API and you are not even nice enough to not rolleye at it :\

It doesn't have to be a constant to work, which is why it wasn't there the first time. The parsed script most likely won't be a literal.
Quote:

Originally Posted by Loriel (Post 1423972)
Yeah I do not really see this suggesting being all that useful. :(

This would help people develop their own tools on their own time rather than waiting a year for Stefan to release external scripted controls.

I've wanted an excuse to make a program in Python.

Loriel 09-16-2008 09:39 PM

Quote:

Originally Posted by Inverness (Post 1423990)
It doesn't have to be a constant to work, which is why it wasn't there the first time. The parsed script most likely won't be a literal.

It has to be constant to work with pointers to constant characters. It does not have to be non-constant to work, so it should be constant. Requiring that the character array is mutable is ridiculous (you would be unable to pass data from std::strings).

Quote:

This would help people develop their own tools on their own time rather than waiting a year for Stefan to release external scripted controls.
There is plenty of room for people to make their own tools without that dll, and the things you get out of it probably do not justify the effort involved.

Graal does not want people to write their own programs that mess with the protocol, so you are not ever going to get a dll that lets you talk to the server. (Perhaps you could set up something with the web-ish GS2 stuff? No idea, I never used it)

You could probably write your own minimalistic parser for gmaps and tiledefs or whatever in scripts, since if they are not hardcoded, and instead dynamic, you probably would not want them to be applied in an editor anyway. But I really doubt that the reason that no one made a third party level editor yet is that people would have to configure gmaps and tiledefs themselves.

Inverness 09-16-2008 09:50 PM

Quote:

Originally Posted by Loriel (Post 1424042)
It has to be constant to work with pointers to constant characters. It does not have to be non-constant to work, so it should be constant.

Thats a good point actually, I will remember it.
Quote:

Originally Posted by Loriel (Post 1424042)
There is plenty of room for people to make their own tools without that dll, and the things you get out of it probably do not justify the effort involved.

The DLL would take less effort than the external scripted windows, which is why I proposed it.
Quote:

Originally Posted by Loriel (Post 1424042)
Graal does not want people to write their own programs that mess with the protocol, so you are not ever going to get a dll that lets you talk to the server.

The functionality the DLL would provide for RC would be equivilent to the SendText() and OnRecieveText() functions.
Quote:

Originally Posted by Loriel (Post 1424042)
(Perhaps you could set up something with the web-ish GS2 stuff? No idea, I never used it)

Me neither, sounds like something to look in to.

Inverness 10-28-2008 02:04 AM

Bump.

I want to make an RC using wxPython, Inverness wants an API.

Skyld 10-28-2008 10:25 AM

It's not likely to happen. Sorry.

Inverness 10-28-2008 06:53 PM

Quote:

Originally Posted by Skyld (Post 1437038)
It's not likely to happen. Sorry.

I know, but nobody can say that I wasn't willing to help Graal when I start complaining about something.

Loriel 10-28-2008 08:10 PM

Quote:

Originally Posted by Inverness (Post 1437146)
I know, but nobody can say that I wasn't willing to help Graal when I start complaining about something.

You could work on gonstruct instead! That does not require non-free DLLs!

Inverness 10-28-2008 08:26 PM

Quote:

Originally Posted by Loriel (Post 1437168)
You could work on gonstruct instead! That does not require non-free DLLs!

If I decide to make a level editor it will be using wxPython, which makes it platform independent.

Loriel 10-28-2008 08:27 PM

Quote:

Originally Posted by Inverness (Post 1437180)
If I decide to make a level editor it will be using wxPython, which makes it platform independent.

gonstruct is platform-independent as well. :mad:

Inverness 10-28-2008 08:30 PM

Quote:

Originally Posted by Loriel (Post 1437181)
gonstruct is platform-independent as well. :mad:

Pfft, it's in C++, Python is more productive.

And I prefer wxWidgets over GTK+

Loriel 10-28-2008 08:36 PM

Yeah but at the end of the day you just have a bunch of python...

Inverness 10-28-2008 08:39 PM

Quote:

Originally Posted by Loriel (Post 1437189)
Yeah but at the end of the day you just have a bunch of python...

... that makes a level editor for Graal.

Loriel 10-28-2008 08:43 PM

Quote:

Originally Posted by Inverness (Post 1437190)
... that makes a level editor for Graal.

Then get on it already!!

Loriel 10-28-2008 08:46 PM

Quote:

Originally Posted by Loriel (Post 1437191)
Then get on it already!!

Seriously a lot more people need to write their own third party thingies.

DrakilorP2P 10-29-2008 09:42 PM

Quote:

Originally Posted by Inverness (Post 1437184)
Pfft, it's in C++, Python is more productive.

And I prefer wxWidgets over GTK+

Fanboy and proud!


All times are GMT +2. The time now is 04:59 PM.

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