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.
seraphin

Exchanging/suplementing light source mob spawning mechanism for inside/outside?

50 posts in this topic

Previously I wanted to add this as another post for the topic about Torches burning out

and the issues with mob spawning in darkness came out:

http://terrafirmacra...__fromsearch__1

But it's actually a seperate topic.

There could be a mechanism for differentiating between outside and inside.

Below my proposition. Feel free to criticize, modify, think of different uses or

tell me if it's too memory/cpu consuming to even try, useless, etc.

======================

In order to tell the difference between inside and outside, You can use the following method.

1. You build an enclosed space. Finish it with a hole and a door in the "correct direction".

(i.e. placing the door from the outside)

2. Everytime a door is being placed You run a kind of "modified" 3D A* (A star) "pathfinding"

algorithm.

By which I mean, first You choose a number that names the shape.

The starting location of the algorithm would be the block just in front of the door inside.

(assuming the two blocks are air)

Then it could search only in 6 directions (up, down, N,S,E,W).

Every time it would reach a block, it would mark it as

the chosen number of the area being enclosed. (for blocks that are

the boundries of multiple areas, there could be 6 marks in total -

cause that's the max amount of areas a block could be set to in the

weird geometry.. or it could be limited if memory or lag is an issue)

The algorithm would also mark all the air blocks it passes through.

If it reached an air block it would continue on it's path.

Otherwise the branch of the search would stop.

When a branch first reaches a specified length (256? 1024?

whichever based on balance between size and cpu/memory usage)

the algorithm terminates and removes the marks to blocks it set

during that algorithm (but not any other areas.)

3. Everytime a block is being destroyed, it will check whether it has

any marks of an area. If it doesn't, it does nothing. If it does,

it checks the blocks around in 6 directions.

If any block from the 6 sides does not belong to any area

(i.e. belongs to the outside) the area gets deleted.

(all marks removed) And needs to be set once again

by destroying and setting the door again.

If all the surrounding 6 blocks belong to some areas,

then if it's only one area, do nothing. (I assume destroying

the block will do nothing directly to the value of assigned

area and thus the block will just be replaced with air

belonging to the same area)

If it's more than one area, merge them together. Use

one of the numbers of the assigned area and change

all the block marks into that number. Dispose of the

unused rest of areas.

4. You might limit the amount of areas You can set if that's an issue

for memory.

5. You would be informed, if the area was set correctly, failed to be set

