[v.154] SimpleZone | A simple, fast and new Zone module!

Hi, if your zone part is being moved unfortunately a zone created via fromParts won’t actually automatically adjust :V, if you want that ability you need to use LessSimpleZone which has Zone:UpdateVolume(), sorry if I respond a bit late as I have exams :V

1 Like

They are static objects and haven’t been moved. I ended up just switching it to Zones+ cause I did try LessSimpleZones as well and had the same issue occur.

The module is great and would’ve been helpful but just that one bug was a barrier for me. It might’ve been user error I’m not sure but I was able to get what I needed done with a different Zone module.

1 Like

I’ll try seeing if I can replicate the issue when i get home, thanks for the report :slight_smile:

Much appreciated, if you need it this is the model. Hopefully it’ll make it easier to replicate the bug if it is an issue with the system.

Template.rbxm (16.6 KB)
Code used is ofc in the previous post.

1 Like

Hi. Sorry to bother you but when I used the latest version of SimpleZone the fromParts constructor wouldn’t work even though everything seemed correct, including the parameters and such.

Same also applies for LessSimpleZone.


Using the latest version of simple zone in this video.

Here’s a reproduction file if you need it:
SimpleZonePossibleBug.rbxl (80.9 KB)

I don’t believe this is intentional, I could be wrong though.

The original test zone also used to work now it doesn’t anymore.
SimpleZoneTest (2).rbxl (523.7 KB)

1 Like

Package Version 124:

  • Changed the voxel size for BVHs to 0 instead of 4 to prevent accuracy issues (you can change and modify this if you want)
  • Changed the default OverlapParams generator function to consider replicas
  • Changed a few statements around in the .fromParts constructor

I just got home and this fixed both @BIGHEAD_RIPOFF and @wallofgarlic s issues! It’s kinda an oversight from my end lol, I’ll add runtime typechecking in v.125

2 Likes

Package Version 125:

  • Added runtime typechecking using t for all Zone method except Update
  • Refactored the Update function to be shorter and have less nesting
  • Refactored the entire main module by moving long utility functions into its own module
  • Added stricter checking for QueryOptions
  • Fixed error for default OverlapParams generator when not in seperate query space (why did noone spot this??)
  • The module is now strictly typed
  • Removed useless lambda functions and deprecated stuff from the return table, and also unexposed things like the BVH module and the Zone class (this is for the purpose of debloating the return value, lmk if u still need it)
  • Removed _s from non-function members and made them all PascalCase indicating you can use them (don’t mess em up tho)

Note that this update does actually like break the entirety of LessSimpleZone so uh im gonna release an update for that too :V

Spline.rbxl (104.0 KB)

Can you quickly take a look at this?

If I’m doing this right then the collision detections for the part moved by the spline is horrible.

1 Like

Hi, the default .fromParts() constructor doesn’t actually update with the parts (it’s static) so to achieve what you wanna do you wanna use LessSimpleZone, updating the volume in a heartbeat loop like so

Honestly this isn’t the most optimal and I am aware of this so I am currently working on replacing the entire BVH system with spatial hashmaps, which will be simpler and shorter to work with hopefully :V (if not i can just keep it)

Btw this spline module is pretty cool, can you share where you got it? :>

Thanks for your work.

1 Like

Hey so is there a way to get the specific zone’s part that is entered/exited

Using QueryOptions.AcceptMetadata a 2nd parameter, metadata, will be passed to ItemEntered and ItemExited (and by extension your :ListenTo() callback), for zones made with .fromParts() this metadata table contains 1 member, metadata.part, which is the zonethe item entered/exited. For zones made with .fromBoxes(), this is metadata.box, same deal.

Package Version 129:

  • Fixed Zone type incorrectly typing certain members as optional/straight up wrong

Package Version 134:

  • Added more docstrings for the query space methods
  • Changed the format of SearchFor, from the old dict into a new array so you can check multiple properties for different values
  • Query spaces made on the server are now stored in ServerStorage instead of ReplicatedStorage

Hi. When using Version Number 125 or above for some reason this error is spammed in the console.
(appears to happen when using separate query spaces)


This does not happen on 124 or below.

1 Like

Oooooof i forgot to change the member accesses there :sweat_smile: That should be zone.WorldRoot and zone.QuerySpace, thanks for spotting the issue

Package Version 135:


Everything else works fine though only issue is when InSeparateQuerySpace is enabled GetItemsWhichAreA and ListenTo don’t fire or get items.

1 Like

Hi, I can replicate the issue, I have a good idea on what it probably is, will get back to you in a few mins Nvm i just forgot to call bindtoheartbeat :sob:

Hi, I can’t replicate the issue, can you send your test place maybe? (The issues you’re describing also line up with not calling BindToHeartbeat, please check if you did that)