💀- It came to me as I drifted…

Do you ever have that moment when you’re falling asleep or have just woken up and suddenly the answer to a problem you’ve been working on is magically in your head? Thankfully, that happens to me sometimes, and recently it fixed a problem in my game.  As I mentioned in the procedural generation blog post, most things were generating as expected, but I was having a problem getting my instanced static meshes to populate in the right place.  They just kept defaulting to 0,0,0.  I tried a number of ways to initialize them in an attempt to fix the problem, but it wasn’t working.  I put it out of my head and started working on other things.  A few days later, as I fell asleep, I realized that I was initializing it in the wrong place.  I almost forgot about my revelation.  I had family in town and I wasn’t really planning to work on my game that day, but when I remembered, I figured I’d pop the file open real quick and give it a try.  And it worked!  It took at most 2 minutes, and suddenly, this issue that had plagued me was fixed.  I tested and tested, to make sure it was real, and it was.  😀  Now there will be unique terrain-features (mountains, rocks…) layout everytime you start a new level.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close