First Person Space Shooter:Networking,Collision,Movement

Ok I pressed 1 to start 3dnetwork.py as a server. The Q and E keys workd to roll. The right mouse button workd to fire and play a firing sound effect. Moving the mouse did move the scene around. But the stars stopped movng as soon as I hit the one key. Also the W,S,Y,A,D or left mouse button did nothing. It was like they were just stuck.

Yes they did stop… actually, the moving stars at the beginning before you press 1 are some kind of a bug…
after you pressed 1, everything is initialised properly.
And as I said, I’ve added a lot of things from the very first version until now…

The movement system is now similar to normal space shooters… you’ve got to adjust your speed in order to move at all.
As I said you’ll find the kemypping in the cfg file…

movement like w,a,s,d won’t work before you move forward.
To move forward you can either adjust speed manually or just press enter/return for full speed, backspace for fullstop or hold tab for booster…

You also might take a closer look at the primitive but informative HUD, on the lower left part of the screen is your speed-meter (from 0-200% with booster)
At the top left is displayed your Player Id along with the number of frags you’ve made.
also on the lower left is your healthbar.

And if someone joins the game, leaves it, or someone gets killed a message will be displayed at the top middle screen.

And of course there’s the radar, which is of no use at all if there aren’t any other players though.

Currently there are 4 sounds…

  1. engine
  2. fire
  3. hit
  4. explosion

:open_mouth: Tell me if you need a test server somewhen when trying a real internet based server… this seem to get an even more interesting project day by day :smiley:

Regards, Bigfoot29

Thanks I will take a look at the cfg file sometimes tommorrow. I am just too tired tonight.

Bigfoot, you know, I’m starting to love you :wink: (don’t take that too serious)

I was already asking myself where to find a server to host a dedicated game server… :slight_smile:
Of course I don’t have the dedicated server code yet, but that’s definitely on my to do list, as there’s no popular multiplayer game without dedicated servers on the net.

If you don’t have 3D code in your server application you can launch it right away. “pure dedicated” code is better, but for testing purposes it’ll be fine…

We can do the stuff how to do what later on. Tell me when you need what - I will have something ready. Especcially the ammount of RAM is of interest… - RAM is a limited ressource… :smiley:

Regards, Bigfoot29

Edit: In case you are interested in the reasons: A game like this was something I planned to do as well. Well, life went another way. - I barely have time for programming and when I do, I have several other projects to do first. :slight_smile:

Some of the networking code found here in the forums was “my” work… - along with a major improved Chatserver/Client that allowed 3D-Text-Chats (set position, “fading” - no text shown when out of reach and all that stuff integrated into a basic 3D client.) and even an distributed system with a p2p like server/client relationship - However I never came to the point of having the physics implemented…

I already stumbles accross your chat system, when I was searching for networkl examples. I actually liked the idea that you can’t read a message from a user that’s too far away. Well the code was too complicated for me at that time, but I never forgot about it, because there’ll have to be a chat system in the game, too. :wink:

I am still thinking about how to realize the actual dedicated server code.
I’ve got two ideas on that:

  1. create a server that handles all the collision detection, not only relaying datagrams, in order to prevent cheating…
  2. the server will only be relaying the datagrams, and keeps the variables. The collision detection will be done on every client, so if one client is cheating only one package will contain wrong data. It’s something like a distributed computing approach, assuming not every player (or at least >50%) is cheating, that’ll make cheating much harder, but it will probably also cost more bandwith on the connection.

But I’m not that far with the project anyway. First I’ll complete this deathmatch only version of the game, may be write a simple dedicated server and then I’ll write the real game with different game types (not only deathmatch, but also more tactical game types like flying an escort) and more features/weapons/ship classes.
I’m also planning to write a map editor and may be add an ingame voice chat.

But that’s all future talk for now.
I’m currently working towards smaller goals. :slight_smile:

hehe…

well, for security sake its always better to let the server decide everything. This prevents cheating the most. - With the clients deciding collision detection you will run into trouble when lag starts to get an issue. What if the ship is hit on one PC, but not on the second PC? Who is right and who is going to decide?

And what if one Client cheats? Which data is correct? And what, if 2 Clients cheat? A fight forever? :slight_smile:

Regards, Bigfoot29

Yes, but assuming you have around 10 players, if 2 are cheating, the other 8 are not… It’s like a democracy, the majority wins. :wink:

And if everybody is cheating, I don’t think anyone would care about cheat prevention… ^^

Oh Heck. For some strange reason I am not being notified by email when someone post to this thread. that sucks

Hehe, did you check that “notify me when…” thing?
You could also just check this thread everytime you login :wink:

Anyway, you wanted to give us a review about the game and what kind of improvements you want…

I’ve got some good news and I’ve got some bad news…

First the bad news:

I won’t update the code for a while now.

And the good news is:

It’s because I’m currently restructuring the whole code, so I can easier add more features to it (like more weapons…).

It’ll probably take me a while, before I’ve rewritten the whole code so it includes all of the current features.
The next update though will come when I’ve added more features than the current version has.
I will however still answer any questions here.

Now some Details of qhat I’m doing:

I write classes for everything in the game. These will be easier to manage and change if needed.
In the latest update I’ve already had some classes for the world, explosions and other effects.

