question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename World.Mask

See original GitHub issue

This is a cosmetic change intended to establish a better vocabulary for describing ECS concepts. I think mask is very close and I don’t want to change it if there isn’t a significantly better name.

The problem that I see with mask is that the values of the World.Mask array are not used as masks. They’re bitfields (or bitsets) but they’re not used to mask other bitfields in Goodluck. Instead, systems define their masks (QUERY) to filter entities to run on. The semantic difference is marginal, but I’d like to spend some effort and try to find a better name which would better describe how these values are used.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
stasmcommented, Jul 16, 2020

I was reading up on ECS design in languages with manual memory managment, and I came across an article by Austin Morlan in which he used the term signature to describe exactly what the values of World.Mask are:

Since an entity is simply an ID, we need a way to track which components an entity “has”, and we also need a way to track which components a system cares about. I chose the very simple approach of using a std::bitset (modern C++ equivalent of a bitfield), called a Signature. Each component type has a unique ID (starting from 0), which is used to represent a bit in the signature.

I really like this name. It gives us a single word to precisely describe a concept in Goodluck. Instead of saying a bit mask describing the component composition of an entity, we can say: the entity’s signature.

1reaction
stasmcommented, Jul 14, 2020

I’m going to leave this open for a few more days in case I have more ideas. So far, I don’t think any of the alternatives is significantly better than Mask.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rename the [masks] tag to [masks-a-new-generation]
Renaming the tag from masks to masks-a-new-generation will create a tag that more definitively looks like a book title without creating ...
Read more >
Changing my world's name? : r/Terraria - Reddit
When the world open, go to the World Properties tab on the right side. At the top you'll see the current world Name....
Read more >
Can you change your name in New World?
This quick New World walkthrough will explain whether it's possible to rename your character in New World.
Read more >
Renaming your masks - PressReader
Digital Camera World. Renaming your masks ... Right-click on a Mask and choose Rename to give the mask an appropriate name.
Read more >
Solved: Re: Is there a way to rename masks? - 8641816
Highlight the mask in question in the timeline. Hit the return key. Give it a new name.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found