Rockbox General > Rockbox General Discussion

Hey!!! That's Unfair!!!

(1/2) > >>

Edil:
Ok so the Brickmania game abruptly ended after finishing level 29 with a score of 23400.  >:(

So, now what???  ???

Can I make my own levels or something?

 :P

nls:
the source is available, get hackin' ;)

cool_walking_:
I'm gonna assume you're not a coder by the fact that you asked this question. Luckily for you, adding brickmania levels is relatively easy.

First, you need to set up a build environment and learn how to create a Rockbox build:
http://www.rockbox.org/twiki/bin/view/Main/DevelopmentGuide

You're looking for this section in apps/plugins/brickmania.c:

--- Code: ---static unsigned char levels[29][8][10] = {
    { /* level1 */
        {0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1},
        {0x2,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x2},
        {0x0,0x2,0x1,0x0,0x0,0x0,0x0,0x1,0x2,0x0},
        {0x0,0x0,0x2,0x1,0x0,0x0,0x1,0x2,0x0,0x0},
        {0x0,0x0,0x0,0x2,0x1,0x1,0x2,0x0,0x0,0x0},
        {0x7,0x0,0x0,0x7,0x2,0x2,0x7,0x0,0x0,0x7},
        {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},
        {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}
    },

...

};

--- End code ---
Obviously each of those "0x0", "0x1", etc. numbers means a certain type of brick.

You need to increment that number 29 there every time you add a level.

Edil:
Thanks!

You are right this could be an interesting project to start learning and coding.

cool_walking_:
Yep, good luck! ;D

Navigation

[0] Message Index

[#] Next page

Go to full version