probably not an awful lot. Well to me, it means the very source of a lot of pain and frustration over the past few days. Let me explain:
What I tried to do was spawn some random enemies in my rooms. Well that went perfectly well, enemies spawned in my rooms without a problem. Then, I let the enemies follow the player around which I had working quite quickly. So, the only thing left was for the enemies to remember the last position they were when the player leaves the room.
So basically, I tried to save the enemy position into the class that defines the 'room' the player left. BUT.... I discovered that this position wasn't only saved in the room the player left, but also the new room the player entered. In other words, the enemy was at the same coordinates in every room somehow. I was completely sure that I modified the right enemy and the right room so that wasn't the problem. So what could it be?
Well that question bothered me since christmas, until today. That brings us back to:
Because what I thought is that I could use this line to load new enemies into my game. So basically, every room had a list of these randomly loaded enemies. But what actually happened was that every room basically pointed to the same exact enemy, namingly the one that I loaded in the line of code above. In other words, if I changed the position of the enemy in one room, that position would be changed in all the other rooms as well because they all basically pointed to the same exact enemy!
And like that the days of insanity ended and I finally figured out why nothing worked like I expected it to work...
So, the progress I made this week was:
- add a key and a locked door to each dungeon floor
- add enemies to the rooms in the dungeon
- export the project to a mobile phone
doesn't seem like much, but trust me... it was quite some work to make it work properly. Hopefully I'll have a fighting screen ready by next week.
For questions, feedback or requests I can always be reached at:
indiestepsblog@gmail.com











