Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Double sprite

Author
Message
spiderrr
13
Years of Service
User Offline
Joined: 30th Oct 2011
Location:
Posted: 31st Oct 2011 03:23
So, i am making game with bugs, and i am suppose to double the number of bugs if i miss the bug. How exactly am i suppose to double the number of sprite/bugs when i miss it?

thanks
spiderrr
13
Years of Service
User Offline
Joined: 30th Oct 2011
Location:
Posted: 31st Oct 2011 03:41
i figured this out, but now what i want is when i click on the new generated sprite that everything that applies on the original sprite applies on the new generated ones...
how should i do that?
Stephen Young
16
Years of Service
User Offline
Joined: 23rd Feb 2008
Location: UK
Posted: 3rd Nov 2011 00:00
I dont fully understand what you mean but here goes.

Variable to store the number of currerent enemies, if you 'miss' a bug, the program will create another 'Variable' number of bugs. You would have a seperate function that applies a behaviour to each enemy, do this by making it apply the behaviour to all sprites greater than, lets say 5 (using 1-4 as your players sprite and some walls or w/e), for loops are great.

For example, you currently have 5 enemies of screen, they are dbSprite(5, - dbSprite(6, - dbSprite(7, - dbSprite(8, - dbSprite(9. They will all do their thing, what ever it is they do. When the player fails to do what ever you want the player to do, it will create 5 more enemies, dbSprite(10, 11, 12 ect ect. The function you have that makes your enemies do what ever you programmed them to do, will need to be updated with the new number of enemies on screen. Eventually if the player fails over and over the game will lag out and crash because of the vast number of sprites on the screen.

Login to post a reply

Server time is: 2024-11-19 06:38:03
Your offset time is: 2024-11-19 06:38:03