.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 1 SDK (http://forums.bots-united.com/forumdisplay.php?f=33)
-   -   Supporting more than one player on the client (http://forums.bots-united.com/showthread.php?t=3134)

Lazy 05-12-2004 01:29

Supporting more than one player on the client
 
A few days ago I got an idea to allow upto 4 players to play half-life on one machine at the same time.
The view would be split either half/half or into fours depending on how many people are active at the time.
So far I have it able to render the 4 views while putting inactive ones out of map bounds and looking down to keep up the framerate.

I realize almost all of the network messages have to be changed aswell as saving/loading, ect but I have run into an odd situation.

How can I have extra players on the client control their players on the server?
I've thought about:

- TCP/IP Sockets
- Shared memory area
- Sending commands containing information ( ugly, I know )

What would any of you do to get the angles/buttons/ect to the server?

Note: This would have no online capability but would support co-op and deathmatch locally.

Added before submit: Wrong place? It still has to do with the sdk... bah, I'm confused.

Pierre-Marie Baty 07-12-2004 09:18

Re: Supporting more than one player on the client
 
I would go through TCP/IP sockets. The game DLL would control 1 real client and 3 bots, the real client would use the HL network protocol, and the 3 others another protocol of yours. The advantage is that you don't need to send much to the game DLL (only position, angles, velocity and buttons). On the other hand, I wish you good luck modifying the client DLL, because I foresee quite a lot of changes of importance.

Lazy 07-12-2004 22:23

Re: Supporting more than one player on the client
 
Yeah, quite alot will have to be changed. Luckily somethings can be removed which should cut down the workload.

- view.cpp: ALOT has to be re-written
- HUD/sprites: Have to be drawn using TriAPI so they can be scaled down to fit the small screens
- Scoreboard: Can be replaced with scores in the upper-left
- SayText: Removed
- Spectator: Removed

Hopefully I won't have to change any movement code but I think the hardest part will be the views since I'm really bad when it comes to math.

Thanks for the advice, I'm going to start working out a protocol right away.


All times are GMT +2. The time now is 15:52.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.