New TMW Server

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
nym
Novice
Novice
Posts: 116
Joined: 18 Aug 2004, 10:01
Contact:

New TMW Server

Post by nym »

Hey everybody, i back! (Yes, that means i can be assigned tasks now HammerBear :D)

I was just looking at the job tracker, and it seems like a few of the jobs would require some extra coding for Athena (or would be a pain to implement). Things like magic attacks, ranged normal attacks etc.. While it would be possible, it seems like alot of trouble when we are intending to write a new server for The Mana World. I suggest that we maybe increase the priority of a new server which will be custimized for The Mana World. We should also work on a design document about the protocol and different aspects of the server, allowing easier transitioning from Athena to it.

Any suggestions? It would probably be harer converting to a new server later on due to the fact many features which are to be implemented are done via Athena.
User avatar
Bjørn
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn »

Yeah we can increase the priority of our own server. There are at least these two things to be taken into account:

- To spread both bandwidth and CPU usage, we want to allow multiple servers to serve the same world simultaneously, to different groups of players.
- The protocol should consist of small packages, sent at low frequency. This could be helped a lot by using a different kind of player control than currently in place.

I've been thinking about server and client side scripting but it's probably best to keep the scripting server side and make the protocol flexible enough for our needs. Ultimately I'd like an object oriented approach where messages are passed from server side object to client side object and the other way around, but this could yield too much overhead.

So then the protocol will probably be like the currently used RO one, in that it consists of a list of messages together with specifications about when they can be expected or when they should be sent. A small start would be:

Client to server:

MSG_LOGIN { username, password }
MSG_WALK { x, y }
MSG_ATTACK { charId }
MSG_USE_ITEM { itemId }
MSG_USE_OBJECT { objectId }
...

Server to client:

MSG_MAP { mapName / mapId }
MSG_OBJECT_INFO { objectId, x, y, type }
MSG_CHAR_INFO { charId, x, y, health, maxHealth, ... }
MSG_PATH { charId, path } // Could be string encoded like "U2RD3L"
MSG_CHARGE { charId1, charId2, damage }
...

Specifying these messages can't be done without making assumptions about the implementation. In the above I was already assuming the client will only control one character. However in the case of pets that can be given commands the MSG_WALK and MSG_ATTACK will also need to pass the charId of the one that walks or attacks to the server.

I've probably made some errors in the messages above. To be more sure it'll work in practice we also need to write use-cases where client and server interact.

I think the implementation both on client and server side is best done using callbacks that are registered to handle certain message types. And then we should probably use SDL_net to abstract away from the OS-specific socket layer to write portable network code the easy way.
User avatar
Bjørn
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn »

I've added a more elaborate document about this to CVS. It should become available in ViewCVS within a few hours, developers can check it out through SSH already.

Link to ViewCVS: tmw/docs/server.txt
User avatar
nym
Novice
Novice
Posts: 116
Joined: 18 Aug 2004, 10:01
Contact:

Post by nym »

Looks like a good start :). I will read more closely after sleep, but so far it looks fairly good (since attacks, movement, etc. still need to be documented).
User avatar
Bjørn
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn »

Keep in mind that link above is to version 1.1. We're at 1.5 now, with minor changes made.
User avatar
maci
Knight
Knight
Posts: 507
Joined: 05 Dec 2004, 20:01
Location: Germany
Contact:

Post by maci »

yeah the server thingy has a lot of informations i read it this morning and agreed to almost everything there...
i guess there was on thing i didnt but i forgot it lol
maybe i will read it again
ElvenProgrammer wrote:Maci: don't be rude, we're here to help people ;)
Post Reply