[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] your game in the messenger
- To: pygame-users@xxxxxxxx
- Subject: [pygame] your game in the messenger
- From: "Michael Schmidt" <schmidtm524@xxxxxxxxxxxxxx>
- Date: Thu, 6 Mar 2008 17:27:14 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 06 Mar 2008 11:27:20 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=RTsCd5fEvnBU6QXadmTErdTc4++VtIWpBgJbSUou3D0=; b=kEo94izqYIcgWb0b+xJnhFavg0y1Dikz/4Rv7UZJ4XsabKyLQPu6MA8NxFDO0VJ/hC136cfvgEzmHJPJf1xoGUPWVvauGFcwYxFsI3QSN4VIJItVTRPboxYiVO1I2/qLTk7DwtRQ5baTHle6X1sb9vu2vCiMcaDSoIqg9Rfcxqo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=QHK7jOOaxhIRarAZZbRatHX/8/dSbbV2jKvpcKTjck0MvUUYml6qqFb+OrjYGmf+oMQs3HpuQwWGLxc4dYTAXApOwYsHXOSfcKVNpK4143jpD1aTllopVJ+u0EpRG5oqdwTvzc82dfvIpTcG7TPn9aEw9SHp2MJJHYRi1qHhCJY=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hello
We'd love to include some games as a networked game in http://retroshare.sf.net Instant Messenger V.04
Actually some python games are one of my favourite games.. so I adress to our list.
some games will be the first games we actually integrate, so the interface
is still a little bit up in the air, so if you have any good interface ideas
please send them.
So the proposal for integrating is:
(1) Retroshare provides all the networking, transport etc
and provides a simple C or C++ API for your python game to communicate with.
(2) Your game is compiled as a static library, and linked into retroshare for
the moment. as we don't have a plugin architecture written yet.
(3) Retroshare has a 'GameLauncher' which will work out who's
online and organise the players, and pass that information to your pyhton game.
(4) Your pyhton game is Launched in its own window in its own thread, and has
complete control of that environment. It just uses retroshares API
to exchange messages with peers.
(5) you can have multiple concurrent py-games if the/your library can
handle it.
A rough interface could be something like (or a C equivalent) :
class GameInterface
{
public:
/* start / stop (called from GameLauncher) */
virtual startGame(std::string gameId, std::list<std::string>
peerIds); /* in turn order (if applicable) */
virtual quitGame(std::string gameId);
/* send/recv msgs */
bool sendMsg(std::string gameId, std::string peerId, void *data,
uint32_t len); /* NULL peerId = broadcast */
uint32_t msgAvailable(std::string gameid); /* returns next
message length */
uint32_t recvMsg(std::string gameId, std::string &fromId, void
*data, uint32_t len); /* returns msg len */
/* information for pygame ... */
std::string getPeerName(std::string peerId);
};
Is this approach acceptable to you? Someone interested to see his game in the Instant Messenger launchable?
thanks for a feedback
Mike