and why (the blocks in front of the door inside are being occupied OR

the search branch reached it's length limit i.e. "area too large").

You would be also informed if You managed to destroy the area

by destroying it's boundaries. (and number of areas destroyed)

Or about merging of areas due to destruction.of the wall between

them. (if there was more than one obviously)

6. Mobs can't spawn on top of blocks that belong to some area.

MODIFIED FOR WALLS WITHOUT CEILING

1. You could possibly modify the algorithm for a different kind of enclosing,

which would be a wall without a ceiling. Maybe using a different kind of

entity other than the door (gate?) or a different kind of door. You might

do the same kind of algorithm with the difference of adding a limitation

to the branches so that the last (? 2-3 ?) moves in a row along the search

branch couldn't be all upwards. Thus the wall would limit them.

2. (OPTIONAL) The algorithm still might to check if the wall just limits going outside,

but also inside. The outside of the wall might simply be easy to go up on

and jump down inside. (well, mobs often don't jump down anyway if it's high...

or they shouldn't survive it) Thus a search would try to find a valid path from

the outside of the wall to the inside. If none was found, the area would be set.

Otherwise failure with the reason ("a path inside still exists", "area too large/not enclosed").

ADDITIONAL STUFF

Big gates possible to build?

TROUBLESHOOTING

If You want to set multiple entries to an area, simply make a new

hole that will delete the area and then set the new door that will

create the area again. (treating an already standing door no different

than a wall)

FPS TIPS???

It's not necessary to check which areas does a block belong to during

it's mining. It's enough to set an additional value that just says:

TRUE - "it belongs to some area"

or

FALSE - "it belong to no area"

It could be updated if an area change process actually triggered.

----------

Edit 1:

Doors can be locked and unlocked from the inside (hold SHIFT mechanism?),

but not outside?

0

Share this post


Link to post
Share on other sites

while it would be interesting, i do not know if this is possible coding wise, for homes, i still think they should have to be lit, that may just be i, but for city zones, i think there are plenty of little mods that restrict mob spawning within the limits, overall, opinion :would be cool, but probably too difficult to code when not needed.

0

Share this post


Link to post
Share on other sites

while it would be interesting, i do not know if this is possible coding wise, for homes, i still think they should have to be lit, that may just be i, but for city zones, i think there are plenty of little mods that restrict mob spawning within the limits, overall, opinion :would be cool, but probably too difficult to code when not needed.

I don't have a large enough knowledge about mods out there, but the mods limiting mob spawning, pvp,

griefing etc.that I have seen, have been based around being inside some cube with a center around a block.

Which is a totally different solution. Cause it has nothing to do with any physical boundaries.

And seems pretty magical.

0

Share this post


Link to post
Share on other sites

Then, building walls for your house will avoid monsters to spawn inside it? Why does that sounds so familiar?

... Oh, yeah, it's the minecraft way to rip off Terraria system :P

Now seriously... i don't know if possible, but if it is, it's sounds like a good solution. So yeah, here you have a +1 until Bioxx/Dunk/any other dev decides to appear here and say it's impossible :X -not saying it will happen...

0

Share this post


Link to post
Share on other sites

Rip off terraria? Terraria came out WAYY after Minecraft did...

0

Share this post


Link to post
Share on other sites

Rip off terraria? Terraria came out WAYY after Minecraft did...

but before TFC.

I think it might be possible, but it depends how we want to handle this and what we want to do with TFC.

0

Share this post


Link to post
Share on other sites

I see a flaw... So basically if you found every entrance to a cave and blocked them and placed a door, that would be home. You can't find every spot in a TFC cave, you will get lost. So there would be a huge unlit area that baddies cant spawn in. And technically how this may work with minecraft's coding implemented, is an unlit part will technically be outside. Now if you get proper lighting and that spot is branded home, what is it going to be used for? I see it a bit unfair to be able to have an unlit house and just because the code thinks it's your house, nothing will eat you in the night. This could go somewhere if you could answer that question. And maybe you could have a terribly lit house, but you can see everywhere and no place is completely dark, but dark enough for mobs to spawn, since you obviously explored the place a bit, I can see that working.

And yes it is ripping off Terraria, not because TFC would have it, but Terraria had it before anything in Minecraft.

0

Share this post


Link to post
Share on other sites

I see a flaw... So basically if you found every entrance to a cave and blocked them and placed a door, that would be home. You can't find every spot in a TFC cave, you will get lost. So there would be a huge unlit area that baddies cant spawn in. And technically how this may work with minecraft's coding implemented, is an unlit part will technically be outside. Now if you get proper lighting and that spot is branded home, what is it going to be used for? I see it a bit unfair to be able to have an unlit house and just because the code thinks it's your house, nothing will eat you in the night. This could go somewhere if you could answer that question. And maybe you could have a terribly lit house, but you can see everywhere and no place is completely dark, but dark enough for mobs to spawn, since you obviously explored the place a bit, I can see that working.

And yes it is ripping off Terraria, not because TFC would have it, but Terraria had it before anything in Minecraft.

"baddies" as you put it, probably won't spawn in caves like that. I want to make caves sufficiently dangerous on their own. We're probably going to be reintroducing some auto generated structures, more along the lines of ancient tombs and crypts, with hordes of undead and secret treasures.... (maybe uncraftable tool plans????? who knows lol)
2

Share this post


Link to post
Share on other sites

Rip off terraria? Terraria came out WAYY after Minecraft did...

What i meant was that this looks, and have the same effects the terraria system for avoiding monsters spawning in your house has. It looks like if the guy who posted this had looked at Terraria, then TerraFirmaCraft, and thought: "Mmm, both start in Terra, maybe they should work the same way in this" and came here to post this. Just a theory, though :P

And...

I see a flaw... So basically if you found every entrance to a cave and blocked them and placed a door, that would be home. You can't find every spot in a TFC cave, you will get lost. So there would be a huge unlit area that baddies cant spawn in. And technically how this may work with minecraft's coding implemented, is an unlit part will technically be outside. Now if you get proper lighting and that spot is branded home, what is it going to be used for? I see it a bit unfair to be able to have an unlit house and just because the code thinks it's your house, nothing will eat you in the night. This could go somewhere if you could answer that question. And maybe you could have a terribly lit house, but you can see everywhere and no place is completely dark, but dark enough for mobs to spawn, since you obviously explored the place a bit, I can see that working.

And yes it is ripping off Terraria, not because TFC would have it, but Terraria had it before anything in Minecraft.

How about if both systems, vanilla and the one seraphin proposes, were merged? So your house is mostly safe, but if it is too big, mobs will spawn in any poorly iluminated area. That would avoid the players to explore caves safely, while keeping your reasonably sized house safe. I'm sorry for those who love mansions :P

EDIT: You posted while i was writing this, Dunk xD nevermind, that sounds cool :3 but my point still stands.

As you said some time ago that redstone would mostly be for bragging, and you are talking about ancient tombs and crypts, it may be possible to have redstone traps in there, for simulating the traps we all see in Indiana Jones's movies? I mean, probably for having a tomb the guy buried down there must have been a king/queen with a very luxurious life.

0

Share this post


Link to post
Share on other sites

Loving the auto generated structures idea dunk, and the uncraftable plans. that would be amazing,

"Come to newhaven, we are the only smiths that can forge Spiked Mail," Or something along those lines.

0

Share this post


Link to post
Share on other sites

I see a flaw... So basically if you found every entrance to a cave and blocked them and placed a door, that would be home. You can't find every spot in a TFC cave, you will get lost. So there would be a huge unlit area that baddies cant spawn in. And technically how this may work with minecraft's coding implemented, is an unlit part will technically be outside. Now if you get proper lighting and that spot is branded home, what is it going to be used for? I see it a bit unfair to be able to have an unlit house and just because the code thinks it's your house, nothing will eat you in the night. This could go somewhere if you could answer that question. And maybe you could have a terribly lit house, but you can see everywhere and no place is completely dark, but dark enough for mobs to spawn, since you obviously explored the place a bit, I can see that working.

And yes it is ripping off Terraria, not because TFC would have it, but Terraria had it before anything in Minecraft.

1. HOUSE. Huh? You built a house. Closed the door. Nobody can come in. You killed all the monsters that

were inside. The house is totally dark but with walls, ceiling, doors closed. Why would a monster spawn inside?

Unless You like the idea of the darkness being an entity that spawns monsters from nothingness.

I see it more as a ... the monsters already exist somewhere far enough or unexplored... unprotected by walls.

And then they migrate. I see spawning as a mechanism of hidden migration, not as a mechanism for magical

appearance out of thin air.

2. CAVES. That's where the search branch length limit comes in. If the "arm of the search" has length limit, the area can't be too large.

3. I only remember watching Terraria on YouTube. Don't even remember playing it (I'm not sure, maybe for a very short time, but I didn't like it) and I didn't know

there's any such solution there, so no rip off there on my part.

0

Share this post


Link to post
Share on other sites

Loving the auto generated structures idea dunk, and the uncraftable plans. that would be amazing,

"Come to newhaven, we are the only smiths that can forge Spiked Mail," Or something along those lines.

yeah, that's the sort of thing I like. We don't want to unbalance things, but it gives an interesting new way to play. At one point, we considered having certain enchantments only be found in these such dungeons, so if you wanted any enchantments, you'd have to explore and see what you could find. I don't even know if we're doing magical enchantments any more, so no one jump in here and yell "ENCHANTMENTS. MAGIC. I WANT. NOW. GIVE ME MAGIC. HURR HURR DURR HURR"
0

Share this post


Link to post
Share on other sites

"Come to newhaven, we are the only smiths that can forge Spiked Mail."

I'm going to the elves to get (op) mithril!

"ENCHANTMENTS. MAGIC. I WANT. NOW. GIVE ME MAGIC. HURR HURR DURR HURR"

PLEASE! get rid of them! I have never used them, except for silk touch. The system is stupid anyway.
0

Share this post


Link to post
Share on other sites

I like the idea of Realistic "enchantments" like sharpening with a grind wheel, and oil to increase speed, stuff like that.

0

Share this post


Link to post
Share on other sites

I like the idea of Realistic "enchantments" like sharpening with a grind wheel, and oil to increase speed, stuff like that.

That's good, not really enchantments. But oil increasing speed? (I vote cocaine :P) How about the weapon has a 50% chance of flying out of your hand and shanking a bro. What you are thinking of is tempering. You can decrease the weight to increase speed, but realistically that isn't the best one because you are going to lower the power you can put behind the swing, sharpening is a obvious one. Look up tempers in Mount & Blade: Warband, there are good examples there.

I did forget about the distance thing, so caves wouldn't work like that unless your computer could take it. About monsters spawning in the dark. When you were a kid I'm sure you were scared of monsters in the dark, I'm pretty sure that's why Notch made monsters spawn in a certain light level. I do agree with it, it allows more mobs to spawn, now there need s to be other methods because of the good mobs not wanting to spawn in TFC as much. If you go deep in a cave to where there is 0 light and build a house in part of the cavern with no lighting monsters should spawn in your house, and very fast. If you feel like settling in 0 light, I want you to be raped by monsters. 1 light, should have a chance of spawn. 2 light+ after explored should not spawn anything if it's in your house.

0

Share this post


Link to post
Share on other sites

I understand tempering, you increase the carbon content, it causes the tool to be harder, but more brittle, not what you said...

0

Share this post


Link to post
Share on other sites

I understand tempering, you increase the carbon content, it causes the tool to be harder, but more brittle, not what you said...

Yes, all the other stuff though, I don't know what to call it. I have just heard all of that to be tempering also.
0

Share this post


Link to post
Share on other sites

me in PM to seraphin said:

I did forget about the distance thing, so caves wouldn't work like that unless your computer could take it. About monsters spawning in the dark. When you were a kid I'm sure you were scared of monsters in the dark, I'm pretty sure that's why Notch made monsters spawn in a certain light level. I do agree with it, it allows more mobs to spawn, now there need s to be other methods because of the good mobs not wanting to spawn in TFC as much. If you go deep in a cave to where there is 0 light and build a house in part of the cavern with no lighting monsters should spawn in your house, and very fast. If you feel like settling in 0 light, I want you to be raped by monsters. 1 light, should have a chance of spawn. 2 light+ after explored should not spawn anything if it's in your house.

1. I don't exactly like many things Notch did. If not mods, I would already

get bored of Vanilla Minecraft.

In fact I prefer dangerous realistic animals over vanilla monsters.

2. I don't know if that's the reason Notch made them spawn in the dark,

but another reason might have been simply technical. That when monsters

spawn in the dark, You generally can't see the actual process of spawning,

i.e. it seems as though they came from somewhere on "foot" and not

appeared from air. It's a good way to hide the fact that they are spawning

close by (making them spawn further would require more memory) and not

walking from further away outside of sight range.

3. My personal opinion is that if I build a house that is impenetrable from the outside

through physical means, no monsters should spawn inside.

I see plenty of ways to make the world spawn enough creatures without

depending on light/darkness.

And light can also be connected with this system.

0

Share this post


Link to post
Share on other sites

1. I don't exactly like many things Notch did. If not mods, I would already

get bored of Vanilla Minecraft.

In fact I prefer dangerous realistic animals over vanilla monsters.

2. I don't know if that's the reason Notch made them spawn in the dark,

but another reason might have been simply technical. That when monsters

spawn in the dark, You generally can't see the actual process of spawning,

i.e. it seems as though they came from somewhere on "foot" and not

appeared from air. It's a good way to hide the fact that they are spawning

close by (making them spawn further would require more memory) and not

walking from further away outside of sight range.

3. My personal opinion is that if I build a house that is impenetrable from the outside

through physical means, no monsters should spawn inside.

I see plenty of ways to make the world spawn enough creatures without

depending on light/darkness.

And light can also be connected with this system.

1. Nobody here agrees with Notch.

2. Spawining animations or smoke particles can be added, not that it's necessary . Unless mobs start having an insanely high spawnrate, I don't see them taking out the way they spawn.

3. I get that and I half agree.

0

Share this post


Link to post
Share on other sites

Minecraft is the sort of game where you can't turn the lights out when you leave a room. Unless you want your brain eaten by zombies. I want to change that lol.

0

Share this post


Link to post
Share on other sites

Minecraft is the sort of game where you can't turn the lights out when you leave a room. Unless you want your brain eaten by zombies. I want to change that lol.

Really? What do you say about proper lighting though, should they spawn in the dark of your house if you did a bad job overall. It would be cool if you safely lit your house, but had a dark and spooky cellar, but since the rest of your house is lit well, you don't have Resident Evil in your basement.
0

Share this post


Link to post
Share on other sites

Really? What do you say about proper lighting though, should they spawn in the dark of your house if you did a bad job overall. It would be cool if you safely lit your house, but had a dark and spooky cellar, but since the rest of your house is lit well, you don't have Resident Evil in your basement.

did you read my post about crypts? Monsters will not spawn in darkness in TFC.
2

Share this post


Link to post
Share on other sites

did you read my post about crypts? Monsters will not spawn in darkness in TFC.

What is this reading you speak of? When I right giant posts it involves me bashing my head on the computer. I saw it, skimmed it, moved on. In other words... Yeah.
0

Share this post


Link to post
Share on other sites

Minecraft is the sort of game where you can't turn the lights out when you leave a room. Unless you want your brain eaten by zombies. I want to change that lol.

That's a good thing it'll change.

Personally in Real life I often like hanging around my house at night without any lights on.

I have good night vision and I like using those 0,3 Watt type of lights for many things.

And I'm not scared one bit of hanging out in the dark. It's actually pretty relaxing.

In reality, when You turn the light on in the night, the "monsters" can see You through

the windows, but You can't see them. Actually the light may make it more difficult

to see anything outside when it's dark.

0

Share this post


Link to post
Share on other sites

What is this reading you speak of? When I right giant posts it involves me bashing my head on the computer. I saw it, skimmed it, moved on. In other words... Yeah.

Dang man, it was a direct reference to you, and right after you too

"baddies" as you put it, probably won't spawn in caves like that. I want to make caves sufficiently dangerous on their own. We're probably going to be reintroducing some auto generated structures, more along the lines of ancient tombs and crypts, with hordes of undead and secret treasures.... (maybe uncraftable tool plans????? who knows lol)

0

Share this post


Link to post
Share on other sites