Anyone interested in modifying araknoid?

I know absolutely nothing bout coding, but i am thoroughly enjoying my arduboy and obsessed with araknoid on it out of all the games available to and from the community. I loved the original, and i can see similar gameplay being brought to this version of it, like hitting a brick dropping a power up, making your paddle longer, or suddenly dropping 3 balls or granting extra lives.

i love the minimal aspect of this on the arduboy, i don’t really need to see a score indicator on the screen but maybe like an indicator of how many balls left, possibly just vertically on the very edge represted by just one pixel to not obstruct gameplay. the bricks that contains power ups can just be a filled rectangle. just throwing some ideas out there.

or the ability to scroll down the highscore list when the main title is idle.

anyways i love it regardless.

1 Like

Feel free to fork, clone, commit and then push a new pull-request towards the Git repository on Github.

The source for the game can be found in the link below.

You can also open an issue, but it’s probably easier to make the change directly.

If you need help modifying the source, let us know too, we can point you to the correct lines. For instance, in the block below you can see the function that defines how the paddle is drawn on the screen.

The call should really use a defined constant for the width and things, this would make it a lot easier to change, that is probably the first thing I might try and do.

#define PADDLE_WIDTH 11
#define PADDLE_HEIGHT 1

...

void drawPaddle()
{
  arduboy.drawRect(xPaddle, 63, PADDLE_WIDTH + paddle_powerup, PADDLE_HEIGHT, 0);
  movePaddle();
  arduboy.drawRect(xPaddle, 63, PADDLE_WIDTH + paddle_powerup, PADDLE_HEIGHT, 1);
}

I’m no arduino developer, by any stretch of the imagination (I do vb.net and the very rare C# stuff), but wouldn’t you want to:

#define paddle_powerup;
#define powerup_type 2

With 1 being to grow the paddle width, and 2 being to shrink it (as an example). Reading through the source, this should work as well:

byte paddle_powerup = 0;

Also, something along the lines of

boolean drop_powerup = false;

When the game first starts, then I’d hook into the code where it checks which brick has been hit, pick a random number between (as a test) 1 and 10, if it’s below 7, no powerup drops, if it’s 8-10, drop a powerup, randomly between the two current choices, from the brick that’s just been hit.

Something like this might work:

drawChar(xPositionOfBrick+5,yPositionOfBrick+2,119,1,0,1)

That should (ha ha) draw a lowercase ‘w’ that’s white on a black background at normal size. Provided you find the correct x and y position of the current brick being hit.

Then you’d add code that if the ‘w’ hits the paddle, you add a width to the paddle by changing the value of paddle_powerup.

Happy to be told otherwise, I’m much more used to the IDE telling me what I need to input as options, rather than guessing an hoping for the best).

1 Like

One of my first VB apps many a year ago was something like this, standard Arkanoid/PaddleBall game but pressing up increased the height of the paddle, reduced the width, increased the speed and increased the score multiplier, so there was that risk/reward method. If things got too bad you could press down, which would lower the height, increase the width but would take a massive chunk out of your score. There were multiple heights/widths you could cycle through for better gains. Not sure if that would work well on the small real estate of the Arduboy screen, but one or two height increased would work.

1 Like

No! That version of ArduBreakout is a development/experimental release which will not work with the Arduboy library version that’s installed using the Arduino IDE Library Manager. Please use the source code that you load in the IDE using
File > Examples > Arduboy > ArduBreakout

1 Like

Lol, see, look how helpful everyone is! Let us know if any of these ideas help @memberseven.

I’ve changed the link in my post to match the stable branch for the Arduboy lib and the Araknoid source, thank @MLXXXp.

I just gave a general start point, I excluded the variable definition and other things needed to make that actual working code. Your addition and changes looks pretty good, I was trying to get rid all those 11's :smile:.

Your approach seems neat, I like the power up addition, the actual indication of a powerup is nice.

Thanks, and yes, code with just “random” numbers that don’t make any sense is rather hard to read.

One thing I noticed when reading the source code, it seems as though in order to move a sprite or object, instead of clearing the screen and rendering the whole thing again, each sprite or object erases itself in it’s current position, updates the position, redraws itself, and repeats that pattern until “something else” happens. It’s odd, but I guess more efficient that clearing the whole screen and redrawing it.

Sadly, I won’t have a huge amount of free time for close to 12 more months (full time work and almost full time study), but I’d like to push myself to learn to write a basic game using Arduino and Arduboy.

1 Like

thanks for all the replies. I was more of looking for someone to code this if they are free and up for the challenge, but otherwise enjoying the game alot. even though i will never learn coding haha

1 Like