Chiblue Posted September 14, 2010 Share Posted September 14, 2010 I am in the process of building a dedicated server for my game client... my problem is that all the information required by the server so that it can control the clients is contained within the scene.. What I would like to do is basically load certain classes from the scene, things like weapons, characters, spawns, bit controls etc... but I do not want to have the scene run on the server. Is there a way that I can load the entities I need from an editor scene file without having to establish a framewerk etc. Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
DaDonik Posted September 14, 2010 Share Posted September 14, 2010 Dunno if i got you right, but the .sbx file is just plain text. You should be able to read out any information, without running the engine?? Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Rick Posted September 14, 2010 Share Posted September 14, 2010 You would have to parse the sbx file yourself, and load that information into your own structures. You won't be able to load them into any LE structures without having graphics. So if you have a Gun class you can load the information from parsing the sbx file (which is just plain text) and create your Gun class on the server, but your Gun class can't use a TEntity anything like that. The downside to doing this is that you can't use any LE functions on the server if you don't want to init graphics. For example if you want the server to do a PointEntity() you would have to write your own version of it. If you want your server to have collision callbacks you would have to handle that all yourself. Quote Link to comment Share on other sites More sharing options...
Laurens Posted September 14, 2010 Share Posted September 14, 2010 I you want an actual pointer to a TEntity using LoadModel or something, then no. Basically all commands require that LE has been initialized and the server therefore needs to be SM3.0 compatible. You can however use some other networking library (SDL_net, RakNet) and read the SBX file by hand. It's plaintext anyway. Quote Link to comment Share on other sites More sharing options...
Chiblue Posted September 14, 2010 Author Share Posted September 14, 2010 Is there an specs or doc available for the structure of the sbx file? It would be useful to know what could be in there so I can build a process to handle anything I find and how it is structured? Also I will need dimensions of the models loaded...what do I need to intialize to use loadmesh? Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Rick Posted September 14, 2010 Share Posted September 14, 2010 Also I will need dimensions of the models loaded...what do I need to intialize to use loadmesh? You have to have a graphics card to capable to run LE to use LoadMesh(). Like we are saying any LE commands you cannot use on a server that doesn't have a graphics card. It's an all or nothing thing. There also is no spec for sbx. It's been described as obvious, and for the most part it is. Quote Link to comment Share on other sites More sharing options...
Canardia Posted September 14, 2010 Share Posted September 14, 2010 You don't need necessarily any LE functions on the server, but you can have a seperate Game Master client using LE which connects to the server and handles all other clients. Alternatively you can also integrate the server logic in the clients, then you don't need a seperate GM client. This would be actually more useful, since then the game works also in offline mode. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted September 14, 2010 Share Posted September 14, 2010 What Lum is saying is that you can't use anything LE API related at all without a capable graphics card, so in order to run servers you have to jump through hoops. If you want physics you have to do it yourself with a physics library. If you want to store data and manipulate that data you have to make the structures and methods yourself. You can't have any LE related API stuff without a valid graphics card. Quote Link to comment Share on other sites More sharing options...
Chiblue Posted September 15, 2010 Author Share Posted September 15, 2010 Sounds like fun... BUT I guess I will parse the sbx, pick up the models... load the mesh and get the AABB limits of the mesh for my AI collision... Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Laurens Posted September 15, 2010 Share Posted September 15, 2010 That would work but a server would need to be SM3.0 capable then. Don't know many that are. Quote Link to comment Share on other sites More sharing options...
Chiblue Posted September 15, 2010 Author Share Posted September 15, 2010 Sm3? I guess I should write a conversion routine that takes the scene and builds a config file for my server to load.. Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Rick Posted September 15, 2010 Share Posted September 15, 2010 This is what we are trying to say. You can't use any of LE without the machine you load it on having a LE capable graphics card. So the job just got more complicated. Quote Link to comment Share on other sites More sharing options...
Chiblue Posted September 15, 2010 Author Share Posted September 15, 2010 Alternatively you can also integrate the server logic in the clients, then you don't need a seperate GM client. This would be actually more useful, since then the game works also in offline mode. problem here is you hit a limit on the number of clients that can connect. Games like cod mw2 do this but you are limited to the number of clients if you want 50 or more clients you need a dedicated server. Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Canardia Posted September 15, 2010 Share Posted September 15, 2010 I meant you have still a server, but the server logic is in the clients. The server itself is only forwarding messages. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.