Just Javascript?

We are always looking for new tools to create to help facilitate the table top gaming experience. Let us know if you have an idea for a new gaming tool you'd like to see. (Note: this is NOT for feature requests on existing tools!)

Moderators: dorpond, trevor, Azhrei

Post Reply
User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Just Javascript?

Post by jay »

Is javascript going to be the only scripting language? I was hoping we could use something a little more functional. The one that I'd like to use is Groovy, but I'm open to any of the other scripting languages available in Java. I've got no problem in supporting multiple languages, but that can be difficult to do and require lots of extra downloads by users.

Groovy has been approved by the JSR process, which made it a pretty well defined language. The quick description: "Groovy includes features found in Python, Ruby, and Smalltalk, but uses syntax similar to the Java programming language." Some of its syntax will make access to properties in the game very simple. To do something like get the AC bonus for token Yuridin the syntax would be

Code: Select all

Yuridin.ACbonus
It also supports syntax to access this data directly from a string:

Code: Select all

println "${Yuridin.name}'s AC bonus is ${Yuridin.ACbonus}"
You can place any type of reference within the string, including method calls in java or other goovy methods

Code: Select all

println "${Yuridin.name} attacks with ${Yuridin.currentWeapon} and does ${roll Yuridin.currentWeapon.damage+Yuridin.currentWeapon.damage} points of damage."
This seems to fit in with what we have been talking about doing for the macro command line, almost exactly.

User avatar
giliath
RPTools Founder
Posts: 275
Joined: Tue Jan 31, 2006 11:10 am
Location: Austin, TX

Post by giliath »

The main reason we have been looking at javascript as opposed to one of the newer scripting languages like Groovy is that more people are familiar with javascript (including me). I have integrated javascript before (DMTool uses it) and would want to make a cross-tool decision. I will take a closer look at Groovy this weekend though.

Something else Trevor mentioned is groovy libraries are about 2MB versus 800k for javascript. We gotta be careful about download size.
~Giliath

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

I'm open to looking at groovy. It's a bit more powerful, and from what I can see is just as simple to embed as javascript.

I'm curious what the community thinks.
Dreaming of a 1.3 release

User avatar
rkathey
Giant
Posts: 116
Joined: Sun Feb 05, 2006 11:25 am
Location: Austin/Tx
Contact:

Post by rkathey »

It doesn't matter to me one way or the other as long as I have access to data (and methods) associated with tokens, character sheets, and maps in a user friendly way. The syntax for accessing the data (and methods) should be understandable I have to learn a new scripting language regardless.

The reason I put the parenthetical (and methods) in there is I'm not sure this is a good design but it would certainly be nice from and OO standpoint. That way I coud do a Ordac.RollAttack("Long Bow") and let the character object calculate its pluses. The problem with this is that the DM would have to have non-hackable character sheets. On the other hand, access to some public methods on the tokens and maps would be nice. For the first cut, however, access to the data is probably enough.

Whatever is chosen should have ample examples and documents online with an active user community on which we can lean. It should be widely known and adopted. Something that is embedable in html documents is a nice value added. Bleeding edge isn't required but something on its way out isn't good either.

Another 2 cents
Meanwhile, back at the ranch, the RPTrolls are readying another attack of proposed functionality on the developers.

Killydd
Cave Troll
Posts: 32
Joined: Thu Feb 02, 2006 10:56 pm

Post by Killydd »

Honestly, I think that just making sure that rolls are viewable is the biggest help to avoiding cheating. the DM looks at the modifier, and if it seems fishy can look and add things up and find out exactly where it came from. The only thing that needs to be difficult to hack is the dicetool really. Anything else can just be double checked, whetherit was an intentional cheat or a dumb error "oops forgot that sickening gave me a -2 to THat"

steinkel
Kobold
Posts: 7
Joined: Mon Feb 13, 2006 4:29 pm

Post by steinkel »

I've sent to trevor an email with:

- easy plugins in "sleep language" working.
- irc client plugin
- irc diceroller bot plugin

I don't know if jython or groovy are easier, but sleep has an IRC code sample that implements an IRC client, and it is only ~200Kb so ...

Cheers.
Jorge González

User avatar
mudpyr8
Giant
Posts: 142
Joined: Fri Mar 17, 2006 10:53 am
Location: Michigan
Contact:

Post by mudpyr8 »

I'm more for Jython, just because I know python very well and for handling large data structures/lists and iterating over them python is tough to beat. However, at the end of the day, any scripting language support is great.

I know that in gaming we tend to have large arrays/lists of data and a language that can iterate over that list, or that treats it as a fundamental data type, makes coding so much easier. The data manipulation I can do in python on a list is outstanding and I haven't found any language that supports such code, other than lisp. I'll take a look at how groovy handles arrasy/lists.
Legendsmiths presents:
NOVA6, streamlined universal RPG where action happens at the speed of narrative
Narosia * Sea of Tears, a complete fantasy game powered by the Hero System.

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

If it weren't for the crazy download size, we could technically include all these scripting languages: /js, /py, /jy, /gvy

Including all the runtime engines would make the download expensive for those who don't use scripting.

However, potentially, and this is just hypothetically speaking, we could include a single scripting engine as the default, the one that will be used to write a lot of the core functionality, and then supply hooks for anyone to add in any script engine they want. It would then be up to the players to make sure they have the right script plugin installed.
Dreaming of a 1.3 release

User avatar
brisingre
Dragon
Posts: 382
Joined: Tue Jan 31, 2006 8:24 pm

Post by brisingre »

why don't you not put any scripting in directly, but put them as seperate 'upgrade' downloads so that people can dl only what they really use.
Chaotic Neutral means never having to say you're sorry.

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

We'd like to have at least one official scripting language built in so that people can start to use it immediately.

Also, we are going to start putting more functionality into scripts instead of hardwired into the tool, so it'll be useful to as part of the core engine.
Dreaming of a 1.3 release

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

brisingre wrote:why don't you not put any scripting in directly, but put them as seperate 'upgrade' downloads so that people can dl only what they really use.
Actually we can do that with the webstart, it supports lazy downloading. You're still going to download the whole thing from a zipfile though.

User avatar
rkathey
Giant
Posts: 116
Joined: Sun Feb 05, 2006 11:25 am
Location: Austin/Tx
Contact:

Post by rkathey »

I really like the idea of multiple script language support. It diffuses the initial group learning curve but you're going to wind up with different users with different scripting languages attemping to integrate them together. Should make things 'interesting'. :-)

I like the plug-in idea.

All that said, I'd rather have one script language sooner rather than wait a long time to have choices.
Meanwhile, back at the ranch, the RPTrolls are readying another attack of proposed functionality on the developers.

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

rkathey wrote:I'd rather have one script language sooner rather than wait a long time to have choices.
Agreed :)
Dreaming of a 1.3 release

Post Reply

Return to “Ideas for New Applications”