Box2D Forums

It is currently Wed Oct 22, 2014 2:34 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Jun 02, 2012 1:57 pm 
Offline

Joined: Sat Jun 02, 2012 1:49 pm
Posts: 1
Image

A while ago I started programming a game for android. Since I do not have time to finish it I thought it would be better to publish the results so far. I rather see the game finished and not collecting dust in my private repository and that is why I decided to open source it.

Project site: http://sebastiannilsson.com/en/projekt/ ... i-android/

Summary
The game is similar to the MX Mayhem a monster truck instead of a bike.
This video shows the latest code:
http://www.youtube.com/watch?v=S8X8bsR4YXM

Library and technology used
  • Andengine
  • Box2d extension
  • Physics editor (physicseditor.de)

Working now
  • Andengine and box2d extension.
  • Basic physics. Car behaves quite good but improvements can be made.
  • Tilting of mobile accelerometer. Tilting to the left and right will add a small rotating torque on the car..
  • Worlds are created from editing xml files. I have created a xml structure to more easily generate new worlds. The world generation will ofcourse need improvements

Spagetti code
You are free to make improvements in code structure if you want. I would recommend some cleanup since this is one of my first android projects.

The separation between levels and the game engine
Right now you just add a new folder to add a new level to the game. Therein is the XML and image files and this makes it possible to create new tracks without touching the engine. See world.xml for an example:
https://github.com/sebnil/Sketchy-Truck ... /world.xml

Examples of the folder structure of a level: https://github.com/sebnil/Sketchy-Truck ... els/level1
shapes.xml contains shapes from physicseditor. world.xml contains objects and background. Gfx contains graphics. Quite simple.

Tested on
I have tested on HTC Desire, Google Galaxy Nexus and Samsung S2. Should work well on most modern devices.

Source code and Copyright
Use the code in any way you think is best but please help make it better. If you make a change that is good then make sure to send it to the Github project. The goal of me posting this is to make the game better and closer to actuelly being on the market (for free). If you use the code to something else (such as a material in a tutorial 2d andengine) please leave a reference to either the blog or the git repository.

A todo:
  • Remove unused assets, pictures, sounds, etc..
  • Menus do not look good.
  • Add z-index of parallax backgrounds. Specify in xml with “zindex = #”.
  • Different speeds of parallax backgrounds. .
  • Engine sounds are awful.
  • The shape of the car seems a little wrong. When you roll with the car the contact points do not look ok..
  • Add icon (s)
  • Remove load time when restarting.
  • When clicking menu button the game should be paused and menu opened.
  • When clicking back button ingame you should get back to the level select menu and not end the game..
  • Add a stopwatch and highscores.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group