Air/Vacuum Simulation

All content discussion will take place here. Any topic that is based upon a phase 2 section must have a link back to that topic.

User avatar
Developer
Lt. Commander
Lt. Commander
Progress to next rank:
30.2%
 

Posts: 662

Joined: Thu Dec 06, 2012 7:09 pm

Affiliation: Inactive

IGN: ducky215

Post Fri Jan 17, 2014 6:11 pm

Air/Vacuum Simulation

This was a topic that came up in the skype chat. I'm making a thread so it can be discussed more.
- I can be reached as ducky215 on minecraft forums -
User avatar
Developer
Lt. Commander
Lt. Commander
Progress to next rank:
30.2%
 

Posts: 662

Joined: Thu Dec 06, 2012 7:09 pm

Affiliation: Inactive

IGN: ducky215

Post Fri Jan 17, 2014 6:30 pm

Re: Air/Vacuum Simulation

This is mostly technical, but I'll leave it here. How should vacuum and air be simulated?

- Blocks
- Liquids
- Sort of like a light level, I think?
- I can be reached as ducky215 on minecraft forums -
User avatar
Fleet Admiral
Fleet Admiral
 

Posts: 3217

Joined: Wed Dec 05, 2012 9:54 pm

Location: Hexalan

Affiliation: Hexalan

IGN: PCaptainRexK

Post Fri Jan 17, 2014 7:06 pm

Re: Air/Vacuum Simulation

I was thinking that they could be like the Classic water, with the addition of upwards mobility. Of course, it could also expand through open door blocks (by door blocks I mean like the iron and wooden doors but space quality).
cats wrote:I literally cannot be wrong about this fictional universe
User avatar
Rear Admiral
Rear Admiral
Progress to next rank:
17.6%
 

Posts: 1890

Joined: Sat Dec 01, 2012 9:39 am

Affiliation: GLORIOUS REPUBLIC

Post Fri Jan 17, 2014 7:39 pm

Re: Air/Vacuum Simulation

I'd like to see something really FTLey.

We simulate oxygen within the ship by having an environment generator that basically creates a minecraft-classic wateresque block that is bled out when holes are made in the craft's metaworld (because we are using that, right?). This is a blanket solution that doesn't rely on premade schematics or constantly simulating what amounts to thousands of blocks of 'liquid' to see if an intersection can be made with a spaceship's guts.

I don't think it'd be all that hard to designated the 'space' world as something you'll deaded in without a certain type of outfit; it can be done with bukkit plugins.
Spoiler:
Image
User avatar
Developer
Lt. Commander
Lt. Commander
Progress to next rank:
30.2%
 

Posts: 662

Joined: Thu Dec 06, 2012 7:09 pm

Affiliation: Inactive

IGN: ducky215

Post Fri Jan 17, 2014 7:40 pm

Re: Air/Vacuum Simulation

Vinyl wrote:I was thinking that they could be like the Classic water, with the addition of upwards mobility. Of course, it could also expand through open door blocks (by door blocks I mean like the iron and wooden doors but space quality).


Yes, makes sense. But imagine this; You open airlock for 1 second, the entire ship shouldn't be drained of air. I think something more like the Finite Water mod would work, except, of course, 6 directions. We would have to experiment, though.

Tiel wrote:I'd like to see something really FTLey.

We simulate oxygen within the ship by having an environment generator that basically creates a minecraft-classic wateresque block that is bled out when holes are made in the craft's metaworld (because we are using that, right?). This is a blanket solution that doesn't rely on premade schematics or constantly simulating what amounts to thousands of blocks of 'liquid' to see if an intersection can be made with a spaceship's guts.

I don't think it'd be all that hard to designated the 'space' world as something you'll deaded in without a certain type of outfit; it can be done with bukkit plugins.


I guess I don't see what you mean by thousands of blocks of liquid; won't this be the case with air as well? Or are you referring to having vacuum as the fluid being the problem?
- I can be reached as ducky215 on minecraft forums -
User avatar
Rear Admiral
Rear Admiral
Progress to next rank:
17.6%
 

Posts: 1890

Joined: Sat Dec 01, 2012 9:39 am

Affiliation: GLORIOUS REPUBLIC

Post Fri Jan 17, 2014 8:00 pm

