Open dantaeyoung opened 7 years ago
i like keeping the layout lining up consistently, but an object layer might be a nice way around that. is the goal to avoid defining a lot of similar objects redundantly? e.g. if i have A,B,C,D
which I want to all tag with food, I currently need to do:
// (in addFloor)
{
'A': {
'tags': ['food'],
'props': {
'tastiness': 10
}
}
},
'B': {
'tags': ['food'],
},
// etc im too lazy to do it here lol
}
if that's the case we could maybe do something like specify default tags/props for a set of object ids like:
{
'ABCD': {
'tags': ['food'],
'props': {
'tastiness': 10
}
}
}
}
we'd have to limit objects to single-character ids, but there are over 128000 unicode characters so i think that limit would be ok.
let me know if the concern was something else!
also, i hadn't thought of multiple objects at the same coordinate, that might be tricky...
for the 20 pile of guac, we could just have a height
property or something. but if they were different types of objects altogether, we'd have to do something like what you're suggesting.
from World.parseObjects:
Alternatively we could
%
, then%%
= two different pieces of food.%
, then%1%2
= two different pieces of food;%3%3
is one long chunk of food.