vbGore Free Online RPG Engine

Revolutionizing Visual Basic ORPG Development
It is currently Tue May 21, 2013 12:05 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Scripting
PostPosted: Mon Jun 29, 2009 7:51 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
So I've decided its time to implement scripting into NetGore. This isn't about what languages at all (I plan on supporting a variety of them), but how it is implemented, and what it controls. My lack of ability to decide how to implement it is likely due to never adding scripting before, and never using game makers and seeing how they use scripting (though checking out RPG Maker right now to help get an idea).

Anyways, I'd like to get some input from you all, either on how it should be done, or some programs I should check out that would give me a good idea of some good scripting. This includes, but is not limited to:
- What should be scripted
- What kind of control the scripts should have
- How much reliance they have on the code itself (ie: would you be able to create a whole new Entity purely with scripting?)

I really don't want to go overkill with the scripting, since it is an open-source engine and there is no way I am going to take the time to build the tools needed for an elaborate scripting system (ie an IDE, debugger, etc). Though I don't want to add a weak little scripting system that is so useless that it just becomes a hassle.

Right now, I'm not really looking for anything in particular. I am just trying to cover my bases as much as possible before implementing it so I can make it good and complete from the start.


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Mon Jun 29, 2009 9:05 pm 
Wozzle Woozle Wozniak

Joined: Mon Nov 12, 2007 10:17 am
Posts: 91
I would suggest using Lua for scripting it is easy to learn and use but has a very powerful API


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Mon Jun 29, 2009 11:21 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
scarra3 wrote:
I would suggest using Lua for scripting it is easy to learn and use but has a very powerful API


Thanks, but like I said, I'm not really looking for suggestions on languages.

After playing around with things some more, I am leaning more towards the idea of having scripting being for the non-general game features, and the game rules and logic hard-coded. So things like skills, modifiers (ie active spells), AI, and similar things would be scripted since they all just take a simple base and implement different logic (ie all spells are checked if they can be used, are used, then the costs are deducted from the user). I really don't see the point in scripting stuff that actually affects the engine more, like say in-game mailing, guilds, groups, etc. Different components of those could be scripted maybe, but doing that all in scripts just pretty much destroys any advantage you get from Visual Studio.

Though if that is all I am going to have scripted, is scripting even worth it then? One of the scripting languages I would support is C#, so its not like you'd have to learn anything new, but it still makes debugging and such harder. The only thing you gain is being able to reload the scripts without resetting the server, but still even that isn't going to be very useful since its not like an object can just be instantly replaced with the new script while retaining its state.


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Mon Jun 29, 2009 11:31 pm 
Illegal Operation

Joined: Sun Jun 07, 2009 3:09 pm
Posts: 417
Location: poririn-poriri-pori-pororocca
Scarra is right, but it probably shouldn't be restricted to lua as its a functional language. But yes lua is the de facto standard for scripting in big games.

I reckon scripting is vital for quests. There's no way im having 50 files in my IDE to organise, when i hardly have to work on them.

I think with scripting you want to aim to get as low logic as possible, aka keep it incredibly stupid. Also have as much syntactic sugar or as many abstractions as possible to avoid symbolic typing and understandable code for the ultimate beginner. The only object oriented code you want would be for entities, as in "entity.x", the rest of the time it should be kept close to procedural. This is to avoid people having to search which interface they have to access the particular procedure from.

I'm also checking out RMXP and RMVX for exactly the same reason. Although apparently their scripting mechanisms are totally different, so you might want to check them both out.

I'm going to orient my scripting mostly around quests, since for everything else i wouldn't see a use for it.


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Mon Jun 29, 2009 11:33 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
Mmm, didn't even think of quests. It could also probably be good for chat and server console commands, too. I guess I'll just add it and slowly more different parts to scripts where I see fit. Still interested in feedback, though.


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Mon Jun 29, 2009 11:59 pm 
Illegal Operation

Joined: Sun Jun 07, 2009 3:09 pm
Posts: 417
Location: poririn-poriri-pori-pororocca
Well the main thing is that you only add content with scripting and not features, otherwise you would end up with debugging issues. This is the main problem with scripting only engines, and you end up with crappy results too. Like having to type "/mine" to mine, and you end up with a swarm of bugs on the forums, because of the lack of design-time help from the IDE.

If you're going to add AI, you will most likely need mob commands. You want to avoid loops if possible. Items i think should be made solely using the engine, and then rather than having a huge table of buttons, you would just have a list of properties. Maybe you could add a little logic to the properties like, Damage = 10 and then below that Damage + 1 if Level > 5. But i would say no more than that.

I just remembered another one, Warcraft 3. IT has a great tool for developing maps / quests / skills and other things. If you haven't checked that out, you might want to. I've used it quite a lot too, blizzard usually makes great editors for things like that.


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Tue Jun 30, 2009 9:56 am 
Slave to the BB

