Closed apodgo2 closed 7 years ago
shanil finished the first set of prefabs with commit d6529893557fea0b20234734384705a8f7fd44c1
We will be pooling them into the MapLoader.
I intend to add another set of Prefabs with some wall models soon that will hopefully be done by this demo, or if not this demo, next demo.
We got our second, hi-res set of Tile Prefabs loaded in as of commit a33a2660363a392531f92a867cc8c3309b362a42
We'll be adding more but the MapLoader now correctly pulls in Tile prefabs so we can add as many as we want, and in as many configurations as needed. I've decided to group them with folders in the Resources/Prefabs/Tiles, so that the old Tiles are in one directory, the SciFiTiles are in another, etcetc. This will allow us to load in sets of tiles and preserve their indices between them.
Additionally, note that the Tiles need to be numbered with a 0-pad, for example you need to number them like Tile_01 instead of just Tile_1 because the Resources.Load apparently seems to pull them in alphabetically.
Right now we have the Block prefabs generated inside
Assets/Prefabs/Blocks
. These are the prefabs we'll be loading and using to spawn Block GridObjects. Similarly, we need prefabs for the new Tile objects which will use the fancy walls that Shanil has created instead of block primitives. We need prefabs for all of the different GridObject types specified currently inblocks.key.txt
for Tile automatic map generation, created and stored in an identical manner as to the Block prefabs. You can use the Block prefabs as a reference for how your Tile prefabs should work, but you should use the new ID numbering system as specified within blocks.key.txt (the Block prefabs actually have the wrong ID right now, it's off by +1 to the keyfile).remember that +x = West, +z = North and make sure your prefabs are PERFECT because they'll be automatically loaded in and if they're off by even a few pixels, it'll be real noticeable when a bunch of them are stuck together. And if you mess up and use the wrong ID for an EastWall or whatever prefab than whenever an EastWall shows up in the map it'll use the wrong prefab which will result in the game having a massively screwed up map. Everything hinges on these prefabs being numbered and built correctly, otherwise we have no map.
We need all 20 prefabs, I thought we could pull it off with less but I was wrong it'll be a pain in the ass to do it with less
Once we do this, all we need to do to change the entire map is just change these few 20 or so prefabs.