Ripping away the network stuff
by Joachim Carlsson · in Torque Game Engine · 04/12/2004 (9:46 am) · 8 replies
Hi guys
I would like to make a single player game. Does anyone have a clean torqueDemo base or something like that? I would like to rip away all non essential parts to make a single player game.
I guess I could just specify no network. But I guess then the demo would fail and it would be hard to build on.
So what I would like to have is a start up app somewhat similar to the torqueDemo that is compiled without the network parts included. I guess that would mean moving a log of the /server code to the client directory and merging a lot more :).
Anyone got any good starting points?
Thanks
Joachim
I would like to make a single player game. Does anyone have a clean torqueDemo base or something like that? I would like to rip away all non essential parts to make a single player game.
I guess I could just specify no network. But I guess then the demo would fail and it would be hard to build on.
So what I would like to have is a start up app somewhat similar to the torqueDemo that is compiled without the network parts included. I guess that would mean moving a log of the /server code to the client directory and merging a lot more :).
Anyone got any good starting points?
Thanks
Joachim
#2
this is non trivial.
and there is no point.
the networking is Deep within Each object.
basically every object derives from the network object.
there are loopback methods used when running locally.
you wont get anything from doing this, no performance ..
and surely no time saved.
04/12/2004 (9:54 am)
Dont do it.this is non trivial.
and there is no point.
the networking is Deep within Each object.
basically every object derives from the network object.
there are loopback methods used when running locally.
you wont get anything from doing this, no performance ..
and surely no time saved.
#3
04/12/2004 (9:55 am)
Its really going to be a headache to remove the networking. IMHO it simply isn't worth it. The networkign in Torque is extremely integral to the whole engine.
#4
This topic has sprouted up numerous times on the forums.
It is simply a waste of time to rip out all the network code for your singleplayer game, and in the end you wouldn't have torque, since torque is built in a way that has networking written all over it.
My suggestion to you is to just run a standard listen server (where everything goes through a loopback in the network code, instead of to a real network). Its much simpler, and it'll work just as good.
I think most people build on what is already present in torque when creating their torque games. This is also a good way to work if you don't have much experience with torque.
04/12/2004 (9:55 am)
Joachim,This topic has sprouted up numerous times on the forums.
It is simply a waste of time to rip out all the network code for your singleplayer game, and in the end you wouldn't have torque, since torque is built in a way that has networking written all over it.
My suggestion to you is to just run a standard listen server (where everything goes through a loopback in the network code, instead of to a real network). Its much simpler, and it'll work just as good.
I think most people build on what is already present in torque when creating their torque games. This is also a good way to work if you don't have much experience with torque.
#5
If you want to start with a base application without the network, you might try:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5162
But, as I said, you don't need to rip the network out, it's not worth it.
Stefan.
04/12/2004 (9:58 am)
This question comes up once in a while and the answer is always the same: don't do it, it's not worth it. You can create a single player game with TGE as it is, just don't allow other clients to connect. TGE uses a shortcut when runnging in a local setup, i.e. client and server on the same machine and the same TGE instance, so there is no noticable speed decrease. So, ripping the network layer out will cost a lot of time and work an will gain nothing. Or do you have something special in mind?If you want to start with a base application without the network, you might try:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5162
But, as I said, you don't need to rip the network out, it's not worth it.
Stefan.
#6
04/12/2004 (10:02 am)
Ok I got that one :). Ok going back to the loopback solution. What do I need to do to stop other clients from connecting and skipping right into the single player type of game ?
#7
04/12/2004 (10:02 am)
Starting from a base app won't help i'm afraid. Once you get to the point of "Mission loading" you will have to integrate the networking. Its just so inter-twined.
#8
dont start a server and no external connections will be accepted.
04/12/2004 (11:10 am)
External clients can only connect in the event that you have started a "server" so..dont start a server and no external connections will be accepted.
Associate Kyle Carter