![]() |
The Process of Scripting?
Every time I have started working on creating a server I have always started just making systems/scripts but I never did it in any particular order so nothing really fit right. I would always get to the point where I would say to myself 'How can I incorporate this with that.' and I would just get stumped and frustrated and either start all over or just give up. Here's what my question is; What process do you use when creating a server, by this I mean what do you make first then move on to making.
Quote:
|
Really it depends on the type of server you're going for.
|
Could I have examples of modern and rpg?
|
It doesn't sound like you are having an issue with what order to create them in, but rather how modules should interact with one another. A bad plan in terms of module interaction would lead to that feeling of things not fitting right.
How I think about the flow of my scripts is via. input and output, in their abstract senses. For example, input could be normal mouse/keyboard input, as well as input from the the server (triggerclients, detecting attr changes). Then, there would be some logic that combines different types of inputs, and eventually calls a function to ouput. Output would entail sending something back to the server, or to show an image, or to move the player. Within both the input and output modules I would likely have further submodules, but keeping the overall seperation helps very much in overall design. |
You work on the most critical aspect before you can move on to other systems, this is typically the MUDLib/Item System/Player Statistics as the starting point, then the systems underneath it (Damage, Movement, Equipment, Attack/Magic).
It doesn't hurt to work on prototypes of your HUD and other GUIs when you're working on the Statistics/MUDLib. This is by far the easiest part of creating a server though it's content that's a pain. |
Do a mindmap...and order it according to its importance
|
Quote:
|
Nah...first you need to plan the overall stuff and get to the inside as you progress...say, into detail
|
The hardest part is planning. When designing a server, think of all of the systems as one system since they will act together, and think up everything it will need to do, and leave room for it to do more things in the future (modularity)
|
Quote:
I think you're right, I generally create the weapons that involve around the player behind the scenes, then I create another weapon to display this information to the screen. The hardest part is thinking of the functions that you'll need. An example would be creating a weapon called "-Items" which every function inside this weapon would revolve around items (dropping, adding etc) and then another weapon such as the "Inventory" or "Trading" which would just call the functions from "-Items" to display the information. |
Quote:
|
1) Browse code gallery.
2) Browse collection of scripts I have gathered over time. 3) Copy. 4) Paste. 5) ??? 6) Profit! |
Quote:
HTML Code:
(@ "-Items").onDropItem(id, amount); |
Quote:
Also, player-joined classes have clientside functions if you put clientside functions in the class, lol. Just remember though, pretty sure all class-functions joined to a player are accessed by player.function, thus I tend to add functions that represent actions to a player(player.damage()), while putting item-related functions in a WNPC that is appropriately named(items.createitem()), as it would look odd for say, player.createitem(). |
So the only real pitfall is pretty much personal preference?
|
Quote:
|
Weapons are usually preferable since they don't have a few problems player classes on clientside have:
You will need to join the class to the player on clientside for the clientside portion to work. Quote:
PHP Code:
|
| All times are GMT +2. The time now is 12:06 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.