Re: Air/Vacuum Simulation

Keon wrote:Or are you referring to having vacuum as the fluid being the problem?
Spoiler:
Image
User avatar
Developer
Lt. Commander
Lt. Commander
Progress to next rank:
30.2%
 

Posts: 662

Joined: Thu Dec 06, 2012 7:09 pm

Affiliation: Inactive

IGN: ducky215

Post Fri Jan 17, 2014 10:25 pm

Re: Air/Vacuum Simulation

Oh, well in that case, yeah.
- I can be reached as ducky215 on minecraft forums -
User avatar
Vice Admiral
Vice Admiral
Progress to next rank:
21.2%
 

Posts: 2414

Joined: Fri Dec 07, 2012 3:40 pm

Location: -> HERE <-

Affiliation: UTN

Post Sat Jan 18, 2014 4:11 am

Re: Air/Vacuum Simulation

Well I pretty much explained the very way it is supposed to be coded. When the ship is created we calculate the exact oxygen volume on the ship and in which sectors. Once a block is removed from the ship, we check if on one side of it e have vacuum while on the other side we have air, if such is the case we move all entities in the area from the direction of the air block to the direction of the vacuum block and start to drain the pre-calculated oxygen level from the specific sector that is effected. Once the hole is fixed start to refill the air levels in the effected sector by a given amount per second.

The part I have trouble with is calculating efficiently if the area is enclosed now. I can easily pre-calculate the sectors when the ship is made but I dont want to do the same calculations each and every time a block is placed in the ship, to figure if some area is sealed, because you know you dont have to seal the very hole that was punched in the hull, you can just seal another area while keeping the rest of the area in vacuum.

Also simulating air as water is even less efficient than you think. Perhaps if you feel lazy you can pre-calculate the sectors using this method but calculating new sectors with it mid combat is a suicide for your CPU.
They're watching ... Image

"I am forbidden tag" -CvN
User avatar
Moderator
Fleet Admiral
Fleet Admiral
 

Posts: 4205

Joined: Thu Dec 06, 2012 11:49 am

Location: Sol IIIa, School of Hard Knocks

Affiliation: CNI

IGN: FC_Rangefinder

Post Sat Jan 18, 2014 9:08 pm

Re: Air/Vacuum Simulation

Iv, this thead is for discussion of differing ideas. I don't think you meant to, but you sounded remarkably "I said we are doing it this way already". We have no decided system yet.
Image
Captain
Captain
Progress to next rank:
4.1%
 

Posts: 1044

Joined: Fri Jan 10, 2014 2:19 pm

IGN: Solar112

Post Sat Jan 18, 2014 10:06 pm

Re: Air/Vacuum Simulation

I think it should be handled as a liquid of sorts, except it doesn't fall. and it 'wooshes' out when a hole is breached in the ship. Air should be simulated as a liquid, and vacuum as 'air' is now. and when air comes into contact with vacuum, it should gain a white 'misty' appearance.

Step 1:
VVVV||AAAA||
VVVV||AAAA||
VVVV||AAAA||

Step 2:
VVVV||AAAA||
VVVV AAAA ||
VVVV||AAAA||

Step 3:
VVVV||AAAA||
VVVV AAAAA ||
VVVV||AAAA||

Step 4:
VVVV||AAAA||
VVV AAAAAV ||
VVVV||AAAA||

Step 5
VVVA||AAVV||
VVAA AAAAV||
VVVA||AAVV||

Step 6
VVAA||AAVV||
VAAA AAAVV||
VVAA||AAVV||

Step 7
VAAA||AVVV||
AAAA AAVVV||
VAAA||AVVV||

Step 8
AAAA||vVVV||
AAAA VVVVV ||
AAAA||VVVV||

Step 9
AAAV||vVVV||
AAAV VVVVV ||
AAAV||VVVV||

Step 10
AAVV||VVVV||
AAVV VVVVV ||
AAVV||VVVV||

Step 11
AVVV||VVVV||
AVVV VVVVV ||
AVVV||VVVV||

Step 12
VVVV||VVVV||
VVVV VVVVV ||
VVVV||VVVV||

CMA

User avatar
Captain
Captain
Progress to next rank:
12.1%
 

