Author Topic: multiplayer torpedo types  (Read 8593 times)

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
multiplayer torpedo types
« on: June 15, 2008, 03:24:21 AM »
this might sound n00bish, but, is it really necessary to define

Code: [Select]
Multiplayer.SpeciesToTorp.PHOTON
in a torpedo file, no matter the torpedo?

I mean, is it used for something vital like processing shield impacts or such?
if not, can I comment those lines out and still use them in multiplayer?

Picard_1

  • Guest
Re: multiplayer torpedo types
« Reply #1 on: June 15, 2008, 03:49:19 AM »
I think that's there to define the projectile just like the speciestoship uses the species
number to define the ship in multiplayer. The only way to know for sure is to play multi
with a partner ensuring both parties have the same scripts.

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #2 on: June 15, 2008, 04:00:48 AM »
that's almost the main reason why I'm asking that.
I'll be packing a set of scripts for a multiplayer mod, and plan to include everything necessary to put on top of a 1.1 install, so I ask to decide if I pack those scripts or not.

also, the less scripts the engine loads when starting (or in battle), the faster it will go.


(also, offtopic for this, but don't want to make another thread: what's the script you use to have allies and enemies facing each other? the original one had the player facing both allies and enemies...)

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #3 on: June 15, 2008, 07:01:20 AM »
When you fire a projectile in multiplayer (any projectile) it will send over the NetType (or species in case of ships or icon number in case of an icon, etc, etc) and then, all the other players will know what to fire on their sides. So, if you leave it as a Photon, then all the other ships in MP will fire a Photon Torpedo.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #4 on: June 15, 2008, 07:17:28 AM »
When you fire a projectile in multiplayer (any projectile) it will send over the NetType (or species in case of ships or icon number in case of an icon, etc, etc) and then, all the other players will know what to fire on their sides. So, if you leave it as a Photon, then all the other ships in MP will fire a Photon Torpedo.
you mean, everyone on their end will "see" me fire a photon

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #5 on: June 15, 2008, 07:23:26 AM »
Yeah, and to them (the clients in this case, so BC) you will have fired a torpedo.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline FekLeyr Targ

  • DS9FX Team
  • Posts: 492
  • Cookies: 538
Re: multiplayer torpedo types
« Reply #6 on: June 15, 2008, 11:59:54 AM »
Aha.
So in short: If you put the line
Code: [Select]
Multiplayer.SpeciesToTorp.PHOTON into (for example) a quantum torpedo script, you fire a quantum torped in mp but all others reconise a photon one instead.
TaH pagh, Tah be.

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #7 on: June 15, 2008, 12:15:19 PM »
Yeah, and to them (the clients in this case, so BC) you will have fired a torpedo.
Aha.
So in short: If you put the line
Code: [Select]
Multiplayer.SpeciesToTorp.PHOTON into (for example) a quantum torpedo script, you fire a quantum torped in mp but all others reconise a photon one instead.
yeah, but, what do they take damage of?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #8 on: June 15, 2008, 01:37:05 PM »
Now, Nighthawk has said it.

That's the entire reason for requiring the same scripts across all players in an MP game.
For the ship firing it will fire a quantum, and will do according damage when it hits.
But for the client, it's a photon, and will do according damage when it hits.

