Hi
I am trying to create what is for me a complicated game (easy for most of you I suspect) It is based on the game where a worm or caterpiller eats apples while trying to avoid poisonous apples, eating itself and avoiding barriers(you know the one)
The worm, apples and barriers are type. After each level I delete these
for apple.apples = each apples
delete apple
next
and redo them by using new apples etc.
I use a boolean variable that is set to false in the main loop unless the worm hits one of the items above. It is then set to true and a fuction is called that deals with the end of the game.
My problem is that every now and then, the worm dies for no apparent reason. This is as though a posionous apple is luking invisably. This seems to happen even if no poisonous apples are (or have been) visible. The barriers remain in a static position as do the screen edge barriers.
On restarting the game the existing types are deleted as above and redone. The boolean variable is reset. I have looked through the code soo many times that I am going crosseyed.
I appreciate that this is difficult without seeing the code, but does anyone have any idea why this might be happening.
Thank you in anticipation.
Mikeyfyn
I am trying to create what is for me a complicated game (easy for most of you I suspect) It is based on the game where a worm or caterpiller eats apples while trying to avoid poisonous apples, eating itself and avoiding barriers(you know the one)
The worm, apples and barriers are type. After each level I delete these
for apple.apples = each apples
delete apple
next
and redo them by using new apples etc.
I use a boolean variable that is set to false in the main loop unless the worm hits one of the items above. It is then set to true and a fuction is called that deals with the end of the game.
My problem is that every now and then, the worm dies for no apparent reason. This is as though a posionous apple is luking invisably. This seems to happen even if no poisonous apples are (or have been) visible. The barriers remain in a static position as do the screen edge barriers.
On restarting the game the existing types are deleted as above and redone. The boolean variable is reset. I have looked through the code soo many times that I am going crosseyed.
I appreciate that this is difficult without seeing the code, but does anyone have any idea why this might be happening.
Thank you in anticipation.
Mikeyfyn