Page 1 of 1

Raknet

Posted: Fri Jul 28, 2006 7:00 am
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

Re: Raknet

Posted: Fri Jul 28, 2006 1:30 pm
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 !!!

Posted: Sat Jul 29, 2006 2:25 am
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.

Posted: Sat Jul 29, 2006 1:34 pm
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...

Posted: Sat Jul 29, 2006 6:47 pm
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 :)

Posted: Sat Jul 29, 2006 7:35 pm
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.