Friday, 19 July 2019

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 grenade
  • Enemies will keep coming towards the player
Currently Done
  • Player will rotate according to the mouse cursor
  • Player can shoot 1 bullet

Current Problem Faced
  • Player system is not completed
  • Player can't shoot more than 1 bullet
  • Don't have a weapon system planning yet
  • Don't have a enemies system planning yet
Features that might be considered
  • Player can choose male character or female character
  • Player maybe can choose different weapons or swap different weapons
  • Spawn random items for healing or spawn weapons








Sunday, 7 July 2019

7/7/2019 - DodgeIt v1.1


Dodge It version 1.1 has been done with 5 levels, and a players record system.

Thursday, 4 July 2019

4/7/2019 - Previous record done and 2 levels implemented



Previous Record

  • Player are able to view all the  previous records, by pressing W/S or ↑/↓ to view it.
  • Player are also able to use the mouse scrolling to view the previous records.
  • It will show 11 players record, at 1 time, on the screen.
  • When it reaches the start of the list or end of the list, it cant be scroll, nor use W/S or ↑/↓ to scroll.
  • Player can use 'backspace' to return to main menu.

2 Levels Implemented

  • Level 1 is items falling at the same speed.
  • Level 2 is items falling at different speed.


Need to be done next

  • Rearrange the code, and reuse some codes.
  • Allows player to enter their name at the end of the game.
  • Allows player to replay the game.




Thursday, 27 June 2019

27/6/2019 - Working on DodgeIt_v1.1


Already Done
  • Added "Previous Record" and "Exit" on the menu.
  • The menu now can only be control by W/S or ↑/↓ only, no more mouse control.
  • Able to read previous record


Going to be Done
  • Allows player to enter their name.
  • Write the current player record into the player record file.
  • Able to play 2 levels.
  • Gonna add some background music.

Current Problems faced
  • When the player is in "Previous Record", if the player press S or ↓, it will go back to the menu again.
  • Player are unable to see the full previous record, as there is no scrolling option.

Features that might be considered
  • The previous record data can be arrange as the highest score will be at the top, and the lowest score will be at the bottom. Need to work on an scoring system on this.








Saturday, 15 June 2019

15/6/2019 - Dodge it (version 1)

DodgeIt.v1 is created. It allows player to use either 'a' and 'd' OR ← and → to move the user square. If the falling items hits the player, then game over.






Currently 2 levels are done, which is all objects are falling at the same speed, and objects falling at different speed. Only objects falling at the same speed is implemented in DodgeIt.v1






A sample program to save player data into a .dat file (so that there is previous player records)





Friday, 1 March 2019

28/2/2019 - Dodge it planning





  • A Python version of colorman dodge (as I didn't finish the game for android) , but only use square, and name it 'Dodge it'.
  • Pygame will be use as the graphics.
  • User will be able to use 'a' and 'd' OR ← and → to move the user square.
  • Need user to move left and right without go off screen, falling items algorithm, start screen, game over screen.
  • Extra features (maybe): user will be ask if the want to replay the game, a file that stores users' previous records, can quit the game at anytime, can choose what background music they want.

Saturday, 23 February 2019

Hangman - Pygame


User Manual

3 difficulty level and 1 hidden color level

  • Easy
  • Medium
  • Hard
  • Color
User can either click on the menu, or they can press the number on keyboard to choose the difficulty level.

After the level of difficulty is selected, the time will start counting and user will have to guess the word.

If the user invalid input, nothing will be done. If user guess the correct alphabet, it will shows on the screen. If user guess it wrong, the chance will minus 1. User will have 10 chances.

User can enter 0 to quit the game.


Sunday, 10 February 2019

5/2/2019 - Static fragment and dynamic fragment



Static fragment

  • Static fragment is a fragment that can't be change during runtime.
  • It uses <fragment> widget from Android Studio.
  • Only .xml file.
  • Nothing need to be declared in MainActivity.java



Dynamic fragment

  • Dynamic fragment is a fragment that can be change during runtime.
  • It uses FrameLayout widget to be a container for it.
  • It needed to be declare in the MainActivity.java

For example,

Dynamic fragment sample code:

//MainActivity.java
public class MainActivity extends AppCompatActivity
{
   //set as public static, so it can be use in other fragment activity too
   public static FragmentManager frag_manager;

   @Override
   protected void onCreate(Bundle savedInstanceState)
   {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);

      frag_manager = getSupportFragmentManager;
      
      //the FrameLayout id = fragContainer in activity_main.xml
      if (findViewById(R.id.fragContainer) != null)
      {
         //if the item is saved, which means that there is already a item there
         if (savedInstanceState != null)
         {
            return;
         }
         
         //begin the transaction for fragment
         FragmentTransaction frag_trans = frag_manager.beginTransaction();

         //declare the first fragment item, which is the FirstFrag.java
         FirstFrag first_frag = new FirstFrag();

         //add the first_frag.xml to the FrameLayout container
         frag_trans.add(R.id.fragContainer,first_frag,false);

         //commit the fragment
         frag_trans.commit();
      }
   }

}


The code above will add the fragment into a FrameLayout container. The fragment inside the container can be change, eg. currently is first_frag.xml in FirstFrag.java, but it can be chage to second.frag.xml in SecondFrag.java too, a button can be add to perform the change of fragement during runtime.







Tuesday, 5 February 2019

4/2/2019 - Learning Android Studio






Saturday, 2 February 2019

1/2/2018 - Learning Android studio for the colorman dodge game




  • Problem face: need to generate random amount of hailstones to fall from the sky, and need to find an algorithm to make sure that when the hailstone hit colorman, the game will end.
  • Maybe will have to create another simple game to test the algorithm.
  • Learning some basics from Retro Chicken.

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)

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 ...