Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actualsobeit

Posted 20 July 2013 - 05:59 PM

Hi there, 

 

I'm not sure if this is actually possible to do, deleting some portion of code at run time.

What I want to do is to create a achievement system for my game. Let's say, the player will get an achievement when she kills the first enemy. In this case I need to do an "if test" if(enemyNumber == 1) {.....}. However this portion is completely useless for the rest of the game after she earns this achievement. And I need to do as many this kind of tests as the number of achievements in the game. I wonder if there is a way to deal with such problem, deleting code or changing code at run time? How do you guys normally handle it?

 

thanks in advance.


#1sobeit

Posted 20 July 2013 - 05:58 PM

Hi there, 

 

I'm not sure if this is actually possible to do, deleting some portion of code at run time.

What I want to do is to create a achievement system for my game. Let's say, the player will get an achievement when she kills the first enemy. In this case I need to do an "if test" if(enemyNumber == 1) {.....}. However this portion is completely useless for the rest of the game after she earns this achievement. And I need to do as many this kind of tests as the number of achievements in the game. I wonder if there is a way to deal with such problem, deleting code or changing code at run time?

 

thanks in advance.


PARTNERS