12-29-2020, 01:31 AM
(12-28-2020, 10:42 PM)megamarc Wrote: Yes, that's a way to do it. Integers are 32-bit long, so you have up to 32 bits to encode pieces of separate info.
However I think it may be more manageable if you use type in a simplistic way, and have additional info on game data, not on map data. I mean, that the enemy health and dropped lot depend on enemy type. If you later decide that some kind of enemy needs to have different health or loot type, you just change once in your game data structures. If you've encoded this data in the map, you must change each and every instance of it by hand. That may become tedious and error-prone.
Yeah that works too, it depends if each instance has to have the same attributes or if you want each instance can have differents attributes