Networking...

0 views
Skip to first unread message

RB[0]

unread,
Feb 5, 2009, 3:21:22 PM2/5/09
to GalaxyMage Redux Dev
Well, with a ton of help from Markus, FatalFred/durandal and a lot of
tutorials, we now have networking working in a passable manner.
There are of course things we can do to clean it up and make it work
better - but I think we are now at the point where development can at
least continue in other areas that have been waiting for this - I
intend to hit this hard starting next week (I have to be out of town
until then).

Cheers,
Matt

RB[0]

unread,
Mar 31, 2009, 4:44:01 PM3/31/09
to GalaxyMage Redux Dev
I have some good news, and some bad.
For the good, we have a chat client with a gui interface integrated
into a game state engine. To this point the networking has performed
admirably.

Now to the bad news. I am completely unsure how to continue the
development.
I have been chatting in IRC with saluk about how to proceed from here
in the networking department, but let me surmise the issue(s).

First, the goal to this point was to make a server that is versatile
enough to scale well for a monolithic server, like Wesnoth's main
server.
This server would accept new connections and allow you to join an
existing game or make a new one.
The server must also allow for individual servers to be run, either
for personal games when the main server is full (or not wanted) or for
singleplayer games.

Second, how to deal with ai and hotseat. Chatting with saluk he showed
that you can have multiple connections in a reactor - I did not know
this.
The problem is, to do that with pb (as we have) would create a new
client for each (I believe, I have not tested much of this though, so
if anyone with twisted knowledge cares to jump in :) ), which would
rebuild the whole game interface for each, or at the very least
require some significant hacking to be able to get to work.
Now, we could offload the ai to the server, which makes sense, but
then, we still have the issue of hotseat - swapping windows would not
be ideal.
Also, once we put that kinda of logical task on the server, the number
of games that can be run go down very quickly.

We discussed having mutliple players make use of the same client,
which would probably work, but that would mean either removing or
hacking around the twisted Avatar/Realm stuff - which kinda negates
their purpose, I think...

And finally, the game code, as it is currently designed, requires the
net stuff to be pretty much set, and not changing much to work on the
game code.

So, I am left in a rather annoying state. I don't have the expertise
in twisted to feel comfortable with the amount of work required to
make any of the ideas above work. Neither do I have the time to devote
at this point.
As well I would prefer to actually be working on the game itself and
get a release, than on the networking for a release maybe in several
months at the current rate.

So, we have a choice.
We can forge ahead with the current design for the game, which is
basically to get the server and client working really well then
implement the game on top.
Or, we can figure out another way to handle the networking that
doesn't interfere so much with the game and leaves it to be
implemented at a later date.
Or, we can ditch the networking for the moment.
Get the simple game engine going, loading maps, placing units,
fighting, simplistic ai, etc.

Personally, I prefer the latter. When I originally signed on to the
object it was to help in the graphics department, and after that the
game play itself. Now, having lost a few other project leads I have
accepted the position to try, one last time, to resurrect this project
into a great game.
Unfortunately, I don't have the time to implement everything we had
planned before in a reasonable amount of time, or in a clean manner.

The original game was not networked, it had hotseat and ai, until the
last version.
With the last version, though, the project lead left (I believe to
college) and the game itself was getting too large and unmanageable to
continue, and people slowly lost interest and it died.

I have a feeling this project is now going that way. Not the too large
part, as we are still just barely breaking ground. But the network is
fast becoming unmanageable/incomprehensible to me.
Also, I appear to be the only active member left, and I feel that
getting more people involved is the only way this project can
continue.
We need a release of some kind, a game of some kind that is playable,
so that we can get some more activity and continue.
I for one am losing interest in the project, at the current time, rate
of progress, and workload. I don't like that and hope this project
will continue.

So, what are people's opinions? Continue with the current design goal?
Ditch networking completely? Shift current goal so networking is not
such a main concern?
I hope that made sense for everyone... It has been a rather long few
weeks for me, so things may be coming out jumbled :S

Any thoughts?

Cheers all,
Matt

Markus Martin

unread,
Mar 31, 2009, 8:45:16 PM3/31/09
to galaxymage...@googlegroups.com
Hi.

> First, the goal to this point was to make a server that is versatile
> enough to scale well for a monolithic server, like Wesnoth's main
> server.
> This server would accept new connections and allow you to join an
> existing game or make a new one.
> The server must also allow for individual servers to be run, either
> for personal games when the main server is full (or not wanted) or for
> singleplayer games.

Right, a worthy goal which would serve the project well, I believe. To
my knowledge, there is no game in the vein of FFT/Disgaea with a
multiplayer environment. Plus, servers can easily be run headless
(i.e.: dedicated) and the door is wide open for custom servers with
custom rules.

> Second, how to deal with ai and hotseat. Chatting with saluk he showed
> that you can have multiple connections in a reactor - I did not know
> this.
> The problem is, to do that with pb (as we have) would create a new
> client for each (I believe, I have not tested much of this though, so
> if anyone with twisted knowledge cares to jump in :) ), which would
> rebuild the whole game interface for each, or at the very least
> require some significant hacking to be able to get to work.
> Now, we could offload the ai to the server, which makes sense, but
> then, we still have the issue of hotseat - swapping windows would not
> be ideal.
> Also, once we put that kinda of logical task on the server, the number
> of games that can be run go down very quickly.

