Dev Blog : February 17th 2016

    Joined
    Jan 24, 2016
    Messages
    49
    Reaction score
    20
    Oh god. Can you smell it? The smell of exploit heaven. God, so many exploits I see now. Many have you made. The Force knows the holes.
    Succumb to imperfection. There is no escape from it.

    [Exploit abuse intensifies]
     

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    Just wanted to point out, all your asking for is a more memory intensive simulation. doesn't make you wrong, I just think the terms of the argument are a little silly. Anyway, yes, any simulation done ought to be more intensive than a simple "which has a higher score?" and yes, the scoring system should be overhauled (you know, like they said they were going to do) but surely we can meet somewhere in the middle without loading in all these engagements that no person is invested enough in to actually take part in.
    I never said that every engagement *should* be loaded in and simulated like a player fight. This would cause a ton of load and someone would probably figure out how to exploit it to keep even more tons and tons sectors loaded while they're away and grind the server to a halt, if it somehow survived the normal simulations.

    Just that numerical systems like this can and probably will have several potential exploits, or at least strange optimizations to achieve the highest chance of success (though I expect some RNG will be involved too).

    Just that statement, a warning, nothing more.
     

    StormWing0

    Leads the Storm
    Joined
    Jun 26, 2015
    Messages
    2,126
    Reaction score
    316
    • Community Content - Bronze 1
    Oh god. Can you smell it? The smell of exploit heaven. God, so many exploits I see now. Many have you made. The Force knows the holes.
    Succumb to imperfection. There is no escape from it.

    [Exploit abuse intensifies]
    *5,000 mining drones, 10,000 combat frigates, 9,000 titans, and 10,000,000 death wings later*
     
    • Like
    Reactions: SkylordLuke

    Zyrr

    Chronic Troublemaker
    Joined
    Jun 23, 2013
    Messages
    847
    Reaction score
    363
    • Legacy Citizen 4
    • Thinking Positive
    • Purchased!
    Lancake, if you screw up these fleet ship score points I'm going to actually have to eviscerate you in the most medieval way possible.

    Afterburner destroyer doctrine when.

    Pantheon style armor doctrine with titan volley when.
     

    Crimson-Artist

    Wiki Administrator
    Joined
    Sep 10, 2013
    Messages
    1,667
    Reaction score
    1,641
    • Video Genius
    • Competition Winner - Stations
    • Wiki Contributor Gold
    HYPE!

    Carriers are finally going to be a thing! I have one request, please make the AI naturally take over for me after i leave the core of my carrier so i can mix things up in my fighter. I don't want to have to fly out and then tell my carrier to engage the enemy like every other space sim.

    actually I have two. Can we get a similar path mapping mechanic for our NPC crewmen? Having to teach each individual NPC how to move around my ships without breaking them will be painful especially if we have to replace them if they get killed. Just wish that as a shipwright I can build in predetermined paths for any NPC that I assign to a ship.

    and oh boy, those unloaded sector simulations. Im getting flashbacks to the X series's out of sector mechanics. please schine, whatever you do don't make me have to baby sit my fleets. I've lost too many hard won ships to OOS fights that they would've easily won if I was in sector.
     
    Joined
    Jul 24, 2013
    Messages
    1,326
    Reaction score
    2,096
    • Master Builder Gold
    • Councillor 2 Gold
    • Video Genius
    HYPE!

    Carriers are finally going to be a thing! I have one request, please make the AI naturally take over for me after i leave the core of my carrier so i can mix things up in my fighter. I don't want to have to fly out and then tell my carrier to engage the enemy like every other space sim.

    actually I have two. Can we get a similar path mapping mechanic for our NPC crewmen? Having to teach each individual NPC how to move around my ships without breaking them will be painful especially if we have to replace them if they get killed. Just wish that as a shipwright I can build in predetermined paths for any NPC that I assign to a ship.

    and oh boy, those unloaded sector simulations. Im getting flashbacks to the X series's out of sector mechanics. please schine, whatever you do don't make me have to baby sit my fleets. I've lost too many hard won ships to OOS fights that they would've easily won if I was in sector.
    or even worse,people who played star wars empire at war..will understand.

    you attack with a freaking executor super star destroyer + armada of 9 other Imperial star destroyers + tons of support ship.. you click auto resolve,and you get a report that you lost 50% or more of the fleet. and all they had to do was beat a single mon calamari capital and support ships + shipyard D: D: D: D: D: :mad::mad::mad::mad:
    (its even worse in RepublicAtWar mod lol)
     
    Last edited:
    • Like
    Reactions: alterintel

    Reilly Reese

    #1 Top Forum Poster & Raiben Jackpot Winner
    Joined
    Oct 13, 2013
    Messages
    5,140
    Reaction score
    1,365
    • Legacy Citizen 8
    • Thinking Positive
    • Purchased!
    or even worse,people who played star wars empire at war..will understand.

    you attack with a freaking executor super star destroyer + armada of 9 other Imperial star destroyers + tons of support ship.. you click auto resolve,and you get a report that you lost 50% or more of the fleet. and all they had to do was beat a single mon calamari capital and support ships + shipyard D: D: D: D: D: :mad::mad::mad::mad:
    (its even worse in RepublicAtWar mod lol)
    Try playing C&C 3's global commander. Task force of a MARV 12 Mammoths and 22 Titans plus MCV and 15 Slingshots auto lose to 12 beam cannons and 3 purifiers.

    Like how the hell?
     
    Joined
    Dec 3, 2013
    Messages
    552
    Reaction score
    182
    • Legacy Citizen 9
    • Purchased!
    • Community Content - Bronze 1
    REALLY Excited to see carriers getting some love. On the other hand, it makes some of the designs/prototypes I have that work well kinda useless now.... maybe I will make a "Old Technology" warehouse LOL.

    As far as AI Sim Engagements (AISE) I think it could work pretty well depending on the way its done. Done wrong it could be hated, but I have faith that it wont be that F'd up. I do see where people will be building "Passive Fleet Ships" and "Active Fleet Ships" though. Not necessarily a bad thing.

    Fleet A is the fleet you send when you expect it to fight without a player in the area, Fleet B is better when there is a player, and Fleet C is a mix of ships from A and B, and is used when you don't know what the hell to send. And maybe a "Personal Escort" kind of fleet, mining fleet, cargo defense fleet... so many fleets....
     
    Joined
    Feb 27, 2014
    Messages
    1,074
    Reaction score
    504
    • Purchased!
    • Legacy Citizen 4
    • Top Forum Contributor
    Two dev blogs in one week? You've gone mad, Bench!

    Now, to read this...

    EDIT-



    This is the only issue I have with fleets, currently. There is almost certainly NO WAY that unloaded fleets are going to account for things like docked reactors and turret turn speed.
    I completly agree.
    This whole post sounds awesome.... but you can't really... simulate complex ship entities accuratly with a couple of numbers, no matter how hard you try.... not to mention that someone will figure out how to exploit these scores.

    Its a complex issue to work around and I hope we can find a solutions.
    That being said just using a couple of numbers to do this gave me a knee-jerk reaction, and it isnt the sorta direction I would like to see SM go.
    So yeah. I would like how I build my ships to MATTER, instead I could just make a bunch of giant doom cubes that have insanely high atack scores.... on that note how would it take into account power regen and storage??? Would it even be used in the calculations???
    Otherwise Im just gonna fill my doom cube to the brim with weapon modulus and forget about power.
     
    • Like
    Reactions: alterintel
    Joined
    Jul 14, 2013
    Messages
    98
    Reaction score
    27
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen
    You could load the sector and just have the AI duke it out.

    Of course, points could be used for certain things. It'd be pretty unnecessary to load the sector in the event of a tiny pirate wandering into your massive border patrol fleet. But for actual combat between two large, PLAYERMADE forces? That shouldn't be sim combat.
    Yeah there are far too many variables that numbers and math alone will not be enough. Turret arcs, point defence vs missiles, placement of key systems behind armor...

    keep in mind guys,there can potentially be 100+ simulations of trading,escorting missions,battles,etc.. in a universe,and as it ets older and more gets explored,the number can explode. Do you really want a fully loaded sector for battles with all those other things,because 99% of PCs would like..die hahaha,dont get me started on multiplayer servers.

    But I do agree that the background simulations need to be more detailed. dont know what things will be included in these ship scores. but I do hope there is enough variables for those simulations to be somewhat fair. we cant expect it to be 100% right,I mean take the note from star citizen,you just cant simulate everything even if you had a super server cluster that would TRY to do that,now scale tthat down to starmade universe and low/mid end PCs,exactly...

    You guys are right in talking about the problems unloaded ship fights would have, it is a big deal, and if it doesn't take into account the nuances you guys have mentioned, it will be a failure. But some of you have hinted on a possible solution. The whole point of having unloaded battles is to reduce strain on the server whilst still having large fleets, so we can't exactly just actually have the AI duke it out in real time every time they encounter each-other. But you can do something similar.

    Instead of actually running a real time AI fight when fleets come into contact in unmanned, unloaded sectors, run the battle with less ticks. In real time you would experience a fight in 60 server ticks per second (or what ever the server tick rate/ or game tick rate maximum is), however in this system, the AIs would duke it out for real (and thus you would need to load the ships, but not necisarily anything else that couldn't contribute to the fight) but at a much lower tick rate, for example, a mere one tick per second. This would allow you to capture the nuances of the shape and placement of weapons on the ship as well as other things, with out actually causing the server to take a huge it on computational performance.

    The damage, movement, etc, of a ship would be a function of the tick rate, so that the lower the tick rate you set for unmanned sector battles, the more the damage and movement scales to compensate. In a situation where you still have a lot of ship battles but you don't want to lower the tick rate to compensate, you treat these battles as a job, a term used in Real Time Systems to describe a task that needs to be scheduled to be worked on. This job in particular we would describe as having a soft deadline, as in, we don't need to precisely complete this job when its scheduled to complete, we would just prefer that it does. In our situation, given that we chose a 1 tick per second period for the job (our unmanned sector fleet battle) if the server was under high load from multiple of these battles, we would defer the computation of these battle "ticks" until the next available time we can schedule it. It won't matter much to the player since the player isn't in the sector in the first place, and they can't even see the battle transpiring. I personally see it acceptable that the battle takes twice as long or more than it would otherwise to get the best of both the performance and accuracy of who would win in a real combat scenario here.

    There still is a problem with this system however. How do we deal with the increased memory cost of this system? While we completely solve the computational issue, we don't solve how much RAM this will cost the server, depending on the fleet scale (we want to make this scalable don't we?). We can solve these issues as well.

    First, when simulating the outcome of fleet battles, we don't necisarily need to load every single object in the sector, even if it would have provided some minor tactical advantage (IE an asteroid) but we should still be factoring in all ships and stations in the area. This would reduce the server load by a bit, you don't need to calculate what happens when a stray missile hits an asteroid, but you will still need to calculate when a missile hits a ship. This is not enough though

    The biggest thing we can do is reduce the amount of blocks representing our ship that we use to actually carry out the battle. If we approximate the shape and location of entities on a ship by taking every i'th block and have it represent the area of the ship of the size i x i x i at the same location, we can get pretty good approximations of both the ship and the outcome. What this means is that we take samples of the blocks we find on the ship and have those represent the blocks used in the battle but we still keep the stats in mind when calculating the energy, fire power and shields of the ship, even if our unmanned battle approximations of those ships don't have exactly proportion of shield blocks, we can still get good approximations of what the battle would look like, at a factor cost i^3 of memory.

    I provide a more concrete example of what I'm talking about and how it actually helps with memory constraints. Lets say you have a cube ship, and it is 256 x 256 x 256. If we chose our i to be 4, when your ship battled in unmanned space, it would be using (256/4) x (256/4) x (256/4) blocks to represent it, or 64 x 64 x 64 blocks. To put that in perspective of the amount of memory saved, 256 x 256 x 256 = 256^3, or 16777216 blocks. The amount of blocks used to represent the ship in unmanned space is 262144 which is 1.56% the number of blocks as the original. You could fit 64 of the same ship in this approximated representation in the same space it would take to hold the data in RAM for the 256 x 256 x 256 ship.

    If this was some how not enough, you could go even smaller, using a factor of 8 you end up with 32 x 32 x 32 or 32^3 = 32768, which is .195% of the number of blocks used in the original. In this version you could hold 512 of these ships in the same space as the original. Raising the factor to such a number would make the memory requirement for battles near trivial.

    This method doesn't give as accurate result of battles as a straight up real AI battle would do, that is true, but it gives a good enough approximation based on the ship dimensions and placements that I'd argue it doesn't matter. It does however hurt small ships.

    If your ship was even 15x15x15, this system might approximate your ship to be one block in the approximate battle space given an i value of 8. On super large ships this is totally a non issue, your ship is so large that such approximations will probably not even end up factoring into 1% of your ships represented volume, however it might harm very small ships. Given appropriate factor sizes, like i = 4, this ends up being a non issue for real fleet battles, as most ships in battle will over this size, but sometimes a larger factor scale size might be necessary for memory reasons and it is a valid concern to bring up.

    I think that even in the factor size i = 8 case this doesn't matter because at such a scale your ship isn't going to have a lot of problems in terms of strategic placement of blocks being properly represented in your ship, and it ends up being no worse than the stat sim battle where no ship morphology is present.

    An minor possible problem with the reduced fidelity approximation of the ship is the computational time required to create the representation of the ship. The actual time to do this is probably going to be minuscule, but in case this one time per battle performance hit is a problem, ships can start including this data in their ship schematic data, after a set time when you exit the build mode of the ship, or when you save it manually, it will also calculate this approximated ship representation, and store it along with the original ship data. in this way, the server need only retrieve this data when a battle occurs, rather than calculate it on the fly.

    A final suggestion on reducing performance impact, but still trying to keep ship morphology fairness in unmanned sector fleet battles fair, would be to limit ship collisions (not weapon hit collisions necisarily) to single, or a fixed number of boxes fitted within the bounds of the ship. This would reduce collision checking needed, if every ship represented its collision area as a simple box, or three boxes during the unmanned fleet battle. Additionally it may be more beneficial to forgo object collisions altogether in the approximations, but this might end up causing behavior where ships can pile up giving an unrealistic advantage to missiles and area affect weapons.

    To sum up the solution to this issue, you do need some actual ship to ship battle to solve this problem, but it doesn't necisarily have to be one to one or done on the server in real time. Unmanned sector battles don't need to take place on real server tick time, and can be calculated with a time fidelity of one time per second for example, saving server resources but still providing much better representations of the outcomes of real ship battles. The space for where these battles take place don't need to take into account the static/ non ship or station objects in the area with respect to ship collision or bullet collision, and ship collision can afford to lose a lot of accuracy with fewer boxes to check, or removed entirely. Finally to solve the problem the Ram needed by the server in the situations where many large ships are fighting in a fleet, the physical representation of the ship during the battle can be approximated by taking a sample of the real ship every ith blocks, where if i = 4, a 256 x 256 x 256 ship would be represented by a 64x64x64 ship in the unmanned fleet sector, which would only take up about 1.6% of memory needed to store the block information.
     
    Joined
    Mar 9, 2014
    Messages
    222
    Reaction score
    479
    • Arrrty Gold
    All this centralized control over ships

    Basically Starmade wants to be an RTS
     
    • Like
    Reactions: Byamarro

    Lecic

    Convicted Lancake Abuser
    Joined
    Apr 14, 2013
    Messages
    5,115
    Reaction score
    1,229
    • Thinking Positive Gold
    • Purchased!
    • Legacy Citizen 11
    Not necessarily a bad thing.
    No, that... sounds pretty horrible in every sense of the word. It's incredibly insulting to engineers to simplify their designs down to "who's got the best scores" and turn a doom cube designed around SCORES rather than actual system quality into the ultimate defensive ship.
     

    Bench

    Creative Director
    Joined
    Jun 24, 2013
    Messages
    1,046
    Reaction score
    1,745
    • Schine
    • Wired for Logic
    • Legacy Citizen 6
    The other thing you need to consider though is that whatever numerical processing happens for those fleet battles unloaded can quickly turn on its head if you as a player instead fly into the sector. Suddenly a doom cube with no power just purely weapons to buff stats is impractical.

    We're still in the infancy of developing the nuances of how it would work, but we've stated intentions at least and on the whole sounds like you're all excited.
     
    Joined
    Nov 16, 2014
    Messages
    450
    Reaction score
    113
    • Legacy Citizen
    • Purchased!
    • Community Content - Bronze 1
    Although the first ship in every fleet 's gonna be a mining ship, droves of miners, we can all agree on that.
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    This has me wondering if you could do it async from the rest of the game until a player shows up.

    Essentially this. Every sector has a passive mode. Page what you need up from disk, and run the sim for a little bit in a thread but not worry about time. Set the priority to low, and run ticks every so often. Page the state back to disk and rotate through passive sectors until you have none (not likely to happen but its still a state to deal with).

    Fights take longer with only AI, but its still a roughly true AI representation of what's going on, and you don't have to rewrite any of the AI. Then depending on the amount of ram/time you can have multiple being simmed. Paging a whole sectors state up and back might be tricky depending on how it works right now, but its wholly scalable if this game does manage to move to multiserver setups (which I think will actually be its saving grace.).

    As a whole the engine benefits from optimizations everywhere then. RAM disk then shows crazy improvements. So depending on the time it takes to page it from disk to memory, sim, and un-page, it could work fairly well. I think they'll have to limit the amount of actions NPC factions can start at a time though.

    Of course this is just speculation, but its a possible solution. Its too bad we can't trust clients to help speed up the sims without exploits, then the number of connected clients actually speeds up the server.
    [DOUBLEPOST=1455712396,1455711907][/DOUBLEPOST]
    All this centralized control over ships

    Basically Starmade wants to be an RTS
    A live long lived voxel game with RTS elements sounds great to me.
    [DOUBLEPOST=1455712496][/DOUBLEPOST]
    The other thing you need to consider though is that whatever numerical processing happens for those fleet battles unloaded can quickly turn on its head if you as a player instead fly into the sector. Suddenly a doom cube with no power just purely weapons to buff stats is impractical.

    We're still in the infancy of developing the nuances of how it would work, but we've stated intentions at least and on the whole sounds like you're all excited.
    VERY EXCITE. You can do it, its just how we are all speculating on. Of course we are concentrating on what the bad will be. We'll get there. For now MUCH HYPE
     
    Joined
    Dec 8, 2015
    Messages
    93
    Reaction score
    19
    Two dev blogs in one week? You've gone mad, Bench!

    Now, to read this...

    EDIT-



    This is the only issue I have with fleets, currently. There is almost certainly NO WAY that unloaded fleets are going to account for things like docked reactors and turret turn speed.
    True but I still think it's better that it exists rather than unloaded ships not functioning at all. You could also just not use docked modules on AI drones. I mean 2 million power on drones is still decent plus you can use many of them :)
     
    Last edited:
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    What many don't seem to consider, is that fleet battles currently are also just purely numerical[if one excludes player pilots' piloting].
    However, unloaded battles do not need to be fully nuanced, as player pilots can be excluded. Let me elaborate.
    When 2 fleets engage, in the very first moments they have a certain distance from another, let's initialize this variable with the distance of 2 opposite sector borders. The distances of individual ships from one-another depend on formation. If formation won't be implemented, assume it to be the same for all ships in the beginning.
    In the beginning of a battle one can also assume, that energy capacitors and shield-capacitors are full.
    Both fleets also have a maximum movement velocity, which can be determined from the maximum movement velocity of each ship. Directional thrust should be ignored here, for simplicity. This velocity will be important later.
    For weapons with a cooldown of less than a second, average out damage and energy consumption into 2 second batches[include how many shots would be fired per batch as a constant floating point].
    Any other weapon with a cooldown of less than 2 seconds, put 2 shots together in a batch like above.

    Now, follow these rules:
    • Calculate when each ship will come into the reach of which weapon system of an enemy ship, and queue fire-events up based on how long it would take to come into range, and wait until the first event in the queue takes place. This uses the movement velocities of the fleets(and if applicable formation)
    • On any timed event: Calculate the amount of power and shields each ship would have regenerated in the time between this event and the last event. Also, allow each ship to change its orientation and course freely. Note how long it would take for every ship to exit their enemy's range on their current course(every course is assumed to be a straight line). If no event occurs between this event and that time, the battle will end after this event.
    • On a fire-event: The ship this event applies to fires its weapon(s) at an enemy ship in range of the AI's choice, provided the ship has enough power. If the ship lacks the power to fire the weapon, queue up another fire-event for this weapon/batch when the ship would have regenerated enough power, assuming constant regeneration.

      Calculate the likelyhood of a hit depending on AI-accuracy, the dimensions, block-count and distance of the enemy ship. If the weapon in question is fired in batches use the floating point to spread the RNG out over the shots in the batch, and calculate the total damage done by all shots in this batch combined, and queue up a hit event on the targeted enemy ship. The hit event will occur in the time it takes the projectiles to travel the distance.[0 in case of hitscan] Do not queue up a hit-event if the shot(/all shots in the batch) miss.

      Also queue up another fire-event when the cooldown of this weapon(or this batch) would have passed.
    • On a hit-event: Deal the damage noted in the event to the ship this event applies to. If the shields do not completely soak up the damage, estimate which block would have been hit by randomly selecting a side of the bounding-box[depending on the position of this ship relative to the firing ship], and randomly selecting a block facing this side. If the chosen column of blocks is fully empty, repeat with all other columns. If all columns are empty, remove this ship from the calculations , it has to be dead. Do not process the block damage that would be done by the hit, just note down the blocks, damage, type and direction. The damage will be calculated after the battle.
      Apply any new penalties due to the structure-HP to the ship, or remove it from the calculations, if the ship would overheat.

      Edit: in case of missiles and point-defense. Calculate the chance of the missiles being hit by point defense depending on their travel distance, velocity, PD-cooldown and AI-accuracy.​
    • When all ships in one fleet are overheating, or after both fleets have left each other's range again, end the battle, and begin calculating the damage done to the individual blocks using the notes from the hit-events. this process will be sped up if the sector is loaded. This fleet will not be able to engage with other AI-fleets until the damage is calculated, however, it also won't move while the damage is being calculated, but it will however immedeatly move to whichever sector it would be in, had it moved with its new velocity, after damage calculations[if any thrusters were destroyed].
    The only real downside to this, that I see, would be that thrust does not consume power, however the impact of that should be minimal. The solution for docked reactors could be to just add the overflow of energy generation of every docked weaponless entity to the entity it is docked to.
     
    Last edited: