Wednesday, 30 January 2019

30/1/2018 - Colorman dodge (Basic codes)




These are some basic codes samples I think I would use it much in the future:
  • <activity android:screenOrientation = "sensorLandscape"> inside AndroidManifest.xml file to make sure that the gamescreen is in landscape mode.
  • private int screenWidth = Resources.getSystem().getDisplayMetrics().widthPixels; //get the screen height
  • private int screenHeight =Resources.getSystem().getDisplayMetrics().heightPixels; //get the screen height
  • private Bitmap image = BitmapFactory.decodeResource(getResources(),R.mipmap.ic_launcher); //get the image of ic_launcher in res/mipmap

  • In order to make the graphics work on any screen, every images is related to each other. For example, no matter what the screen size is, colorman will always walking on the ground, this is because I make the colorman sprite grow with background. If the background grow at the scale of 2, the colorman sprite will grow at the scale of 2 too.
  • Colorman moving left and right when user touches the left side of the screen, and the right side of the screen. (the upper left corner still have the original hailstone file)

29/1/2018 - Planning to create a simple dodging game




  • Planning to create a dodging game while there is some hailstones falling from the sky and the player will try and dodge it
  • A sprite is created


  • A background is created

  • Falling items are created

  • Made the background fit the screen size
  • Put everything into 1 screen

  • Problem: need to think of an algorithm that will make image everything dynamic



Tuesday, 29 January 2019

28/1/2019 - Learning Basic Android Studio for Game




  • Created a sample code Hypeman.apk, which will just shows hypeboy walking animation.


<>


Hypeman.apk has a frame-rate of approximately 1FPS. It will repeatedly loop the walking animation.

PS. Tested only in Samsung Galaxy Note 3. The problem with this is when user tilt the screen from portrait to landscape, the Hypeman will not be in the screen. This is because Hypeman wasn't created dynamically.



18/7/2019 - Survive that planning

Planning A top-down shooting game Player use WASD to move Use mouse cursor to aim Mouse left-click to shoot, and right click to throw ...