I’m also changing the folder structure a little bit. The game now got a working title, it’s “Bad Lands”.
There’s also a short story plot (as it is multiplayer and doesn’t really need a real story line). There’re two parties. One is the USN United Space Nations and the other one the USC United Space Colonies. The USC is fighting for its independence. There’ll be game modes that respect this story plot (like flying escorts, bombing stations and supply lines, fighting for a solar system, etc…), everything multiplayer of course. In fact there won’t be any single player missions.

I will have to figure out some problems.

-First, I still don’t know how to use the complex geometry from a model file as a “fromNode” in Collision Detection.

-I still have to think about a way to create a dedicated server.

-I have to find a way to store all the game content inside a file container (like for example Quake in its *.pk files). Don’t know if Panda may support some kind of file container, else I would have to write code for that, too. Though I don’t know how.

There will certainly be more questions coming up soon… any HELP would be APPRECIATED.
Sometimes I wish that I had another programmer with whom I could share the work.
But then again, my name is Legion, as we are many… :wink:

I’ll keep you posted,
so long,

Legion

isn’t all that bad because of

:smiley:

A good idea, but spreading it too much might also create trouble :slight_smile:

Do you base it on the solar system including earth or will it be “bigger”?
I wrote some (text) stuff already in that direction… but “my” scifi universe is more or less limited to our solar system. First steps are made into “transdimensional jumping” but they didn’t finish yet. Has some potential, but I need time to continue writing :smiley:

Well, lets see :slight_smile:

Uhhh… someone else, please? :smiley:

Thats fairly easy. There are variables you can set in Config.prc to disable the output window and have a pure “command line”-based Panda-program. :slight_smile: Its here in the forums already. Just need to find it! XD

Thats also possible with Panda. Basically its a renamed zip algorithm. Again there should be plenty being said, but I am a lazy “searcher” right now (tired)

For a good project, count me in!! :smiley:
My problem is my small spare time and the “unwillingness” to work for me alone… thats why all my Panda-Projects just are frozen. :confused:

  • Maybe we should talk somewhere. :smiley:

THX! :slight_smile:

Regards, Bigfoot29

I think I’ll make it bigger. Although there won’t be any difference in gameplay compared to a game that’s restricted to our solar system. Because a map will still be a map and the only way to get to a new map (or a new sector for that matter) will be to complete the mission.
It’ll just be more reasonable with some maps. For example I don’t know of any planetary nebula in our solar system, but there’ll definetly be some maps with nebulas in it. :wink:

Having you onboard would be nice, especially because we could talk in german, that’ll be much easier.
I basically have the same problem, I’m unwilling to just code for myself.
But this game is something I wanted to do for years now, and with the interest of some members of this community and the interest of some friends it should be fine :wink:
So you don’t have much time, but you could still help me with the before mentioned problems. You could write some example code and I’ll adapt that into the game code. Besides being a great help for the project, you would also create code on this way, that can be used for tutorials.
I will pm you my ICQ details, so we can talk about the details :wink:

I’ve ever read it somewhere on the forum. You can use several line segments, each segment built from 2 vertices of your collision geometry, and put them on 1 collision node. The manual is pretty clear explaining this : http://panda3d.org/manual/index.php/Reading_existing_geometry_data

I downloaded all of the files from your website.

I think there are files missing as I had to seriously rewrite some of your code to point to correct models etc so that it didn’t have a python error and immediately exit.

If you could put everything in one .zip file that could extract that would be wonderful.

Your program looks interesting but the buggy version I have doesn’t let me see much. All I see are some spheres, two large ships and a fighter which cannot fire a weapon.

Keep up the good work, again, a zip would be most appreciated. I understand that you want to update only certain parts for friends, but the code you have supplied isn’t that useful in its current form.

There’re no files missing, but even I lost the overview of what files to download from that Version and where to put them. I’ve made an update to the original Post, with a download link for the new Version.
However, the old Version is the only one with working network code.
The old Version is also playble, you need to start a server and then you need to start a client. You can do that on the same machine, just be shure to change the Server address and maybe the port if required in the 3dnetwork.cfg (the keysettings are also stored there).

If you really have the old Version working, then you can play it.
There’s only that one map right now. In this map, there are several asteroid like objects (the spheres), two space stations and the fighter model. In order to see anything, or even to be able to fire the weapons, you need to start the server first (by pressing ‘1’ after the game is fully loaded). Then you can at least fly around and shoot (be shure to check the 3dnetwork.cfg to know what keys you can use to control the ship).
Right now I’m busy with other things, so I can’t continue to write this game…
But, as soon as I have the time, I’ll rewirte the whole code (again).
This third Version will be the first real beta, as I intend to not stop writing the code, until I’m finished with a DeathMatch style space shooter that is playable and enjoyable.
Basically I’ve written all the other code, just to find out what I need to know to finally write the real game. I’ve posted this early code here anyway, as there’re often questions about how to implement features, that are already in my code.

Hello, Legion.

I was attempting to download from your site,
23legion23.funpic.de/downloads/ , but got the 404. Have you moved it? Or is it down for good. If so, sorry I missed it. Any suggestions of some sample games I can use to test out a client-server setup?

slothrop

Yes, the Web space is currently used for other things…

Try http://legion.panda3dprojects.com/

But you won’t find the old version there… I’ll try to add some code to the old Version, so it’ll be easier to download and run. (see update on first page)

Thanks, Legion. I look forward to running your game. I will most likely have questions.

slothrop