So I abandoned the low level, socket programing, multi-threading stuff. Panda3D supports it's own networking functions, and they work very well. I have 1 client, connecting to a server on a separate machine. The client (laptop) is around 40 fps, which is normal. The server is rock solid at 60 fps. It no longer blocks on network comms, and connections / disconnections are seamless.
Next step is going to have to be some way of identifying the login. For starters, I guess I can have the client just enter a user id number, which then translates to an id in the data structure for sending positions to the other clients. Eventually, that id code will map to a database primary key. The DB will hold all the player info, which will make the login process seem almost like a real game! HA!
I am going to try to set up a computer running the server code that is exposed to the outside world. I will not publish the connection info, but I will give it freely to anyone that asks. I don't want to expose it to people trying to crack the server is the only thought behind that. Before I can do that, though, I need to remove any display rendering from the server. I have cut out the planet, and I have removed collision detection for the player ship so far. Since the client handles collision detection and avoidance, there is no need for redundancy. Note that the server is not yet ready for public use. Don't ask yet. I will let you know. Also, once it does go live, it will go up and down frequently as I work on development.
So, to recap: Client/server is functional for a single client. Next steps:
1. uniquely identify each client so that each client can be rendered onto the other client displays. (assumes multiple client connections to the server)
2. Add the database code so that players status is persistent.
3. make the looting system functional so there is something to be persistent.
That will keep me busy for a while. Throw in there somewhere the process of making a public test server.
Ever onward and upward! Thanks for reading. I apologize for not having anything published for download and testing. If anyone *really* wants something to play with, let me know, and I will zip up the client and server code both, and you can run yor own pair. Note that it will work with both on the same machine, if you like.
-Joe
Tuesday, May 19, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment