gm_voxelate icon indicating copy to clipboard operation
gm_voxelate copied to clipboard

Block extra data

Open SwadicalRag opened this issue 7 years ago • 8 comments

This means that each block will occupy more than 2 bytes (when we implement this)

kind of like damage values to store extra data in blocks??? how do we implement this???

how do we implement chests, for example?

SwadicalRag avatar May 15 '17 01:05 SwadicalRag

a separate std::unsigned_map linking an XYZCoordinate to a BlockBonusData struct or std::tuple<size_t, void *> to leave it up to the end user to figure out what they want????

SwadicalRag avatar May 15 '17 01:05 SwadicalRag

I think a separate unordered map of coordinates and a std::string is a good idea. We could store the bonus data in json or bON from lua

SwadicalRag avatar May 15 '17 02:05 SwadicalRag

Why are y'all even bothering with gmod at this point - sorry

On Sun, May 14, 2017 at 9:58 PM, swadical [email protected] wrote:

a separate std::unsigned_map linking an XYZCoordinate to a BlockBonusData struct or std::tuple<size_t, void *> to leave it up to the end user to figure out what they want????

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/glua/gm_voxelate/issues/40#issuecomment-301358424, or mute the thread https://github.com/notifications/unsubscribe-auth/AAf3MmiyEDRql7JLCdWGbW32sE_OJKOtks5r57EtgaJpZM4Nalo4 .

xaviergmail avatar May 15 '17 02:05 xaviergmail

wtf, just store it lua-side

MDFL64 avatar May 15 '17 02:05 MDFL64

moreover, just use source's builtin entities or our own entities for this

MDFL64 avatar May 15 '17 02:05 MDFL64

I disagree with using source engine entities for block data storage: there are too many limitations

And storing it Lua side would be easy, I just wanted your opinion on c++ or Lua for this

SwadicalRag avatar May 15 '17 02:05 SwadicalRag

actually, if map saving is done through c++, we might as well do bonus data in C++

SwadicalRag avatar May 15 '17 02:05 SwadicalRag

Not too hard

SwadicalRag avatar May 15 '17 02:05 SwadicalRag