Contingency plan

General debates and discussion about the Guild of Writers and Age creation

Re: Contingency plan

Postby MustardJeep » Tue Feb 26, 2008 11:19 pm

Dang light switch. :evil:

Flip. :D

You downloaded faster then I could finish setting things up on my last test, the torrent is now running.
MustardJeep
 
Posts: 129
Joined: Thu Oct 04, 2007 1:31 pm

Re: Contingency plan

Postby Lontahv » Wed Feb 27, 2008 2:16 pm

How do you like the idea of having a modded C irc server as the base of the D'Nay server?

Like this:

Code: Select all
      IRC SERVER 
     |           |
clients       "Services"

 




So that the server can be a gate-way for data but doesn't need to process data. The "services" user is kind of like another client. What your client would if it, say wanted to get the current time would be to PM the "services" user and ask it for the info, then it would return the time. Each age would have a different #channel.

I'll work on some python examples, this does NOT mean that it has to be written in python. Since python is simple I hope that C programmers could kind of use my stuff as an example. :)

What about this server being written in php? It would make there not have to be a special server. ;)

~Lontahv
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Contingency plan

Postby Nynaveve » Wed Feb 27, 2008 3:31 pm

Would this slow things down at all? I'm afraid that the more we need to pass messages and ping other clients, the more we slow down communications between game/user/server. However, your idea seems pretty neat and clean. The trick is getting it to work. ;)
Guild of Maintainers Webmystress and Grand Master

Image
User avatar
Nynaveve
 
Posts: 171
Joined: Tue Jan 15, 2008 2:07 pm
Location: One step behind and two steps ahead

Re: Contingency plan

Postby Lontahv » Wed Feb 27, 2008 3:50 pm

I already have some stuff working, I think it would be good if we could just use a regular IRC server and then hook stuff up to it. Also, remember how I was talking about how we would have to include avatar id in each message? Not needed with IRC because It has the name built in. :) You can see for your self how much "Wasted" bits there is in meta-data. Here's the code for a IRC printer that prints out everything that's sent and received. All you need is to input your own values for the server you want to connect to.

Code: Select all
import sys
import socket
import string

Server="<server>"
Port=6667
Channel = "<channel>"
Nick="<nick>"
RN="<realname>"
ID="something"

readbuffer=""
sock=socket.socket( )
sock.connect((Server, Port))
sock.send("NICK %s\r\n" % Nick)
sock.send("USER %s %s bla :%s\r\n" % (ID, Server, RN))
sock.send('JOIN %s\r\n' % Channel)

while 1:
   RCVED = sock.recv(1024)
   print RCVED



There we go. :) Just connect to any server you want to, I have a testing server that I run on my computer but, you can connect to an server really. I don't think it will fry their server. :P Let me put it this way, don't use it on a server that you care about. :)

Oh and, just save that code and the file something like IRCprinter.py.

You'll need python, a sense of fun and some time to get it to work.

~Lontahv
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Contingency plan

Postby MustardJeep » Wed Feb 27, 2008 10:37 pm

Basing a server on IRC isn't that bad of a idea but you would then have to build yourself a parser to read out the body of the message. (I assume you would place the movement information, flags to run animations, and whatever else required there.)
MustardJeep
 
Posts: 129
Joined: Thu Oct 04, 2007 1:31 pm

Re: Contingency plan

Postby Lontahv » Wed Feb 27, 2008 11:40 pm

I've already written the parser. I now can get raw data about the user that sent the message, and the message. I have them is variable form. :) The program that I put online is only part of my testing suite I made for this project. :) Here's the format for irc when you send a message;

:<username>!<user address(ip etc.)> PRIVMSG :<Message>

Now let's input some info.

the message will be "POS 1,1,1" and the user will be Lontahv@somewhere.net ;)

:<Lontahv>!<lontahv@somewhere.net> PRIVMSG :POS 1,1,1

That's all the IRC format is. Easy?

~Lontahv
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Contingency plan

Postby belford » Thu Feb 28, 2008 10:20 pm

I've had a fair amount of experience running games over a Jabber server. (Jabber : open-source IM system.)

Jabber is all XML, which makes the parsing of custom data chunks really easy. There's Python Jabber libraries and stuff. (If you're thinking "XML -- yuck", remember that the library takes care of most of the XML stuff for you. You basically get messages as little DOM trees.)

This is not to say that creating an Uru-scale game on top of Jabber is trivial. :)
belford
 
Posts: 344
Joined: Sat Sep 29, 2007 7:18 pm

Re: Contingency plan

Postby Chacal » Fri Feb 29, 2008 11:35 am

These are all great concepts.

The choice of a low-level protocol (irc, telnet, etc) should be based on:
- a study on performance and security of the various available protocols for multi-player purposes.
- what server software exists for them, what architecture they follow, how scalable they are, how distributed they can be, etc.
- is there a readily-available high-level protocol (a network game protocol) that already uses them.

The choice of a high-level protocol is more complex and more dependent on the actual game and engine.
We have to consider things such as:
- What exactly should be client-generated and server-generated. Client-side prediction and server-side decision (such as collision detection).
- The contents and frequency of world updates.
- Predicted load (how many players to update x how much data in an update x frequency)
- Integrity checking.
- Encryption.
- Scalability, redundancy, high-availability, load-balancing.
- ...
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2515
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Contingency plan

Postby Lontahv » Fri Feb 29, 2008 4:50 pm

I think we should have a system for increasing the rate of updating depending on how much someone's moving. Ie. sitting still would have no data needed to be sent. And running would send more packets/sec than walking. :) I'm working on a 2d demo game for this system at the moment. :)


~Lontahv
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Contingency plan

Postby Lontahv » Fri Feb 29, 2008 5:07 pm

Not sure how much encryption we need for the server that going to be forwarding avatar positions; encryption = slower I think that encryption is a MUST for auth and chat. :) I mean, why encrypt a connection that the data looks like this:

1,1,1
1.02,1.8,.9
2.1,9.2,6.1
etc.

I think the key for this to work is opening a new IRC channel for every different age someones in. :) The logic would go like this;

cAge = ReadCurrentAge()
allchannel = getChannelList()
length = len(allchannel)
cAge = 0
foundage = 0
while cNum > (length+1) and foundage == 0:
if cAge == allchannel[cAge]:
foundage = 1
cAge =+ 1
cNum =+ 1
if foundage == 1:
assignToCurrentAgeGroup(allchannel[cAge])


Something like that for channel creation when needed. :) Haven't tried the code. Sure it's full of mistakes. :P


~Lontahv
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests