[v0.2] [WIP] Arduzilla! - Kaiju City Destruction Game


#1

Arduboy_Godzilla%20x400

A work in progress city destruction game for the Arduboy!


Get the source here on Github!


Download Instructions:

Please make sure you rename the folder downloaded from Github to Godzilla and open the Godzilla.ino file in the arduino editor in order to compile and upload the game. Sorry for the inconvenience, this will be changed in a future verion to make the download process more seamless.

This issue should now be fixed. To play the game on your Arduboy device, download the source code from Github, open the Arduzilla.ino file in the Arduino editor and compile and upload to your connected Arduboy.

Current Features:

  • Basic Tilemap Drawing
  • Player Movement
  • Walking & Fire-Breathing Animations
  • Camera Scrolling
  • Destroyable Buildings
  • Points System

Todo:

  • Add Building Objects
    • Add Small City Buildings
    • Add Large City Buildings
    • Add Residential Buildings
  • Add Collision Detection/Reaction
    • Add Collision Between Buildings and Kaiju
    • Damage Buildings on Attack Collision
  • Add a Points System
    • Add High-Score Table
Possible Future Features:
  • Enemies such as Helicopters and Tanks
  • Different Unlockable Kaiju
  • Fire Spreading Mechanics

(Matt) #2

How do you build it? What is the main .ino file?


(Kevin) #3

So, you are the Kaiju and you destroy the city?


(Pharap) #4

Just to check, when you write:

byte small_buildings_hp[SMALL_BUILDING_COUNT] = {3};

You’re not expecting that to set all the building’s HP to 3 are you?


@city41 Godzilla is the main .ino so you just need to rename Arduzilla-master to Godzilla.

It’s technically legal to have multiple .ino files, but I frown upon it.


Multiple .ino files vs. .h and .cpp
(Scott) #5

3 posts were merged into an existing topic: Multiple .ino files vs. .h and .cpp


#7

No I realise that I’ll need to set a value for each building, there is still lots of broken/wrong/unimplemented bits in this first version that I haven’t vetted out for other people to view the source yet, thanks for reminding me though!

I tried looking around some forums for thoughts on this the other day, all I wanted was some basic organisation so that I can find bits of my code easier and I saw that Arduino uses these .ino files that seem like a merging of .h and .cpp files.

For now I think I’ll stick to declaring variables in vars.h and then keep object specific functions/methods in there own .ino or .cpp files for my own ease of use.


#8

Yup, that’s right!
Although buildings and destruction haven’t been fully implemented yet, that’ll have to wait until I have some more free time…


#9

Ah, sorry for the confusion, as @Pharap pointed out the main.ino is called Godzilla.ino so you will need to rename the extracted folder to Godzilla and then open Godzilla.ino in the arduino editor to build and upload the game :slight_smile:

I’ll change this in the future so that it’s more seamless.


(Pharap) #10

What actually happens is that Arduino takes the .ino files and transforms them into .h and/or .cpp files by doing things like declaring functions before they’re used and handling the necessary includes.
(In fact I think it might just fuse all the .ino files into one large .cpp file, but I’d have to check.)

So basically it’s doing some of the work that the programmer would normally be expected to do.

The easiest change would be to just move all your source files into a Godzilla directory on GitHub.


#11

Would this still give a Godzilla-master folder or do you think it would give a Godzilla folder?

It would be a pain if I had to call the main .ino file Godzilla-master.ino or if I had to ask people downloading the game to rename their folder :confused:


(Scott) #13

You would still get a <repository name>-master folder.

The best thing would be to create a folder named Godzilla inside your repository and put your Godzilla.ino file and any other required .ino, .h, .cpp and .c files in it.

Then, although the user will still get a <repository name>-master folder, there will be a Godzilla folder in it that can be moved or copied into the Arduino sketchbook folder.

This also allows you to put any other files not actually required to compile the sketch (for example .png files used to create sprites), in other places in the repository, without them inadvertently/needlessly being copied into the sketchbook by the user.


(Pharap) #14

It’s your repo itself that gets turned into an Arduzilla-master folder,
so if you had a Godzilla folder in your repo, it would end up being Arduzilla-master/Godzill when unzipped.
(The .zip file that gets generated follows the format <repo name>-<branch name>.)

If you aren’t sure how to do this, I could make a pull request that does it for you and you could merge the PR.


#16

Got it, thanks!
I’ll try this with the next commit.


#17

Sorry, I’m not sure I understand?
Do you mean make a new forum post about the .ino problem I’m having?


(Kevin) #18

You or anyone else, yeah if you want to continue that topic it’s more helpful for other uses because it applies to more than just your game. It’s ok to get a little off topic but if it continues for 3 or more replies it’s probably of more value to move to a new thread so that new users to the topic don’t get confused.

I’m really excited about this game. It kind of reminds me of rampage meats katamari.


(Scott) #19

I’ve moved the .ino vs. .h and .cpp discussion to a new topic:


#20

Ah thank you! I was just about to do that myself :slight_smile:


#21

Just released a newer version (v0.2) on Github!
In this version I added the small destructable buildings and a score system.


(Scott) #22

You should move the images folder and its contents out of the Arduzilla folder. It’s not required to compile the sketch.


#23

Yeah I’ll make sure to take out the unnecessary files in the next upload, just having issues with GitHub at the moment. Eventually I’ll compile the game to an arduboy game file when I reach v1 and above so I can distribute it pre-compiled ( I think you can do this anyways… )