Joined: Tue Jul 31, 2007 8:45 am
Posts: 3273
Location: United Kingdom
I'd suggest checking out some of the lua/gm custom scripts for WoW private servers that were used a while back (Not sure if they're still used or not, but I remember there was a lot of changes about this)


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Tue Jun 30, 2009 3:41 pm 
Slave to the BB

Joined: Sun May 27, 2007 6:54 am
Posts: 3110
Location: new york
viewtopic.php?p=71666#p71666


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Tue Jun 30, 2009 6:39 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
Completely forgot about that thread. :x


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Tue Jun 30, 2009 8:09 pm 
Illegal Operation

Joined: Sun Jun 07, 2009 3:09 pm
Posts: 417
Location: poririn-poriri-pori-pororocca
haha good one :D. But we would be totally necroing that thread right now. I think the situation called for another thread, seeing as spodi is almost into the implementation phase rather than just the feasibility phase. :)


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Wed Jul 01, 2009 2:09 am 
Slave to the BB

Joined: Sun May 27, 2007 6:54 am
Posts: 3110
Location: new york
of course, that's why i linked to my post specifically with the scripting suggestions i made. now that the engine is far enough along to actually implement scripting, some of the ideas people mentioned in that thread could be discussed and modified in this one to fit what spuds is looking to do.


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Thu Jul 09, 2009 6:32 am 
Slave to the BB

Joined: Sat May 12, 2007 6:20 am
Posts: 3842
Location: Behind you!
LUA is really for more user made things rather than scripting that aside here's what I have to say.

Basically I think scripting should be used for a bunch of small things that you don't necessarily want in the client but in some external file for the client to read from. For example holding everything in the database which is how vbgore did it requires the server all the time but much of those things shouldn't really matter. Ohh look at me I hacked a npcs x/y and now hes inside the building. Things that aren't necessarily an exploit if they could get hacked could easily be maintained in the client by scripting and it also lets you make quest changes patches etc without having to update the client. Now for quests there should still be server verification that they are getting done correctly but it can be greatly minimized in this way.

So, really I think it should be used to take a load off the server and database but not so much that it becomes a security issue. While also making patching the client a smaller job due to not having to update everything to fix small things.


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Thu Jul 09, 2009 7:15 am 
baka

Joined: Tue Jul 08, 2008 12:17 am
Posts: 2304
Location: England, UK
notexistant wrote:
LUA is really for more user made things rather than scripting that aside here's what I have to say.

Basically I think scripting should be used for a bunch of small things that you don't necessarily want in the client but in some external file for the client to read from. For example holding everything in the database which is how vbgore did it requires the server all the time but much of those things shouldn't really matter. Ohh look at me I hacked a npcs x/y and now hes inside the building. Things that aren't necessarily an exploit if they could get hacked could easily be maintained in the client by scripting and it also lets you make quest changes patches etc without having to update the client. Now for quests there should still be server verification that they are getting done correctly but it can be greatly minimized in this way.

So, really I think it should be used to take a load off the server and database but not so much that it becomes a security issue. While also making patching the client a smaller job due to not having to update everything to fix small things.

That's not really what scripting is for. It's more about saving time for the developer, or allowing people who aren't particularly familiar with the engine the means to add things like quests, items, npcs etc. to the game without having to spend months figuring out how everything works. It's very much a development stage thing and wouldn't really make a difference to the people playing the game (through reduced server load or whatever).

Scripting for quests, items, npcs and skills would all probably be really handy. It would save people a lot of time and work in my opinion.


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Thu Jul 09, 2009 11:52 am 
Slave to the BB

Joined: Sat May 12, 2007 6:20 am
Posts: 3842
Location: Behind you!
Kyori wrote:
Scripting for quests, items, npcs and skills would all probably be really handy. It would save people a lot of time and work in my opinion.

Um, that's what I said?


On second thought I don't see a need for scripting except for stuff that LUA was made for. Unless its going closed source that is which isn't the case here.


Top
 Profile  
 
 Post subject: Re: Scripting
PostPosted: Thu Jul 09, 2009 2:08 pm 
Illegal Operation

Joined: Sun Jun 07, 2009 3:09 pm
Posts: 417
Location: poririn-poriri-pori-pororocca
Notexistant are you saying that an npc's position should be determined by a script file client side, ARE YOU CRAZY?!

As for client side scripts maybe GUI that's it, quest dialog would be better if that sort of stuff was serialised into a datafile.

Also lua wasn't specifically made for anything, its just a functional programming language like ruby or python. It just so happens that its really useful for scripting games. As for server load scripting would probably have more load on the server, given the nature of lua, and having to interpret it. The only time it would ever take off the load would be lazy initalisation, but that isn't really useful from a server side perspective.

Why is there a need for scripting you say? Probably because we don't want content-only programmers raping our source code, and creating exploits. Scripting allows the lead programmer to create restrictions on what these programmers can do, and also isolate the code from the content. This means that i should just be able to delete all the script files and the game would still work without any problems, of course there would be no quests or whatever.




:D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group