A very basic Dx Ball android game for academic course "Embedded Technologies"
- To change layout for any level, open
src/com/raihan/dxball/Settings.java
file and change this 3D array. - Each 2D array element represents one level layout for obstacles.
/*
* '1' for Box and '0' for empty space in layout.
* Add new 2D array element of [5,8] dimension and
* a free brand new level will be added in game.
* No need to adjust code anywhere else for new level.
*/
protected final int[][][] layout = {
{
{ 0, 0, 1, 1, 1, 1, 0, 0},
{ 0, 1, 0, 0, 0, 0, 1, 0},
{ 1, 0, 0, 1, 1, 0, 0, 1},
{ 0, 1, 0, 0, 0, 0, 1, 0},
{ 0, 0, 1, 1, 1, 1, 0, 0}
},
{
{ 1, 1, 1, 0, 0, 1, 1, 1},
{ 1, 0, 1, 1, 1, 1, 0, 1},
{ 1, 1, 1, 0, 0, 1, 1, 1},
{ 1, 0, 1, 1, 1, 1, 0, 1},
{ 1, 1, 1, 0, 0, 1, 1, 1}
},
{
{ 1, 0, 0, 0, 0, 0, 0, 1},
{ 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 1, 1, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0, 0},
{ 1, 0, 0, 0, 0, 0, 0, 1}
}
};