Raknet

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
pricj004
Posts: 9
Joined: Fri Jul 28, 2006 6:52 am

Raknet

Post by pricj004 »

Is there any way to structure Raknet (as per Dave Andrews tutorial) so it doesn't have to be a separate program?

The tutorial has the server go through an endless loop waiting for connections. I don't want to structure it this way. Can it be done by using events or threads or something?

I would like it structured so I have a Server object which is created by a player when they want to create their own game (in a multiplayer FPS). Other players can connect to the server via it's IP, but the server player needs to be able to play as well (by connecting to itself), so an endless loop in the server module is useless.

Any ideas/suggestions?

Forgive me if this has been addressed somewhere else, but the search tool on this forum seems to ignore my keywords and return whatever irrelevant topics it can find. :D
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Re: Raknet

Post by Acki »

pricj004 wrote:Forgive me if this has been addressed somewhere else, but the search tool on this forum seems to ignore my keywords and return whatever irrelevant topics it can find. :D
This does not wonder, because this is an Irrlicht forum and not RakNet !!!
Have a look for a RakNet forum, please !!!
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
pricj004
Posts: 9
Joined: Fri Jul 28, 2006 6:52 am

Post by pricj004 »

Thankyou, I am aware of that. However, seeing as the tutorial was written for Irrlicht, I thought perhaps someone else had experienced the same problem and found a way to overcome it.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Well, maybe someone here has expirience with this...
So you may ask this in an Irrlicht forum...
But if you really want to ask an non Irrlicht related question, there for is an OffTopic forum avilable...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Post by AlexL »

You could have two classes in your application, one for the server and one for the client. Then when the player creates the server from their computer, they also create a client and connect to the server localy. With both the client and server running from the same application, this is how I am doing it with my class base and all works fine. Though none of my games have been online games, I have tested and had another computer connect in my testing. This should suit what you need just fine, hope it helps :)
Akano
Posts: 22
Joined: Thu Dec 29, 2005 6:19 pm
Location: Germany
Contact:

Post by Akano »

It can be done in many ways, threads will be a good one if you want to seperate it from the main one (your client game) but threads are a bit tricky and you should then reseach a bit as it is a little hard to tell all what is needed.
Post Reply