Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
NikkyD

I am missing reasons to build a shelter

82 posts in this topic

 

But one things that all the "simple" solutions for heat do not provide is that once the fire stops burning, the heat is gone as well. And if there was something like a stored heat value per block you could heat up a house during the day and it would stay warm during the night etc. If the fire needs to be burning, you need to burn 12 logs or so every day in wintertime which is a bit crazy.

 

I still would like to have firewood. Place a log on the ground and right click it with an axe as you would create a food prep place with a knife and it becomes a chopping block. You then add one log at a time to it and just work the block with your axe for a second and boom you got 4 pieces of firewood. Firewood could be generic, no matter what type of log created it, just like sticks. And then make fireplaces accept sticks and firewood only as fuel, depending on how long you want to have heat. For cooking one bread or meat it feels silly to burn an actual log as it would require maybe a quarter of it if at all.

I just think It should take longer for a fire camp to burn out. We should be able to feed the fire enough logs to last for at least one night, and if you try to sleep and the fire burns out you should awake cold.

0

Share this post


Link to post
Share on other sites

@Nikki to give blocks heat values independent of the heat source would require them to be ticking entities. This is very bad for lag. If you want an idea build using railcraft coke oven or blast furnace bricks. Using Opis you can see how much they take up of CPU time. Then imaging every building block in world doing that. They eat eat a little bit on a server this is untenable.

0

Share this post


Link to post
Share on other sites

Ofc you need some smart architecture for that. If we make it simple you have a firesource. Now you can create an ArrayList<Block> where every block that is heated up is referenced. Or maybe even take some sorted list because you only need to determine the "flow of heat" once and every tick you simply increase the heat level until they hit a max aka "the house is completely heated up". Once the firesource is out, evenly reduce every blocks heat in the list.

Iterating 100 blocks and adding or substracting a value... if that really concerns you then i must wonder what kind of machine you are running MC on. I wouldnt even sweat such a calculation on a microcontroller in 8bit.

0

Share this post


Link to post
Share on other sites

Ofc you need some smart architecture for that. If we make it simple you have a firesource. Now you can create an ArrayList<Block> where every block that is heated up is referenced. Or maybe even take some sorted list because you only need to determine the "flow of heat" once and every tick you simply increase the heat level until they hit a max aka "the house is completely heated up". Once the firesource is out, evenly reduce every blocks heat in the list.

Iterating 100 blocks and adding or substracting a value... if that really concerns you then i must wonder what kind of machine you are running MC on. I wouldnt even sweat such a calculation on a microcontroller in 8bit.

 

Ok, now how do we read the information from that ArrayList? Each time the player ticks, do they scan around for the nearest firesource, then input their current coordinates into that ArrayList to check what the heat value of the block they are currently standing in is, and then update the player's ambient temperature accordingly? Now they'd have to do that exact same calculation every single tick (20 times per second) since players are not static entities, and are constantly moving about. Now what happens when there are multiple players in an area, and they all need to access that ArrayList at the same time to get the heat information for their individual selves? All of these calculations are run on the singular server, and not on the individual clients.

 

Edit: Here's the current system that we are using to calculate the apparent temperature from heat sources (lava, firepits, forges, etc): https://github.com/Deadrik/TFCraft/blob/master/src/Common/com/bioxx/tfc/Core/Player/BodyTempStats.java#L129

1

Share this post


Link to post
Share on other sites

The player would simply ask the block that he is standing in.

 

Now to avoid fighting, i assumed that it is possible to add custom values to blocks and that heat lvl would be one of those values.

 

If that is not the case and you need a completely independent collection, one would have to go at it differently.

 

 

 

As for the ticks, it should be possible to do certain stuff every x ticks and not every single one, again, not that deep into MC/Forge.

0

Share this post


Link to post
Share on other sites

You can't add custom values to blocks without turning it into a ticking tile entity. You cannot check something every X ticks, the way that Minecraft and Forge is set up, you must check every tick, or not check at all.

 

Edit: The only exception to this is for blocks that get random ticks, such as grass spreading and vanilla crop growth. That is entirely random though, so you cannot use it for anything that needs to be consistently checked.

0

Share this post


Link to post
Share on other sites

ok, thx for that info, now i have to do some thinking and we'll see :)

1

Share this post


Link to post
Share on other sites

Those two limitations are exactly why Bunsan and I have been trying to explain to you that it is essentially not feasible to do without completely grinding the game to a lagging halt on the average player's computer.

0

Share this post


Link to post
Share on other sites

Please understand that I'm not being stubborn for no good reason. It isn't just what Java can and can't do it is also what the MC and forge base can and can't do. Kitty's knowledge of this is direct and based on the code itself and so her answers are technical. My knowledge is based on over 3 years administering some public servers and is based on experience of solving numerous issues and speaking with people like Kitty who explain the causes. I certainly don't claim to know everything or even the majority of things, but I feel I have a pretty good grasp of how things work.

0

Share this post


Link to post
Share on other sites

There were some interesting concepts discussed here :)

4

Share this post


Link to post
Share on other sites

Is it possible to create a custom block that has no texture and that a player can walk through ? An "air" block essentially.

0

Share this post


Link to post
Share on other sites

Is it possible to create a custom block that has no texture and that a player can walk through ? An "air" block essentially.

I believe that in Galacticraft a custom block is used to represent (pressurized) air on the moon/mars - but I have not checked the source.Anyway it should be no problem to extend the vanilla air block...
0

Share this post


Link to post
Share on other sites

Yes, it is possible to create a custom air block. Railcraft also uses one to track player movement.

0

Share this post


Link to post
Share on other sites

