BFett wrote: ↑Sat Aug 12, 2017 10:54 pm
Talvieno wrote: ↑Sat Aug 12, 2017 7:52 am
As to cockpits being targetable, I'm not actually sure that's going to happen. It would make it considerably easier to kill enemies - and you! You have to remember that if you can do something, the enemy can do it, too. Getting your cockpit lasered before you're even within gun range would cause a lot of people (myself included, admittedly) to ragequit.
As someone who loves Mech Warrior I have to disagree. It takes a certain amount of skill to aim at and destroy a cockpit. Even more so if the cockpit as a reasonable amount of armor. But this also assumes that ship designs have exposed cockpits, which may or may not be the case in LT. Blowing up weapon mounts is fun and encourages the player to have an understanding of the ship which is being fought.
Not when you have turrets and large masses of AI-controlled ships.
Sure, a human might have some trouble specifically aiming at a cockpit, but the addition of cockpits essentially allows the AI to get headshots on you. AI is never allowed headshots in FPS games for a reason: it's just not fun.
S46 wrote: ↑Sun Aug 13, 2017 2:29 am
I did mention shields as a balancing point there. Also, it'll be super hard to aim at a cockpit when the enemy is MOVING, so it's not that easy. Shields could basically make sure that the small weapons, like lasers, don't get through to the actual ship first, so rather than hundreds of tiny little pieces having to be broken off from laser shots, with the shields on only things like railguns and cannons and missiles will have sufficient power to penetrate shields and take chunks out of the ship. Anyway, I remember an image gallery sometime ago (May I think) where Josh did a "stress test" with asteroids. So, if you think of broken off pieces as mini asteroids...
Okay, a couple points to make here. First off, Josh has always talked about shieldbuster weapons and weapons that could get past shields before they even went down (albeit either harder to aim or with weaker damage). Freelancer, which LT is based on, had some weapons that were particularly good at cutting through specific "types" of shielding, for instance.
As to the stress tests with asteroids, broken off pieces are not the same. The problem isn't keeping them in memory and rendering them. The problem is that you're carving pieces out of a mesh-based system, which is
not anywhere near as simple as it sounds - either programmatically or computationally. It
can be done, but at a significant resource cost (on the CPU, specifically). It's the reason that although we do technically have the ability to create procedurally destroyable buildings with our current tech, you don't usually see it in FPS games - especially ones with large-scale combat (hundreds of allies/enemies).
With every piece that comes off, you need to do a number of heavy calculations:
- First, collision detection - did the projectile hit? If so, where?
- Figure out how much of the ship we want to come off. This would have to be based on volume unless we want things to get really weird, which is more heavy calculation.
- Create a new object based on the part of the object we want to come off, using our volume calculations. Then create a new mesh for it, and preferably optimize it (which means heavy calculations now for fewer calcs in the future
- Create a hitbox for the new object
- Cut off part of the mesh on the old one and, probably, remesh a significant chunk.
- Now you have to re-optimize the ship's mesh, too, which will take even longer. This assumes your mesh-splitting calculations are perfect (which they probably aren't - splitting meshes is notoriously difficult, and are buggy even in professional modeling software, a lot of times - especially with irregular meshes).
- Regenerate the ship's hitbox.
This is a
lot of heavy calculation - and all this does is just carve it up into "chunks" that don't even look realistic - more like carving pieces out of jell-o. If you want it to look realistic, you've got a
whole lot more that you're going to have to deal with - generating meshes and textures for ship interiors, procedurally generating ship frames and internals to look somewhat believable, believable chunking of debris... In short, we aren't in Kansas anymore, Toto.
S46 wrote: ↑Sun Aug 13, 2017 2:29 am
Oh and btw, Avorion (which is another space game) already has the ability for you to break off parts of ships where you hit them (such as engines) so it is possible...
Avorion is voxel-based. That means it's essentially already carved up in tiles, and it's quite easy for a computer to cut off pieces and chop it all up that way. It's already in pieces, so there's no real computational work that needs to be done. LT, on the other hand, is not. It uses a mesh-based system, as I mentioned previously. The two are
very different. Voxels are notoriously slow to begin with, but have the advantage of being able to carve them up easily. LT would probably not run at all if all its ships were made of voxels. I'm sure you never saw 500-ship battles in Avorion, for instance. (I haven't played, but given that it's voxels, I'm fairly certain you never really saw battles (at a decent framerate) with any more than 25 or so moderate-sized vessels at once.)
edit: Seems I was ninja'd several times. I really ought to refresh more often.
Anyway, just for fun, let's say you have a 100-ship battle in LT, which is one-fifth of what Josh has told us we might be able to expect. Then, let's say each ship has five weapons (which is a very low estimate) and fires five shots per second (again, low estimate, as the LT Prototype had you spitting out much, much more for some weapons). Then, let's say only one fifth of all weapons hit. We're looking at
30,000 chunks per minute, and millions, if not billions, of separate calculations. Assuming each debris model is only 100 polygons (another low estimate, unless you want to seriously optimize it so the chunks are low-poly, which means more calculations), you're looking at an
addition of around
thirty million polygons per minute (more than that, actually, because of having to add more polys to the ship too). Your CPU and GPU are going to melt.
It's a wonderful idea, but realistically speaking, our computers aren't powerful enough for it yet. If it was a battle with only five ships, I'd say, sure. Absolutely feasible. Unfortunately, LT has a lot more than five ships going around at any one time.
Or... we could do what a lot of other games do and just have ship models "decay" with low-poly pre-genned "chunks" that fly off and then disappear after a couple seconds, which would cut most of the time down. It wouldn't be plates flying off, and the ship model would change very abruptly at, say, 75%, 50%, 25% HP (if we go by an HP system, which isn't guaranteed, I think - I don't actually know). ...But it would work. It's a compromise of sorts.
reedit: Actually, the "random chunk debris" idea isn't that bad. If we don't actually take chunks off the ship while we're doing it, and we unload the new (very low-poly) bits very fast, and don't have to do hitboxes for the chunks - they're just graphical - we could make it look pretty neat from a distance. Of course, it won't look good at all from up close, but still... it's something.
But it would probably look better to just have sparks or something, I suppose...