Author Topic: Too...Many...ships...!  (Read 4463 times)

0 Members and 1 Guest are viewing this topic.

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Too...Many...ships...!
Is it true that despite repeated attempts, it's still impossible to stably put more than 130 ships in the ships.tbl? And if so, is this looking at being fixed soon? We desperately need a bigger ships.tbl for TI.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Inquisitor

It breaks multi.

We can build a special EXE for you, but no multi, and I don;t want to get in the habit of building special exe's.

I could probably do it once, and have a SP only version.
No signature.

 

Offline SKYNET-011

  • 28
  • O_o
Quote
Originally posted by Inquisitor
I could probably do it once, and have a SP only version.


Can I have a copy if you do it?
Petrach and a few other escaped in a pod but were covered in watermelon juice....it was horrible :eek2: :shaking: -dan87uk

OMFGWTFAOLBBQBATMAN!!!!!11114111-MicroPsycho

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
How exactly does it break multi?

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
Quote
Originally posted by LtNarol
How exactly does it break multi?


Chrashes Clients on join Server since MAX_PACKETS is reached, its because the stats transmitted on the net is transmitted in one single pack, and it can max have 512 bytes in it.

a machine byte can, max hold the value of 255, so it must use a second byte to generate a number larger than 255

syntax is value =(byte2*256+byte1)

Since the stats function runs trough all availeble ships, that means you must reserve at least 2 bytes for each ship.

We had it set to 200, since i tested this as a safe value for the server, but then lacking LAN, i could´nt test what would happen to clients. and i recieved no error reports in my own builds, the infamous DTP versions :).

but when i put this to FS2_open, these error reports started to appear.

anyway, you still got 130 ships, anything beyond that is information overload IMHO. if you run out of ships, try to remove the ones not needed.

IF you still need more ships because you are working on several MODS, I encourage you to use the -mod flag.

If you are doing a TC MOD, you can even copy fred2_open into the mod directory, so that also only loads the MOD´s tbl.

