Bomber v2.0 by Limited

Advice on general approaches or feasibility and discussions about game design

Bomber v2.0 by Limited

Postby Limited » Sun Jul 27, 2014 9:22 pm

Bomber
Current release: 2.0 alpha
bomber-preview-2.0.jpg
bomber-preview-2.0.jpg (54.67 KiB) Viewed 5971 times

A version of the famous Bomberman for Gamebuino.

Game is currently in the early stages of development. You can move the player around using the directional buttons, drop bombs and destroy squares that have no fill (the 2 centre columns). An AI will try to chase you down if you are within a seek range although this is a basic AI algorithm.

How to play:

Press A at the title screen to start the game
Direction buttons to move player
A - Drop bomb
B - Debug info
C - Return to title screen

Objective is to kill the enemy, currently they cannot kill you but you can kill yourself with your own bomb.

v2.0
Source: https://github.com/JohnAkerman/Gamebuin ... n/tree/2.0
HEX and ELF: https://github.com/JohnAkerman/Gamebuin ... ee/2.0/bin

Release notes:
Complete restructure of code using OOP techniques
Implemented basic AI that will try to seek player if within range
Updated for multiple bombs (3 at moment)
Player and enemy can now die from bombs
Player kill and death scores added to right of screen
Added player death screen



v1.1 (old)
bomber-preview.jpg
bomber-preview.jpg (51.46 KiB) Viewed 6144 times

Source: https://github.com/JohnAkerman/Gamebuin ... /tree/v1.1
HEX and ELF: https://github.com/JohnAkerman/Gamebuin ... e/v1.1/bin

Release notes:
Significantly reduced amount of calls for wall detection
Improved collision detection so you don't go into walls
Cleaned up code
Added inital logo on titlescreen
Only allowed one bomb at a time


Experimental wip
Source: https://github.com/JohnAkerman/Gamebuino-Bomberman
HEX and ELF: https://github.com/JohnAkerman/Gamebuin ... master/bin

(totally stole Annyfm's way of setting out project, so thanks for doing the leg work)

I plan to add some form of AI, complex algorithms are probably out of the question due to the low cpu power but going to start with a simple direct seek approach.

I have yet to optimize the code, still have a lot of Serial.print debug calls (for those who want to see them in Arduino ERW, just open Serial Monitor). Game currently runs with 497 free RAM and at 50% CPU

Any thoughts or comments are appreciated, and hi community :)


Edit:
v2.0 release
v1.1 out
Last edited by Limited on Sat Aug 02, 2014 6:23 pm, edited 4 times in total.
Limited
 
Posts: 13
Joined: Sat May 31, 2014 7:25 pm

Re: Bomber by Limited

Postby Matrix828 » Mon Jul 28, 2014 1:52 am

This is some great work!
Obviously laden with bugs (I can walk a pixel into a wall and get stuck)
I'd love to help out - I'm not the best coder ever but an extra brain working out those bugs is always handy.

EDIT: The hex file supplied doesn't work for me. Loading it just sends me back to the loader program.
Matrix828
 
Posts: 43
Joined: Tue Jul 22, 2014 7:44 pm

Re: Bomber by Limited

Postby Limited » Mon Jul 28, 2014 12:53 pm

Hey thanks for the comment. You may need to rename the file so extension is also uppercase, I was a fool and didn't rename it so did the rename via GitHub and forgot the extension.

I have a few plans in the works do far, what you could help me out with is work on the drawing methods, I want to keep my tiles 4x4 meaning I need to render without bitmaps. Maybe you can come up with a render function to render player and an enemy (so they look different)? they need to be 4x4 max tho.
Limited
 
Posts: 13
Joined: Sat May 31, 2014 7:25 pm

Re: Bomber by Limited

Postby 94k » Mon Jul 28, 2014 3:54 pm

Limited wrote:I want to keep my tiles 4x4 meaning I need to render without bitmaps. Maybe you can come up with a render function to render player and an enemy (so they look different)? they need to be 4x4 max tho.

Rendering 4x4 bitmaps works for me, I don't know why though. Here's the code I use:

Code: Select all
const byte PROGMEM bitmap[] = {
        4, 4,
        B01100000,
        B10010000,
        B10010000,
        B01100000
};

[...]

gb.display.drawBitmap(x, y, bitmap);


It draws a 4x4 circle (the last 4 bits of each byte are ignored). I'm not entirely sure if that is supposed to work, but it does.
User avatar
94k
 
Posts: 44
Joined: Sun Jul 27, 2014 9:41 pm
Location: Germany

Re: Bomber by Limited

Postby rodot » Mon Jul 28, 2014 4:31 pm

The bitmap width has to be a multiple of 8, but nothing prevents you from leaving bits empty to draw something smaller, like you did. The bitmap height can be any value.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Bomber by Limited

Postby Matrix828 » Mon Jul 28, 2014 8:30 pm

94k's idea works perfectly.

This would be changed in Player.ino
Code: Select all
const byte player[] PROGMEM = {
  4, 4,
  B11110000,
  B10110000,
  B11110000,
  B11110000
};
void renderPlayer() {
  gb.display.drawBitmap(playerx, playery, player);
}
Matrix828
 
Posts: 43
Joined: Tue Jul 22, 2014 7:44 pm

Re: Bomber v1.1 by Limited

Postby Limited » Mon Jul 28, 2014 9:33 pm

Thanks for the input guys, never thought about using a 8x8 but only with 4x4 data - will give it a try.

Updated release to v1.1 (be sure to view proper tag on GitHub).

v1.1
Source: https://github.com/JohnAkerman/Gamebuin ... /tree/v1.1
HEX and ELF: https://github.com/JohnAkerman/Gamebuin ... e/v1.1/bin

Release notes:
Significantly reduced amount of calls for wall detection, down from 88 to 16
Improved collision detection so you don't go into walls
Cleaned up code
Added initial logo on titlescreen
Only allowed one bomb at a time
Fixed HEX file (if someone can verify, works on my Gamebuino)
Limited
 
Posts: 13
Joined: Sat May 31, 2014 7:25 pm

Re: Bomber v1.1 by Limited

Postby Matrix828 » Mon Jul 28, 2014 9:44 pm

Your project seems to be moving on quickly!

Still having a problem with the .HEX file you supply. For some reason it refuses to flash. :?
Matrix828
 
Posts: 43
Joined: Tue Jul 22, 2014 7:44 pm

Re: Bomber v1.1 by Limited

Postby Limited » Mon Jul 28, 2014 10:08 pm

Matrix828 wrote:Your project seems to be moving on quickly!

Still having a problem with the .HEX file you supply. For some reason it refuses to flash. :?

Have a bit of free time so I can focus on it :)

Do you have an early bird version of the Gamebuino? Mines the one with the coloured buttons and it works fine.
Limited
 
Posts: 13
Joined: Sat May 31, 2014 7:25 pm

Re: Bomber v1.1 by Limited

Postby Matrix828 » Mon Jul 28, 2014 11:02 pm

I've got the normal version.
I compiled it myself at it flashes fine. :?
Matrix828
 
Posts: 43
Joined: Tue Jul 22, 2014 7:44 pm

Next

Return to Project Guidance & Game development

Who is online

Users browsing this forum: No registered users and 8 guests