Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualDeafTV

Posted 23 December 2012 - 06:21 PM

I think what will benefit you most is to keep logic and rendering separate.

So some psuedo code of what I mean is:

int main(){
	
	//...

	while(running){
		//...
	
		Update();
		Draw();
	}
	
	//...
}

 

 

You want logic/character updates to be handled and then update the character based on what has happened.  Then the character should be drawn to the screen based on that.  Hope that makes sense because that is one of the things that I really struggled with at first.  Nice game so far too smile.png

 

Edit:

 

Another thing I thought that might help you is to decide what each "system" of the game does.  Graphics/Rendering functions probably don't need to know about the character or any of its members, but the character may need to know about these functions to draw to the screen.

 

This is the same for what paradigm said about movement and animation.  Movement needs to know about animation but animation doesn't need to know about movement.  This should help you structure your game a bit better.


#1DeafTV

Posted 23 December 2012 - 04:32 PM

I think what will benefit you most is to keep logic and rendering separate.

So some psuedo code of what I mean is:

int main(){
	
	//...

	while(running){
		//...
	
		Update();
		Draw();
	}
	
	//...
}

 

 

You want logic/character updates to be handled and then update the character based on what has happened.  Then the character should be drawn to the screen based on that.  Hope that makes sense because that is one of the things that I really struggled with at first.  Nice game so far too :)


PARTNERS