command line handling for fred2_open, will come, but right now im working on my TBL SHIP/WEAPON file checker since many error reports are caused by bad tbl files. This also gives me chance to learn quite a lot of handleling Files, strings, chars in a very dynamic way. not to mention Memory allocation NEW and DELETE, etc. etc.
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Irritatigly enough, we almost definitely will need more than 130 ships :(. We've gone in the deep end - the pirates in the first act will need all the old Terran ships, plus we have a new species planned for later on that will require at least a dozen or more new ships (probablymore), and seeing as how it's eleven years later, there would logically be new GTVA ships as well (in fact, there already are.) And on top of all that, we set one of our initial aims as being 'to fill in the gaps unjustly left by V in the civilian population' - there are yachts, and civy transports, and light freighters, and all manner of civillian traffic - in short, we cant avoid > 130 ships :(
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
How easy would it be to fix it so multiplayer can do > 130 ships?

 

Offline Anaz

  • 210
seems like you would have to split it up into 2 packets to me...which of course would be twice the transfer time...
Arrr. I'm a pirate.

AotD, DatDB, TVWP, LM. Ph34r.

You WILL go to warpstorm...

 

Offline LAW ENFORCER

  • Turret Fiend
  • 210
    • http://www.armouredstar.com
how would that affect it? much?

this kinda important cos my TC is gonna be like Black Wolf's post but I will have at least 6 diffrent forces (inc pirates, police, civ, company - many of which have multipul ships classes in each class category (and my class category, destroyer etc, stands at about 30)
« Last Edit: January 14, 2003, 10:08:54 pm by 307 »
Conflict GRDLA:
Operation Return To Riker
www.ARMOUREDSTAR.com - the latest site is not finished yet!
[What we have here is the source to the Freespace ENGINE, not the Freespace GAME. By allowing the ENGINE to support all kinds of cool stuff, we're allowing the creation of all new GAMES] - TurboNed

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
well the question is will anyone notice if multiplayer is gone,
how many people are playing FSO online ?

breaking multi-player should be (IMHO) a nonissue untill we have our own PXO set up,
wich I would have hoped that we would have done by now but...
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Couldn't a third byte be used?

The 130 ships is a real barricade since the 158th mod covers some 9 decades, and 130 is frightenly close to the number of mod ships booked for post-Capella alone, no including the EBG Corps fleet, civilian vehicles/vessels, and FS2 era Sol ships.  The numbers add up rather quickly :shaking:

 

Offline LAW ENFORCER

  • Turret Fiend
  • 210
    • http://www.armouredstar.com
Quote
Originally posted by LtNarol
Couldn't a third byte be used?




:lol: your right!
Conflict GRDLA:
Operation Return To Riker
www.ARMOUREDSTAR.com - the latest site is not finished yet!
[What we have here is the source to the Freespace ENGINE, not the Freespace GAME. By allowing the ENGINE to support all kinds of cool stuff, we're allowing the creation of all new GAMES] - TurboNed

 

Offline Whitelight

  • 29
  • Thing, man like
I agree with Inquisitor, 2 builds would be all that is needed...:yes:

(Edit) One for multi
One for max ships, say 200, not sure if it can be stable at set amount....

Multi would also benifit people with slower machines even if they don`t play multi ...:)
« Last Edit: January 14, 2003, 11:47:17 pm by 695 »
Simpicity of character is the natural resualt of profound thought

 

Offline daveb

  • WHEE!!
  • 25
Quote
Originally posted by DTP
Chrashes Clients on join Server since MAX_PACKETS is reached, its because the stats transmitted on the net is transmitted in one single pack, and it can max have 512 bytes in it.


Y'know, there's no reason you can't fix this if you're feeling like testing the waters of multiplayer programming.

We're talking about the PLAYER_STATS packet right? The "real" reason multiplayer gets broken was because of PXO code - which made some assumptions about what data was coming in/going out. But since PXO isn't really part of the equation here, fixing this really isn't a big deal.

What I'd do is :

Change the PLAYER_STATS packet so that it gets sent multiple times. It would send the normal fixed-length data that's in there now (score, assists, what have you). Don't send ship stats right away. After you've sent the data, send multiple -more- PLAYER_STATS packets, packing in say, 64 ship types each. Each packet would contain a list of pairs of ship info indices and counts. So, you'd have a packet that looked like

int num_ships_in_packet
short ship_type
int num_kills
....

Just keep sending these packets until you've sent info for all ship types.

This works because of a couple of the properties of the low-level network layer. FS2 has 2 main types of packets. "unreliable" packets which are not guaranteed delivery and which can arrive in a different order than they are sent. And "reliable" packets which are guaranteed to arrive, and will guarantee to arrive in the order they are sent. The psnet layer takes care of managing this (for those interested, psnet2.cpp contains some of the truly arcane and dark secrets of game programming that you're not likely to find too many other places. Its a treasure trove of black magic. psnet_rel_work() is a true masterpiece of nutty code.)

. In general, you only want to use reliable packets for absolutely critical info that can't be missed. There's a lot of overhead with reliable packets because the code has to deal with dropped packets and the like. -But- in this case, you're only talking about sending maybe 1 or 2 additional packets (or even in an extreme case with hundreds of ship types, 5-10 packets). The code won't even blink.

You'd also have to bump up the server version - which would essentially get rid of backwards compatibility with FS2. But from then on, it wouldn't matter what MAX_SHIP_TYPES was.

A strong word of caution : there are probably several dozen other places in the network code that assume MAX_SHIP_TYPES will fit in a single unsigned byte (0-255). If you bump MAX_SHIP_TYPES to something greater than that, you'd have to hunt through every single packet type and make sure to send them as unsigned shorts (giving you up to 65535 ship types) or even an int. This is an inherently tricky thing to get right. Debugging multiplayer code is the biggest possible ***** you can imagine. The FS2 multiplayer code is a particularly big and complicated piece of multiplayer code. Far nastier than Summoner or RF's.

Still, if you're feeling bold and adventurous, this is a fine project.
« Last Edit: January 15, 2003, 12:24:34 am by 700 »

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
:nervous:
"sees big glowing hammer"
Well, I guess God has spoken.
Thou Shall Follow His Words To the Letter!
( fix the multi and bring us more ships - that way I can keep old ships in new chapters :p )
SCREW CANON!

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
thx for the reply dave;

huh, not sure i have "Time" to do more than 255 ships. but i think 200-255 ships will suit most modders just fine, since we never announced anything bigger than 200.

basicly what you wrote is what i assumed, but given reasent "RL" events i did 'nt have the time to confirm it.

Now i will look at the netcode again regarding send packets, but to tell the truth, i was scared of beginning to mess with it, in case i triggerd some other segfaults, this Code base is "Huge", but very well commented.

Think i might be able to commit it, next weekend, if i dont run into something unexpected.
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline Whitelight

  • 29
  • Thing, man like
I stand corrected... Just when you least expect it,  daveb saves the day:D
Simpicity of character is the natural resualt of profound thought

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Anything above 200 should be enough for most anything, the 158th I know is looking at potentially 200 (including FS1 and FS2 canon ships) but realistically 160-180.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
If anybody thinks they'll ever have use for more than 200 ships they're deluding themselves. :rolleyes:

200-255 will be perfect :)
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
Originally posted by LtNarol
Anything above 200 should be enough for most anything, the 158th I know is looking at potentially 200 (including FS1 and FS2 canon ships) but realistically 160-180.


"cough"Woomeister could use easily 255 ships if tbl space allowed him to"cough" :D
SCREW CANON!