![]() By default, the start up file is main.ms. We are going to create our game in Moscrif IDE where we need to start a new project based on the game’s framework. Let’s Start – Start Up File & Resources Start Up File V 1.0 means that the body bounces with the same speed as it fell however, there is a possibility to increase the bounce rate and the ball will bounce off with more velocity. The bounce property affects the speed of the body after bounce. Other important body properties are density, friction and bounce. In our game, the dynamic bodies are paddles and goals. Kinematic bodies move only according to its velocity and it also behaves as infinite mass. In our game, static bodies are barriers and goals. ![]() They do not move according to forces or velocity. Static bodies do not move under simulation and have infinite mass. The next table shows which bodies collide together.ĭifferent types of bodies also behave differently under simulation. First difference is that not all types of bodies collide together. Box2d supports three types of bodies which have different behaviour. In our game puck, paddles, barriers and goals are created as bodies. Using bodies, we create all objects which interact in the world. Bodiesīodies are another important part of box2d physical engine. The box2d also uses its own coordinates which start in the left bottom corner and are counted in meters.įortunately, Moscrif’s framework usually uses normal pixel coordinates and conversions are made automatically. The scale property says how many pixels are in one meter. All objects and things in the world are scaled to ensure this width. The world has always width which is equivalent of 10 metres in real world. The world creates a background for all bodies, joints or contacts. If you read it in the last article, you can skip to Let’s start – start up file & resources chapter. The chapters about box2d world and bodies are similar as in my last article. This engine can be seen also in other platforms like Nintendo DS or Wii. To simulate this physical behavior, we used box2d physical engine which is supported by Moscrif SDK. It bounces from the paddles and barriers, and it moves with a small damping. The puck in the game behaves according to physical laws. To ensure the best appearance on every device, the graphics are created separately for all commonly used resolutions. The current mobile market offers devices with many various resolutions. ![]() They consist of the menu, playground backgrounds, buttons, paddles and the puck. Our game is really simple so the graphics do not need to be too complicated either. Let’s start our development process by preparing the graphics. Menu will be created as a dialog window with only three buttons: New game, Continue and Quit (Quit button will not be available on iOS). When the game starts, the playground shows up right away. Our goal is to create a single player game playing against artificial intelligence. ![]() In this article, we will create an air hockey game for three mobile platforms: iOS, Android and Bada using Moscrif SDK. The winner is the player who scores 7 points first. The puck is set on a special table, which produces a cushion of air on the play surface through tiny holes with the purpose of reducing friction and increasing play speed. The purpose of the game is to hit the puck to the opponent’s goal with a paddle. Not that many people had a chance to try it as a pre-installed game on operating systems. Have you ever played Air Hockey? Air Hockey is a fairly popular game in game centers and other places where people hang out. Let’s start – start up file & resources.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |