Sunday, April 7, 2013

Make Your Own Game - Moving 2D Sprite On the Game Screen By GTGE

By Unknown | At 6:42 AM | Label : , | 0 Comments

As the video link that you see, in this post I will show you how to move the Character 2D Sprites on the game area, but before I get started I will discuss about anything that should be done before moving the 2D character sprites in the game area, certainly on this review I still use 2D game engine library: Golden T game Engine. If you read my previous article titled "animated character 2 Dimensions with GTGE" there is a method named "update" through this metod we can specify the buttons that can be used to move the character sprites in the game.




In this experiment we will make this 2D Charater Sprite move to the left and  the right by using the button "left arrow and right arrow" on the keyboard, and the this 2D Charater Sprite  is still used as in the previous post that the game's character named "bill rizer" with the 6 columns index and 2 rows index as on the picture below:





First, prepare the three abstract methods as a basic foundation in building a game-based Golden T Game Engine, if you do not understand how to make the three abstract methods please visit the following article "animated character 2 Dimensions with GTGE" and download souce code example, well here we already know that to to the left we use sprite index from 1 to 6, to the right we use sprite index from 7 to 14. Implementation of the code is as follows, place the following function into the metod "update"


◄ Posting Baru Posting Lama ►
 

Copyright © 2012. Jan Baker's Blog - All Rights Reserved B-Seo Versi 5 by Blog Bamz