Thursday 20 November 2014

Hi guys,

designed a few levels for the game. I now want to link all the levels up, by starting on the first level, i want to be able to work my way up the levels. So i will have to design a new menu to replay level, go to main menu or go to the level select screen.

I have linked all levels, so when you finished 1st level you are given your score, then you select next level in the select level menu. This works but when i get to the 3rd level which contains more tiles than the rest it detects your characters movement right up until you get to the tile numbered 1 more than the previous level which then makes tiles from then on not be detectable .

all tiles and variables are reset at end of level, so not sure why this doesnt work, i have been through the code loads of times and cant find anything wrong. might need to take a break for a few days to clear my head and restart the process of finding the bug from the start. i have been staring at the code for a few nights now and cant seem to find whats wrong, its getting rather frustrating as i want to move on and create some baddies and missiles that you have to avoid. might just go ahead and create them then go back to try and find the bug, just to give me a break.

I persevered with the problem and changed my code about which made the code a bit more simplified, this now seems to work, although  i cant see why it does as the code logic is, as far as i can see, exactly the same but it gives me different results. I should have written the code like this to start with.

No comments:

Post a Comment