Advertisement

How to rejoin after died

Started by March 10, 2005 03:30 PM
1 comment, last by Drew_Benton 19 years, 8 months ago
As my game is space invaders, when the alines get all the way up to the ship, the player loses a life, but how do i restart the level, do i call run() again using LWJGL by the way cheers
Restart the level would restart the aliens too. So, just recreate the ship at where it got destroyed.

What's LWJGL?
Advertisement
Lightweight Java Game Library (LWJGL)?! Are you in the right forum buddy? You might want to make a 'reset' function that does everything for you. So in your main loop:
Main Loop   Update Enemy   Update Player   ...   if( die)      reset()   ...


That way you won't have to change anything really, the game loop just keeps ojn going until you are out of lives.

This topic is closed to new replies.

Advertisement