Well then one could let the fireplace spawn "temperated air blocks" like water. The second they enter a coordinate that is not under a roof, it stops. Would be easy for the player to check if he is standing in warm air or not.

 

Sure there would be exploits etc but if the solution should target the 80% of players who play normally.

0

Share this post


Link to post
Share on other sites

Well then one could let the fireplace spawn "temperated air blocks" like water. The second they enter a coordinate that is not under a roof, it stops. Would be easy for the player to check if he is standing in warm air or not.

 

Sure there would be exploits etc but if the solution should target the 80% of players who play normally.

 

Without turning the custom air blocks into tile entities (which cause lag), you only have 16 available "states" for one block. So from lava to an almost-cold firepit, you'll only have 16 blocks to represent that range of temperatures, at 1 temperature value per block.

0

Share this post


Link to post
Share on other sites

oh cool, 16 states gives even more options. This is a point where gameplay can kick in. States like "a bit warm", "warmer", "really warm", "hot" and "way too hot" would suffice.If there is no air block its ambient temp, if there is an airblock it could be ambient temp + a fixed value. So it jumps in 5° celsius steps, who cares, that doesnt really change a thing.

I would even go so far to say ONLY if ambient temp is below 20°C a "warm air block" raises the temp to exactly 20°C. Could be immediatly, so you light the firepit and the entire house is temperated. That would go along with the extremely short daytime of MC. If i have to wait one minute or not for the house to heat up doesnt make a difference. I would start a fire, leave the house, come back in the evening and the house should still be warm.

Lets say after the fire goes out, the air blocks stay for 8 hours or so and then simply vanish. It would do its job. Heat up a house in wintertime, so outside is cold and inside the shelter is normal and with body temp you can recover inside.

1

Share this post


Link to post
Share on other sites

We aren't planning to use floating point temperatures when it comes to body temp, so what you're describing NikkyD is essentially the plan at this point. 

0

Share this post


Link to post
Share on other sites

We aren't planning to use floating point temperatures when it comes to body temp, so what you're describing NikkyD is essentially the plan at this point. 

 

I want to add a note to this that it still doesn't solve the "inside/outside" reason to build a structure complaint, because it's still not changing with anything other than a roof, which I said at the very start.

 

Other than keeping mobs out, you won't have a reason to build walls, because there's no wind.

 

 

Even when body temperature and the like is implemented, the closest thing to "shelter" that we can really code is your head not having direct access to the sky, i.e. a single block above you.

0

Share this post


Link to post
Share on other sites

It seems like what would be helpful is some way to determine how 'enclosed' a space is. It sounds like any method of propagating heat block by block is going to be very calculation-intensive. I was wondering if it might be possible for a heat source to make a quick evaluation of its surroundings by sending out rays like the explosion mechanic. 

0

Share this post


Link to post
Share on other sites

As far as i understood, doing a simple calculation as in "what kind of block is at x,y,z" is a simple method call, assigning a block or value to that block is more of an issue.

 

What would be possible and what is my current idea, is to find a simple 3 dimensional space that is dead-on within a shelter. If the house is very "artistic" this may lead to complications but most ppl build pretty simple. The fireplace could store that info and whenever you are close to the fireplace you could ask it "am i within your space". Something like that.

1

Share this post


Link to post
Share on other sites

You have to ask cost/benefit for such convoluted and complex methods. Especially since the only difference would be that it forced players to build walls in a certain way. A simple check of if the player has view of sky would for the most part encourage players to build shelters. In vanilla and modded servers the players I see who don't build shelters build walls to keep out monsters and don't bother with roofs. So the monsters encourage walls and the temperature system could encourage players to need roofs.

You stated previously you mostly play of peaceful, so it is understandable that you don't need walls. I play on hard and find walls invaluable if I want to accomplish anything at night, especially since my protection is low due to my exploring nature.

As for you code you suggest. Even if the fireplace only had to scan once. The player would have to constantly check for fire pits in range and query whether they were in a valid shelter. What if there were multiple within range, what if some were in a valid shelter and some were not? What if the shelter was removed or added, how would you reset it? Sure there are likely solutions to all these issues, but to what end? It is a huge solution to a minor issue.

My suggestion would be along lines of what I suggested. Fire pits give off heat X blocks out in a gradient. Blocking view to sky extends the range. You could then re-use the protection area code and have a fire pit give off heat after the fuel is used up in proportion to how long it was burning. Sure it isn't perfectly realistic, but for goal and gameplay it works well.

1

Share this post


Link to post
Share on other sites

My suggestion would be along lines of what I suggested. Fire pits give off heat X blocks out in a gradient. Blocking view to sky extends the range. You could then re-use the protection area code and have a fire pit give off heat after the fuel is used up in proportion to how long it was burning. Sure it isn't perfectly realistic, but for goal and gameplay it works well.

I find this solution to be perfect, I myself feel no need to force the player into a fixed structure for shelter, but if that's the case the feature could check for sky access and proximity to a door, just like vanilla villagers. There you have it.

0

Share this post


Link to post
Share on other sites

I find this solution to be perfect, I myself feel no need to force the player into a fixed structure for shelter, but if that's the case the feature could check for sky access and proximity to a door, just like vanilla villagers. There you have it.

 

The distance to a door really adds nothing other than forcing players to spam their shelter with doors. Some of us like open floor plans, where there isn't a door to every single room, and instead open archways.

0

Share this post


Link to post
Share on other sites

Yeah it was silly. I will keep building my houses the way I always did.

0

Share this post


Link to post
Share on other sites

But if its only distance, then how can i seal off a room, a basement etc to keep it cool for food storage ? If i have to dig down 10 blocks that would ruin MY way of building rather realistic houses...

0

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.