View Single Post
Cpp

JCF Member

Joined: Mar 2001

Posts: 1,557

Cpp is doing well so far

Aug 3, 2009, 09:53 PM
Cpp is offline
Adding a scripting support is very possible, but there are a number of obstacles to overcome when it comes to implementation. I see two different stages here, the first one being an implementation of a scripting engine to a point where it actually works, and the second stage being the standardization. If you only plan to run scripts server side then that's the easy part, but it has many limitations. There are only so many things that server-side scripts can do to clients. For the real showdown you'd want to consider having the clients run scripts as well. When it comes down to running scripts, clients should have fewer priveleges than the server for obvious reasons. There's also a problem here i.e. how scripts interact over the network, how to sync client's scripts with the server's. These design decisions are yet to be discussed.

As for having clients execute scripts, we'll also need an easy way to transfer the given scripts between players. A good way would be to embed the scripts directly into a J2L so that the scripts get executed automatically when j2l is loaded, and that's in a way that doesn't crash games which don't yet support scripting. Another approach which just happens to be my personal favorite is how unreal-based games handle downloads, but that's some extra work. There are also certain security concerns here i.e. you don't want users to put malicious scripts in their levels, waiting for some unsuspecting victims to load them.

I have been working on a prototype scripting language implementation for jj2 recently and my progress is still in the early alpha stage (stage one). I haven't been very active recently, but I'll eventually release a pre-beta for people to play with. It will only support server-side scripts until it's mature enough for stage 2.


You can easily modify properties of any object with a scripting language. The only problem I see here are the limitations of jj2 i.e. you can't go beyond 127 health with this approach. Exit triggers are very possible, in fact you can trigger just about anything with scripted triggers (object spawning, death, music, level change, ammo, powerups, etc).
__________________
<a href="http://nmap.org/"><img border="0" alt="Nmap Security Scanner" src="http://images.insecure.org/nmap/images/prop/nmap_bnr_matrix_pfos.gif"/></a>