[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[glob2-devel] Glob2 API questions
From: |
Stéphane Magnenat |
Subject: |
[glob2-devel] Glob2 API questions |
Date: |
Sun, 24 Aug 2008 18:51:50 +0200 |
User-agent: |
KMail/1.9.9 |
Hello,
As Martin wrote, today we started Glob2 API for USL. I suggest we fix some
design issues with respect to SGSL interface. For now, I see two of them :
* unsafe "Press SPACE" function. This one is ugly, if not worst. It is the
only unsafe function. I propose to make it network safe by having a
generic "user event" mechanism for scripting. It will work as the following :
scripts can subscribe to user key event, and when user press the
corresponding key, the latters gets transmitted through a network message and
is delivered to the scripts (on all computers). This allows to implement the
current script behaviour plus ones such as "waiting for all the players to
press space". I suggest the following API :
- subscribeToKeyEvent(key:string)
- getKeyEvent(key:string) -> bool
* global stats v.s. area stats. I have implemented global stats through
teamstats. We should also have area stats. After a talk with Martin, it
appears that the latter would be best implemented with functions returning a
collection of units or buildings stats. That requires some helper from the
script glue for boxing/unboxing these stuff but it should be doable. I
suggest the following API :
- getUnitsStats(area:string) -> collection<UnitStat>
- getBuildingsStats(area:string) -> collection<BulidingStat>
What do you think ? do you like the ideas ?
Have a nice day,
Steph
--
http://stephane.magnenat.net
- [glob2-devel] Glob2 API questions,
Stéphane Magnenat <=