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
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 11:32 am

Re: Air/Vacuum Simulation

The difference is not in how you store them but how you access them. In liquid simulation method you basically say the following:

I am level 5 air block , All the blocks near me in all directions but the one I come from get air, repeat for new air blocks.

I am level 4 air block, all the blocks near me in all directions but the one I come from get air, repeat for new air blocks.
.
.
.

I am level 0 air block, I am not air block, function end. / I am a wall, I am not air block, function end.

That is basically meaning that we have 5 code sections for each new air block: 5*5*5*5*5 ... n times (5^n) in worst case scenario (we didn’t run into any walls), it is true that in real environment we will run much less code as we meet walls and make the function much more clever, but even after all of that you will still get a really high runtime function which means your CPU commits suicide.
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 Sun Jan 19, 2014 12:39 pm

Re: Air/Vacuum Simulation

So, Iv, you mean that we figure out how much air is in a ship/metaworld, and every time a change occurs to the metaworld, recalculate the air volume, and from the air volume, determine the effects on players?

Call me derp, but I'm not codesavvy enough to see how this is more CPU efficient than the liquid method.
Image
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 1:33 pm

Re: Air/Vacuum Simulation

No, recalculation is what you do, I do PRE-Calculation, just to let you know the algorithm I wrote there is similar to what you will end up if you calculate air like flowing water. Also it seems like in one way or another RE-calculation of the air volume will be required to determine if an area is sealed or not which is why I try to figure out the best way to do it.
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 1:43 pm

Re: Air/Vacuum Simulation

Instead of making stuff actually flow, can we just make it so any air block touching a vacuum block is destroyed and replaced by vacuum after, say, a tenth of a second? That'll mean that if there's a hole in the hull, the air in that room will be destroyed very quickly, but it'll stop at airlocks or whatever.
;.'.;'::.;:".":;",,;':",;

(Kzinti script, as best as can be displayed in Human characters, translated roughly as "For the Patriarchy!")
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 1:59 pm

Re: Air/Vacuum Simulation

The problem is not with draining the air but actually filling it back as I said, to check if an area is sealed.
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 Sun Jan 19, 2014 2:04 pm

Re: Air/Vacuum Simulation

Kdapt-Preacher wrote:Instead of making stuff actually flow, can we just make it so any air block touching a vacuum block is destroyed and replaced by vacuum after, say, a tenth of a second? That'll mean that if there's a hole in the hull, the air in that room will be destroyed very quickly, but it'll stop at airlocks or whatever.

That actually sounds good. Like how MC lava sets fire to flammables, which vanish after x time?

So any player in a zone with no air starts taking damage? Or do we have the underwater style air bubbles thing?
Image
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 2:06 pm

Re: Air/Vacuum Simulation

Commander Error wrote:
Kdapt-Preacher wrote:Instead of making stuff actually flow, can we just make it so any air block touching a vacuum block is destroyed and replaced by vacuum after, say, a tenth of a second? That'll mean that if there's a hole in the hull, the air in that room will be destroyed very quickly, but it'll stop at airlocks or whatever.

That actually sounds good. Like how MC lava sets fire to flammables, which vanish after x time?

So any player in a zone with no air starts taking damage? Or do we have the underwater style air bubbles thing?

If they're in hard vacuum, give them maybe a second before they start dying, and another two or three to actually die. If you end up in vacuum without a pressure suit you should be pretty screwed.
;.'.;'::.;:".":;",,;':",;

(Kzinti script, as best as can be displayed in Human characters, translated roughly as "For the Patriarchy!")
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 2:06 pm

Re: Air/Vacuum Simulation

I think I have a solution. I'll test it in 2d later today.
- 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 Sun Jan 19, 2014 2:15 pm

Re: Air/Vacuum Simulation

Oh someone is actually going to bring something new to the table here !

BTW as for air draining all you need to do is to detect once a block is removed that on one side of it there is vacuum and on the other side there is air, then set the direction of all entities in the enclosure from the direction of the air cube to the direction of the vacuum cube, draining a set amount of air from the enclosure as whole.
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 Sun Jan 19, 2014 3:09 pm

Re: Air/Vacuum Simulation

I feel Kdapt's solution is PROBABLY best, but I don't know sufficient java to say so for sure.
Image
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:44 pm

Re: Air/Vacuum Simulation

Its a solution, but not for the problem at hand. We talk about defining enclosure and if an area is sealed, not if it is depressurised.
They're watching ... Image

"I am forbidden tag" -CvN
User avatar
Rear Admiral
Rear Admiral
Progress to next rank:
9.2%
 

Posts: 1853

Joined: Wed Dec 05, 2012 10:03 pm

Post Mon Jan 20, 2014 2:57 am

Re: Air/Vacuum Simulation

Can we have pressure levels? Can that be a thing?
"Any sufficiently advanced technology is indistinguishable from a completely ad-hoc plot device"
— David Langford

[spoiler]
cannonfodder wrote:it's funny because sonic's face looks like a * and faces aren't supposed to look like a *
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 Mon Jan 20, 2014 3:05 am

Re: Air/Vacuum Simulation

What do you mean by that, and more importantly why do you want that ?
They're watching ... Image

"I am forbidden tag" -CvN
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 Mon Jan 20, 2014 9:18 am

Re: Air/Vacuum Simulation

If we do it on a block-by-block basis I'd prefer air-vacuum but if we precalculate it, it could work.
- I can be reached as ducky215 on minecraft forums -
User avatar
Fleet Admiral
Fleet Admiral
 

Posts: 3021

Joined: Fri Dec 07, 2012 12:10 pm

Location: In a universe.

Affiliation: [redacted]

IGN: Ivan2006

Post Mon Jan 20, 2014 12:52 pm

Re: Air/Vacuum Simulation

Iv121 wrote:What do you mean by that, and more importantly why do you want that ?

He means that the system could differentiate between different air pressures.
May not only be important for spaceships, but also for upper atmosphere stuff.
Quotes:
Spoiler:
CMA wrote:IT'S MY HOT BODY AND I DO WHAT I WANT WITH IT.

Tiel wrote:hey now no need to be rough

Daynel wrote: you can talk gay and furry to me any time

CMA wrote:And I can't fuck myself, my ass is currently occupied
PreviousNext

Return to Phase 3

Who is online

Users browsing this forum: No registered users and 1 guest

cron