Of course it's more problematic than it first seemed. Long story short, last week I spent a good chunk of time trying to figure out why functions I wrote weren't spawning anything at all. I don't recall all of the problems, but it was just one thing after another. You should have seen my browser tab - it was filled with Unity reference pages.
In any case, I decided to pick it back up this week, and finally got some progress forward.
Lots of learning and coding these past couple of weeks. Been trying to randomly spawn objects in the game world. Took longer than I wanted, and it's still wonky. Making progress, though. My sanity thanks liquor and pot. Read the Devblog in bio. #gamedev #gamedesign #indiegame #indiedev #solodev #indiestudio #prototyping #bsp #csharp #visualstudio #unity #unity3d #survivalhorror #roguelike #eclipseperilous
Previously, I had attempted to get item creation to fire during room creation. If I'm building the floors, walls, and doors, it should be a snap to also put stuff in them, right? Because my attempts were going nowhere in that department, I decided to simplify object creation and do it for the entire floor instead of room-by-room.
This method came with its own set of problems, specifically collision detection with previously instantiated game objects. Spawned objects simply didn't care if they appeared on top of walls and doors. For now, the fix I implemented was simple: everything that collided with a wall or door was instead moved to 0,0. With all of them there, it's possible to destroy them all in one line, or move them again, etc.