Showing posts with label android tutorials. Show all posts
Showing posts with label android tutorials. Show all posts

Saturday, 29 August 2015

Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,

Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,
Building The Engine Process:
Phase 1: Setup ArrowGame Project on Eclipse
1. Start Eclipse and select “Android Application Project”
Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,

2. Fill out the Wizard form as shown below:
a. Application Name: ArrowGameEngine
b. Project Name: ArrowGameEngine
c. Package name: com.marist.arrowgameengine
Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,

3. Click next at the Configure Project Window
4. Click next at the Configure Launcher Icon. (We can set this later)
Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,

5. Select “Blank Activity” on Create Activity and Click Next
Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,

6. Name the Activity “ArrowGame.” Click Finish

Friday, 28 August 2015

Creating 2d game engine for android OS, Structure of Our Sample Engine, android tutorials ,

Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,
Structure of Our Sample Engine:










  ArrowGame.java -> Holds the Control. Listens to the Gestures from the screen and then calls methods from the View to update Actor Positions

Data Elements:
Private Instance of ArrowGameView arrowGameView
Instance of Gesture Detector
Private inner class of SimpleOnGestureListener
ArrowGameView.java -> Holds the View and the Game Logic Loop. Also Holds the “cast” of Actor instances that will take part in the Game.

Data Elements:
Public Instance of Actor archer
Public Instance of Actor arrow
Public Instance of Actor balloon
Private Handler h
Private constant int FRAME_RATE = 30
Actor.java -> This data structure will model the “characters” in the game.

Data Elements:
Private Context context
Private int x
Private int y
Private String name
Private int costume
Private int currentCostume
Private Array BitMapDrawable[] graphic

res/drawable: 
        These characters should be provided for download later.
archer.png
arrow.png
blueballoon.png
drwho.png
popballoon.png
tardis.png

activity_arrow_game.xml:
        Holds the XML code that will control the layout of the View

ok Friends this was the android game engine for android OS tutorial hope you people like it. stay with us for next tutorial.

NOTE : Dear Readers if you have any query/question feel free to ask me via comment box given below. Also Follow us on social media site and share that post with your friends. - See more at: http://onlinecomputercafe.blogspot.com

Saturday, 22 August 2015

Creating 2d game engine for android OS,Control-Model-View , android tutorials,

Control-Model-View
Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,


In mobile device programming, the Control-Model-View (CMV) metaphor for software design allows the programmer to model the user input, logic, and animation/output for their game, animation, or simulation. The CMV metaphor as related to Java-Android is as follows:

Control: 
Represents the “user” input and timed events within the software game. By design, Android programming is event driven. The user touches the screen,  shakes the phone, presses a button and the software responds with an action. In the structure of an animated game, usually a timer will trigger animation events 30 times a second in addition to user input. In the structure of an Android program, the Control is the “Main Activity” that first opens on execution of the program.

Model:
Represents the data structure of the objects and the functions that govern the flow of logic and action in a game. I think of the model in two parts:

  1. The actual game pieces as modeled in classes.
  2. The actions of the game pieces in relation to movement and each other. (Functions)
  3. The “Game Logic.” (Rules of the game)

In Android software development, the Model can be a separate Class that “holds the objects and action” or the Model can be interwoven within the View Class.

View:
The View’s job is to retrieve positions, orientation, data, and graphics from the Model and draw them on the Screen.  The Runnable and the Handler will call events 30 times a second that causes the view to retrieve this data and then draw the  image to the screen. In Android Programming the View is usually represented as a “GameView.java” class that extends the Android class of View.  The View holds the “Game Loop” that calls on the Model to update the positions of the game.

Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,



This is very important tutorial of android gaming please comment in comment box below.


ok Friends this was the android game engine for android OS tutorial hope you people like it. stay with us for next tutorial.



Dear Readers if you have any query/question feel free to ask me via comment box given below. Also Follow us on social media site and share that post with your friends. - See more at: http://onlinecomputercafe.blogspot.com

Friday, 21 August 2015

Creating 2d game engine for android OS, android tutorials

Note : Today we are going to start our new tutorial about android game engine. this tutorial is very important for android game developers.
Creating 2d game engine for android OS,Building The Engine Process , android tutorials ,

Creating 2d game engine for android OS

Introduction:
This tutorial will lead you through the foundations of creating a 2D animated game for the Android Operating System. The goal here is not to create a complex, multilevel game. Rather, the goal is to create and understand within the elements of the Control-Model-View method of game software design. In addition, we will create this engine from “scratch” – meaning that we will code every aspect of the game in Java with Eclipse to gain a deeper understanding to the interplay between classes in a game simulation. Once you have built this engine, you may add deeper layers of complexity, characters, scenes, and game logic.

Resources Needed:

  1. Eclipse IDE and Java installed on your system.
  2. Android SDK installed within Eclipse with Emulator Software
  3. Android Device (optional, but highly recommended)



you can learn how to install Eclipse IDE and Java , android SDK installed within Eclipse , AVD (android virtual device) setup Netbeans instalation, setup and use

Vocabulary:

  1. Control-Model-View
  2. XML Layout
  3. Frame Based Animation
  4. X and Y coordinate System (0,0 in upper left corner)
  5. Emulator

Java:

  1. Class
  2. Constructor
  3. Public
  4. Private
  5. Void
  6. Data Types:
  7. int
  8. float
  9. String
  10. Function

Android SDK Terms:

  1. Gesture Detector
  2. Handler
  3. Runnable
  4. View
  5. onDraw()
  6. invalidate()
  7. Canvas
  8. Bitmap
  9. BitmapDrawable
  10. Resources
  11. Activity




ok Friends this was the android game engine for android OS tutorial hope you people like it. stay with us for next tutorial.



Dear Readers if you have any query/question feel free to ask me via comment box given below. Also Follow us on social media site and share that post with your friends. - See more at: http://onlinecomputercafe.blogspot.com

LinkWithin