And now, say, for example (remember, this is all if scripts didn't need to match), that the ship hit would have been destroyed when hit by a quantum, but not with a photon.

Big, big Problem. Mostlikely resulting in kicking everyone off the game, at best.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #9 on: June 16, 2008, 09:06:12 PM »
well, with all said, sux to be the one in charge of the scripts....  :(

now, something I still can't figure:
when I put several "phaser" ships like 10 galaxys battling, there's not much lag besides the normal loading time. neither in battle, even with most of them firing photons to each other.
now, when I add several "disruptor" ships (defiants, or BOPs) there is a major drop when they start firing on each other.
even setting the pulses to fire a torpedo instead of a disruptor.
I commented the multiplayer stuff out of the scripts since they're custom-made, thus don't have specific definition

it has to be a scripting issue because the polycount of the ships is not enough to cause a slowdown to the engine (under 10000 polies counting all the ships together, plus torpedoes and phasers)
I made a custom install with only the necessary stuff over a 1.1 game. no extra mods, and no extra plugins, yet the lag still exists >.<
it's driving me nuts....

is there an event that fires when a disruptor-type projectile hits the shields? (it's the only thing I can think about  :?)

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #10 on: June 17, 2008, 02:07:04 PM »
It's the projectiles (regardless if they are pulse weapons or torpedoes, since both are the same thing, or rather, they both shoot the same thing) themselves.

Limit the lifetime and you should get better results.

This was actually a problem with various StarWars mods, where a single volley from a Star Destroyer (or was that a Super Star Destroyer?) brought down BC to it's knees for some time (on an somewhat older computer).

And that was in QB.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #11 on: June 17, 2008, 05:11:13 PM »
indeed, I started doing that.
it worked fine for torpedo ships and even more in large battles. but for disruptor ships, it's still the same.
it's more heavy when a shoot hits a ship, rather than when its fired. that's why I thought of the shield thing.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #12 on: June 17, 2008, 05:23:39 PM »
Well, theoreticly, a disruptor is "heavier", as in, it has more polygons than a torpedo.

I don't know how many a pulse has, but a torpedo has 2 for the core, 2 for the glow, and 2 for each flare. In other words, not a lot.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #13 on: June 17, 2008, 05:25:48 PM »
Well, theoreticly, a disruptor is "heavier", as in, it has more polygons than a torpedo.

I don't know how many a pulse has, but a torpedo has 2 for the core, 2 for the glow, and 2 for each flare. In other words, not a lot.

I changed all to torpedoes. and removed most of the flares, except when needed. although, I think I can resume all in a single plane and get rid of flares and glows too.
just a quick texture work.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #14 on: June 17, 2008, 05:26:46 PM »
That's a bit heavy optimization, isn't it?
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #15 on: June 17, 2008, 06:52:28 PM »
That's a bit heavy optimization, isn't it?
not quite, there's just 10 torpedo/pulse types for about 35 ships :D
most of them call a single B/W texture, and the color is done by code.

also, in the middle of a fight, who's gonna stay looking at the shot you just fired to see if it's a torpedo or a disruptor? from the player's POV, they're all sphere-ish.
having just 4 races to mod, it's not that hard anyways

EDIT: well, I'm surprised it worked.
cutting the hell out of them except a single texture for each torpedo. that's up to 4 textures to create some 15 torpedoes and bolts for all the races.
in the test field, with the same amount of ships and battle frenzy, there's noticeably less lag. so, I think I'm done :D

another Q: I get the "No module named PhotonTorpedo" error at the console.
that's ok, because I actually removed PhotonTorpedo.py from the folder. the problem comes when I try to change

Code: [Select]
kSpeciesTuple = ---
---
(PHOTON, "PhotonTorpedo"),

to

Code: [Select]
kSpeciesTuple = ---
---
(PHOTON, "whatevertorpedo"),

being it my modded torpedo.
it just freezes QB at start

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: still the multiplayer stuff
« Reply #16 on: June 19, 2008, 08:36:47 PM »
alright, trial and error gave me the answer to the last question.
anyways, that seems to have lead me to another one ?.?

the sentence

Code: [Select]
..., App.SPECIES_GALAXY, ...
that is in several scripts, does it specify an integer?
because, in the KM script SpeciesToShip and ShipIcons, every new ship specifies an integer instead of SPECIES_ANYTHING, except the stock ships, that do call App.SPECIES_ship

this far, I could make my own ships work in multiplayer, however icons and TGL names are messed up. but they load the ship they're supposed to load :P

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #17 on: June 20, 2008, 05:03:50 AM »
Well, considering everything else in KMs speciesTo defines it as an integer, then, yes, they define an integer. ;)


(And yes, they really do that, based on experiments, like printing out the value and the type of the value)
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: multiplayer torpedo types
« Reply #18 on: June 20, 2008, 01:45:24 PM »
Well, considering everything else in KMs speciesTo defines it as an integer, then, yes, they define an integer. ;)
(And yes, they really do that, based on experiments, like printing out the value and the type of the value)
indeed, I just found out.
I'll have to make a new species table for each race. but, I got to prove my point. putting 100 in the first ShipIconDef instead of App.SPECIES_GALAXY and also 100 in the first SpeciesToShip entry, it actually loaded its icon and ship
now, do I really need TGLs or is there a way to print the ship name in the button by just calling its LongName from the ship file?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: multiplayer torpedo types
« Reply #19 on: June 20, 2008, 01:49:10 PM »
If you mean the plugin, then you will need to actually load the plugin.


As for races, what exactly are you trying to do? You can just append extra information in the tuple.


For the TGLs, not without surgery to the UI code, it's possible though.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.