[Tutor] Adding network play to an open source game.
Timothy Sikes
trs5678 at hotmail.com
Sat Feb 9 05:21:00 CET 2008
Thanks for your advice. You're probably right, I do need to figure out sockets first... But it's a goal to work towards... I don't know if I would keep up computer programming if I didn't have a specific goal. A few things:
I have the author's email of konquer (it was in the source). I don't think he's actively developing it, but once I get to a nice start, I could try a nice email to him about it. You're also right, I don't know C++, but would like to learn it.
Anyone have any advice on good tutorials/books/examples of python network programming? I saw a cherryChat program that I can start to understand, anything else?
----------------------------------------
> From: keridee at jayco.net
> To: tutor at python.org
> Date: Fri, 8 Feb 2008 22:26:12 -0500
> Subject: Re: [Tutor] Adding network play to an open source game.
>
> I wish to warn you that I've never done anything like this before, but I
> have a couple of thoughts here. First thought is, network games tend to be
> slow because sending state information to everyone with enough frames per
> second to make it decent game play is a lot of information to send... So the
> least information you have to send the better. Fortunately, now that I read
> a little more closely... A board game is not going to be bad about this...
>
> Second thought is... start with simple sockets, work with the server model
> and the clients, do not mess with the game at first. Get dummy data to
> behave properly first before you ever try anything with the game itself.
>
> Third thought. C++ is a different language from python. This will further
> intensify your trouble. In fact, depending on your knowledge of C++, this
> could greatly intensify your trouble. You could have step two there going
> just perfectly, but getting python and C++ to talk could throw you in loops.
>
> I would say that generally for a programmer of a year, this seems like a
> very significant goal. Not only do you have to understand quite precisely
> what the C++ program is doing, (difficult especially in a game, IMO), but
> you have sockets to deal with, client, server, and just as difficult,
> C++/Python interaction. Also, given that you didn't write konquer~ someone
> else's code is harder to read than your own. Trust me.
>
> My suggestion is, if you are going to tackle this, very definitely take it
> in very defined steps. Work on sockets here, then C++/Python here, etc. I
> don't wish to discourage you, but I wouldn't try this yet. (Of course, I've
> never taken classes...) ;-)
>
>
>> Hi. First of all, I'm not an amazing programmer. But, I do have large
>> goals, somtimes too large. There is an open source game, konquer, (it's
>> on the ubuntu repos.) that I would like to extend with python to include a
>> network based game. But, I only know how to do simple sockets.... Is
>> this too big a project for first year programmer? (I've been programing
>> for 3, but have taken classes only one year.)The program is like a board
>> game. You move your fleets to different planets, one at a time. The game
>> is written in C++(I think).
>>
>> Just as a preliminary thing, I will go through how I think it will work.
>> One computer in the network will be designated as the 'server' that
>> everyone will send information to. Each turn, four pieces of data will
>> have to be sent to the 'server' that I can think of right now.: 1. how
>> many fleets have left 2. from what planet 3. going to which planet
>> 4.taking how long to get there. From there, the server will then issue
>> those to each player, and tell which player is next, and wait for his
>> reply.
>>
>> I don't really know how to start, so I guess I will start here.
>>
>> I appreciate your reply.
>> _________________________________________________________________
>> Need to know the score, the latest news, or you need your HotmailĀ®-get
>> your "fix".
>> http://www.msnmobilefix.com/Default.aspx
>> _______________________________________________
>> Tutor maillist - Tutor at python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
_________________________________________________________________
Shed those extra pounds with MSN and The Biggest Loser!
http://biggestloser.msn.com/
More information about the Tutor
mailing list