glua / gm_voxelate

A module for voxel support in Garry's Mod
https://glua.io
Other
21 stars 3 forks source link

Block extra data #40

Open SwadicalRag opened 7 years ago

SwadicalRag commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

xaviergmail commented 7 years ago

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

On Sun, May 14, 2017 at 9:58 PM, swadical notifications@github.com 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 .

MDFL64 commented 7 years ago

wtf, just store it lua-side

MDFL64 commented 7 years ago

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

SwadicalRag commented 7 years ago

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 commented 7 years ago

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

SwadicalRag commented 7 years ago

Not too hard