Posts: 1083

Joined: Fri Jan 10, 2014 3:16 pm

Affiliation: Byzantine Falangists

Post Sat Jan 18, 2014 11:55 pm

Re: Air/Vacuum Simulation

Air should be simulated as a liquid, but we really shouldn't base it off of water blocks unless they've been miraculously re-coded since the last time I played.
"Being a christian democrat is like being a christian satanist" - Adam Berces
User avatar
Vice Admiral
Vice Admiral
Progress to next rank:
21.2%
 

Posts: 2414

Joined: Fri Dec 07, 2012 3:40 pm

Location: -> HERE <-

Affiliation: UTN

Post Sun Jan 19, 2014 3:18 am

Re: Air/Vacuum Simulation

Commander Error wrote:Iv, this thead is for discussion of differing ideas. I don't think you meant to, but you sounded remarkably "I said we are doing it this way already". We have no decided system yet.


Error don’t even start this. I say we must not do it as liquid because the runtime function of such algorithm would be O(5^n), which is just to let you know a very, very VERY bad efficiency, I would prefer to talk about it as a 3D array which means that the runtime function of such algorithm would only be (n^3) , to see the diff try putting n = 5 and see how different the numbers are, and the difference will only grow as n increases, for a small room n = 20, that’s the difference between 8,000 commands executed and 95,367,431,640,625 .

Runtime function: A method of measuring algorithm efficiency. Achieved by calculating how many basic commands are executed per specific input (input being n) that is independent from the code itself. if you have 4 commands executed in a program no matter what the input is your runtime function is O(4), however runtime functions trim off all elements unrelated to the input n, which is why O(4) = O(1).

The runtime function of a program with a loop inside it that passes through the given input is O(n) because there are n inputs and thus the loop is working n times. If the loop contains two commands the runtime function of the loop will be O(2n) = O(n) , yes it is true that this is the difference between 1 million and 2 million commands if n = million however the runtime function is only an indicator to tell us how efficient the algorithm itself is. That means that algorithm-wise O(2n) is the same as O(n), however O(n) is a much better algorithm than O(n^2) .
They're watching ... Image

"I am forbidden tag" -CvN
User avatar
Commodore
Commodore
Progress to next rank:
20.7%
 

Posts: 1574

Joined: Thu Dec 06, 2012 6:50 am

Location: Kzinhome

Affiliation: Kzinti Empire

Post Sun Jan 19, 2014 10:13 am

Re: Air/Vacuum Simulation

Iv121 wrote:
Commander Error wrote:Iv, this thead is for discussion of differing ideas. I don't think you meant to, but you sounded remarkably "I said we are doing it this way already". We have no decided system yet.


Error don’t even start this.

Watch yourself, Iv. That looks a whole lot like a moderator asking you to be more polite and you telling him to go away. That's not a good plan.
;.'.;'::.;:".":;",,;':",;

(Kzinti script, as best as can be displayed in Human characters, translated roughly as "For the Patriarchy!")
User avatar
Moderator
Fleet Admiral
Fleet Admiral
 

Posts: 4205

Joined: Thu Dec 06, 2012 11:49 am

Location: Sol IIIa, School of Hard Knocks

Affiliation: CNI

IGN: FC_Rangefinder

Post Sun Jan 19, 2014 10:37 am

Re: Air/Vacuum Simulation

I was asking you to consider other options. I was not telling you to stop talking, Iv. If you have a good reason for using your system, alrit. But do not dismiss other ideas out of hand, please.
Image
User avatar
Developer
Lt. Commander
Lt. Commander
Progress to next rank:
30.2%
 

Posts: 662

Joined: Thu Dec 06, 2012 7:09 pm

Affiliation: Inactive

IGN: ducky215

Post Sun Jan 19, 2014 11:02 am

Re: Air/Vacuum Simulation

First of all, it's true that we need a good way to simulate air that won't lag everybody out. Why would a liquid sim be O(5^n), though? Also, a 3d array is basically how blocks (and liquids) are simulated, so I don't really know what you mean by the O(n^3) method being different to the O(5^n).
- I can be reached as ducky215 on minecraft forums -
Next

Return to Phase 3

Who is online

Users browsing this forum: No registered users and 1 guest

cron