I assume you mean multiple connections from a single client (a server
must obviously be able to accept multiple connections from different
clients!), which I can't see having a need for. It was ajhager's
original suggestion that AI players simply be their own client. There
really is not any additional overhead doing it this way as the network
interface that is exposed for human players is the same for AI and
simply boils down to function calls with the RPC-style PB.

Hotseat is quite simple. You just use the singleplayer client with
slightly different rules on the server end. In hotseat, it is always
"your turn", i.e.: the server accepts actions from a single client all
the time. Remember that there is very little logic on the client side,
it only displays what is going on in the game and sends input to the
server. It is up to the server to determine which team or unit is
allowed to move. The client only needs to act on these things for
superficial reasons, i.e.: to show whose turn it really is so valid
input can be sent to the server. Still, this is little code.
Everything else going on in the game logic-wise is not for the client
to know.

> We discussed having mutliple players make use of the same client,
> which would probably work, but that would mean either removing or
> hacking around the twisted Avatar/Realm stuff - which kinda negates
> their purpose, I think...

It seems that you unfortunately still do not understand the purpose of
the Avatar/Realm. These are just *permissions* they have *nothing* to
do with the client. I am sure part of the problem (and with Twisted in
general) is the names. They don't really describe what things do.
Anyway, here it is simply a matter of some Avatars having permission
to things that others do not have. This boils down to one Avatar can
call functions that another cannot. If a client tries to do something
that it is not allowed, it is simply ignored (ok, knowing Twisted
there is probably an exception, but that is easy to deal with).

For our purpose, we really only *need* two. An Avatar that has created
the game and thus has permission to shut down the game, or change
maps, or pause, or change the settings for playing on a new map. The
other Avatar represents other players joining and thus they do not
have permission to do any of the aforementioned things. For
singleplayer, the server is automatically started by starting a
singleplayer game thus making the single client the creator and giving
him permission over his own game. For (dedicated) multiplayer there
could be a simple password exchange that would give these priviledges
to a server admin.

> And finally, the game code, as it is currently designed, requires the
> net stuff to be pretty much set, and not changing much to work on the
> game code.

IMHO, the networking is only a very loose wrapper. You call a function
on the client side, the server receives it and passes it on to the
game logic (perhaps with some simple filtering at the server stage).
Same with the opposite direction. I believe this is very similar to
the MVC paradigm (Model-View-Controller), where the client is the
view, the game is the model, and the client/server code is the
controller.

> So, I am left in a rather annoying state. I don't have the expertise
> in twisted to feel comfortable with the amount of work required to
> make any of the ideas above work. Neither do I have the time to devote
> at this point.

I was under the impression that we already went through this stage. I
remember spending some good quality time working through the network
code with you. =)

> So, we have a choice.
> We can forge ahead with the current design for the game, which is
> basically to get the server and client working really well then
> implement the game on top.

I prefer this approach, simply because once it is done then we have
multiplayer for all time for free. I think the initial cost is also
much lower than you are expecting. Keep in mind that not going this
route would mean ditching the 3rd (or 4th?) generation of networking
code written for this project (mind you, they were all very similar).
IMHO, it is also a very bad strategy to try to shoehorn networking
into a working game where networking was not the original design. This
sort of networking setup has been used successfully in quite a few
games such as all the id games since Quake II, I believe, also all the
Half-Life games, and probably many more. Yes, these games are quite
clearly in a different genre, but the software architecture is what is
important and once the client/server code is up and running, the
majority of the work goes on in the server, and the client faithfully
does what it is supposed to do.

> Personally, I prefer the latter. When I originally signed on to the
> object it was to help in the graphics department, and after that the
> game play itself. Now, having lost a few other project leads I have
> accepted the position to try, one last time, to resurrect this project
> into a great game.

Ok, so you already have a full graphics engine implemented and
probably done better than if it had just been specific to GMR itself.
In fact, in terms of GMR, there is not much the rest of us could have
done without Pyggel being in the state that it currently is in (ready
to use). That said, I would be happy to work with you on getting the
networking going.

> Unfortunately, I don't have the time to implement everything we had
> planned before in a reasonable amount of time, or in a clean manner.

What's the rush? This doesn't have to be done in a week. People will
be interested just to see that *some* progress is being made.

> The original game was not networked, it had hotseat and ai, until the
> last version.
> With the last version, though, the project lead left (I believe to
> college) and the game itself was getting too large and unmanageable to
> continue, and people slowly lost interest and it died.
>
> I have a feeling this project is now going that way. Not the too large
> part, as we are still just barely breaking ground. But the network is
> fast becoming unmanageable/incomprehensible to me.

The interest level is pretty much the same as it was about a year ago,
yet here we are still.

> Also, I appear to be the only active member left, and I feel that
> getting more people involved is the only way this project can
> continue.

Hey, I am still here!

