DOI QR코드

DOI QR Code

An Implementation of Mobile Game using JBox2D Physics Engine in Android Platform

안드로이드 플랫폼에서 JBox2D 물리 엔진을 이용한 모바일 게임구현

  • 황기태 (한성대학교 컴퓨터공학과)
  • Received : 2011.08.23
  • Accepted : 2011.12.16
  • Published : 2011.12.31

Abstract

As a software component for computer game, the physics engine simulates objects' movement according to the laws of physics. This paper introduces a design and implementation of mobile game on the Android platform, where we used JBox2D physics engine library and Android graphics APIs. We borrowed the key idea of this game from Crayon Physics which is known as a famous PC game. This game starts with no way from user character to destination character. The game user has to make a way to destination character from user character by creating polygon objects between them. The user wins when user character meets destination character. However, the game user has to decide the time to create objects and their shapes well because all objects in this game are governed by the laws of physics. As an important thing of this paper, we introduced into this game new input methods of LCD touch and sensors embedded in mobile devices but not in PCs. Game users can create objects by drawing polygons with LCD touch and move objects or characters according to sensor values from accelerator sensors by tilting the mobile device.

물리엔진은 게임에 등장하는 객체들이 실세계의 물리적 법칙을 따라 움직이는 것처럼 시뮬레이션하는 게임엔진의 한 요소이다. 본 논문은 오픈 소스로 제공되는 JBox2D 물리 엔진 라이브러리와 안드로이드 그래픽 API를 이용하여 작성한 모바일 게임의 구현 사례를 소개한다. 본 게임은 Crayon Physics로 알려진 PC 게임의 아이디어를 도입하였다. 이 게임은 사용자 캐릭터와 목표 캐릭터 사이에는 길이 끊어진 상태로 시작되며, 사용자는 끊어진 길을 잇는 다각형 물체를 만들어 사용자 캐릭터가 목표 캐릭터에 도달하도록 해야 한다. 사용자 캐릭터가 목표 캐릭터를 만나게 되면 승리하게 된다. 그러나 캐릭터 및 물체는 중력 등의 물리적 법칙에 지배를 받기 때문에 게임 사용자가 물체의 모양과 만드는 시점 등을 잘 설정해야 한다. 본 논문에서는 PC에는 없지만 모바일 단말기에 있는 LCD 터치와 가속도 센서 등의 다양한 입력 방식을 도입하였다. LCD 터치를 이용하여 사용자가 물체를 임의로 만들 수 있게 하였으며, 단말기를 기울여서 가속도 센서를 작동시켜 물체나 사용자 캐릭터를 이동시키는 방법을 도입하였다.

Keywords

References

  1. Geer, D.;, "Vendors Upgrade Their Physics Processing to Improve Gaming," Computer, vol.39, no.8, pp.22-24, Aug. 2006 https://doi.org/10.1109/MC.2006.284
  2. Saeid Nourian; Xiaojun Shen; Nicolas D. Georganas;, "XPHEVE: An Extensible Physics Engine for Virtual Environments," Electrical and Computer Engineering, 2006. CCECE '06. Canadian Conference on, vol., no., pp.1546-1549, May 2006
  3. Craighead, J.; Murphy, R.; Burke, J.; Goldiez, B.;, "A Survey of Commercial & Open Source Unmanned Vehicle Simulators," Robotics and Automation, 2007 IEEE International Conference on, vol., no., pp.852-857, 10-14 April 2007
  4. http://www.box2d.org
  5. http://bulletphysics.org
  6. http://code.google.com/p/chipmunk-physics
  7. htp://www.havok.com
  8. http://newtondynamics.com/forum/newton.php
  9. http://www.crayonphysics.com
  10. 고건희, 김영진, 마상호, 조덕신, 황기태, "물리 엔진을 이용한 모바일 게임". 게임 학회 추계 학술 대회, 2010년 11월 1일