I completely disagree that "the only way this project can continue" is
by having more people involved. More progress has been made recently
than when we had 4-5 people on the project. Or have you forgotten all
the deadlocked debates in the early days of GMR? IMHO, it is better to
make sound design decisions now with fewer hands in the pie and then
when we get additional help, there will already be a framework for
people to start from.

> I for one am losing interest in the project, at the current time, rate
> of progress, and workload. I don't like that and hope this project
> will continue.

Well, I am sorry to hear that. I can only hope that whatever motivated
you to create a 3D graphics library nearly by yourself will motivate
you to also lay the groundwork for a playable game (a much more
exciting endeavor, IMHO).

-Markus

Ivan Vodopiviz

unread,
Mar 31, 2009, 9:33:05 PM3/31/09
to galaxymage...@googlegroups.com
I'm still here! I must admit I don't have much time to pour into this
project, but you're not alone RB[0]. My main problem is that I'm not
very fluent with Python nor Twisted and I don't have the required time
to get up to speed with you guys. Pyggel seems to be fairly
straightforward though, it seems very easy to use (even for a novice
pythonist like me). If I can lend a hand with something and that
something doesn't come with a fixed schedule, ask away :)

And I agree with Markus: A clean client/server architecture should
pose no problem for non-multiplayer modes. In many games, single
player are just loopbacked multiplayer sessions with a different rule
set. I believe this is also possible to archieve for hotseat modes,
although I can't see why we need that mode so much.

Anyway, you're not alone. I know I disappeared for ages, and I don't
have much to offer but oh well.... ;)

Keep it up!
--
Ren | | Merkoth

RB[0]

unread,
Mar 31, 2009, 9:39:08 PM3/31/09
to galaxymage...@googlegroups.com
Heya Merkoth - nice to see you :)
Yeah, you guys are right I think.
Having a kind of meeting in irc with Markus, FatalFred and saluk - and I think I got an idea in my mind of what was going to be needed for this that wasn't quite on with reality ;)

Cheers :)

Ivan Vodopiviz

unread,
Mar 31, 2009, 9:42:12 PM3/31/09
to galaxymage...@googlegroups.com
Server, channel?
--
Ren | | Merkoth

RB[0]

unread,
Mar 31, 2009, 9:45:39 PM3/31/09
to galaxymage...@googlegroups.com
#galaxymage on freenode.net

Jeremy Putnam

unread,
Apr 1, 2009, 8:59:09 AM4/1/09
to GalaxyMage Redux Dev
I'm still here as well! I've been busy recently with a move and
getting settled in but I've still kept an eye on this project and
would still love to contribute to the story and art.


On Mar 31, 7:45 pm, "RB[0]" <roeb...@gmail.com> wrote:
> #galaxymage on freenode.net
>
> On Tue, Mar 31, 2009 at 8:42 PM, Ivan Vodopiviz <merk...@gmail.com> wrote:
>
> > Server, channel?
>
> > On Tue, Mar 31, 2009 at 10:39 PM, RB[0] <roeb...@gmail.com> wrote:
> > > Heya Merkoth - nice to see you :)
> > > Yeah, you guys are right I think.
> > > Having a kind of meeting in irc with Markus, FatalFred and saluk - and I
> > > think I got an idea in my mind of what was going to be needed for this
> > that
> > > wasn't quite on with reality ;)
>
> > > Cheers :)
>
> > > On Tue, Mar 31, 2009 at 8:33 PM, Ivan Vodopiviz <merk...@gmail.com>
> > wrote:
>
> > >> I'm still here! I must admit I don't have much time to pour into this
> > >> project, but you're not alone RB[0]. My main problem is that I'm not
> > >> very fluent with Python nor Twisted and I don't have the required time
> > >> to get up to speed with you guys. Pyggel seems to be fairly
> > >> straightforward though, it seems very easy to use (even for a novice
> > >> pythonist like me). If I can lend a hand with something and that
> > >> something doesn't come with a fixed schedule, ask away :)
>
> > >> And I agree with Markus: A clean client/server architecture should
> > >> pose no problem for non-multiplayer modes. In many games, single
> > >> player are just loopbacked multiplayer sessions with a different rule
> > >> set. I believe this is also possible to archieve for hotseat modes,
> > >> although I can't see why we need that mode so much.
>
> > >> Anyway, you're not alone. I know I disappeared for ages, and I don't
> > >> have much to offer but oh well.... ;)
>
> > >> Keep it up!
>
> > >> On Tue, Mar 31, 2009 at 9:45 PM, Markus Martin <archw...@gmail.com>
> ...
>
> read more »

Robert Ramsay

unread,
Apr 1, 2009, 10:26:19 AM4/1/09
to galaxymage...@googlegroups.com
We could really use some art right now.  So that would help a lot.
--
Rock. Revolt. Rinse. Repeat. Robert Ramsay

RB[0]

unread,
Apr 1, 2009, 6:19:09 PM4/1/09
to galaxymage...@googlegroups.com
Yes.
Art help would be textures, and either 2d sprites or 3d OBJ meshes for units...

Glad to see so many people still here, I am most happily surprised, and definitely fell more like putting in the effort again into development :)
Reply all
Reply to author
Forward
0 new messages