[Game]Armageddon

game
release
arcade

#1

You have been tasked with the defense of six cities from the incoming nuclear apocalypse. You have only two launchers to shoot down incoming missiles. Survive as long as you can to delay the inevitable end of the world.


Jonne says:
A Missile Command game by our very own @wuuff, originally for the Gamebuino!
Ported quickly by Jonne, perhaps Wuuff will make a more high-res version :grin:
EDIT: I changed the ownership of this page to Wuuff


Update from wuuff:
New version added. Increases the resolution to 110x88, adds more colors, improves explosion effect, adds new title screen, fixes several bugs.

Old Version:

Pokitto binary

New version with highscore enabled

ageddon.bin (58.9 KB)

Source code on mbed community page

https://os.mbed.com/teams/Pokitto-Community-Team/code/Armageddon/

Highscores

  1. Rakkachi 10695
  2. wuuff 10630
  3. Pharap 9495
  4. Wandi 8095
  5. jonne 7145

[Start]1.Assembling and connecting Pokitto to PC
#2

Thanks for posting this. I had been busy with other things, so I hadn’t had time to work on porting Armageddon to Pokitto. I also wasn’t really planning to unless somebody asked for it, but I’m definitely up for polishing the port up and maybe adding a couple new features. Does anyone have any requests for potential improvements?


#3

Source code and binary added


#4

Nice gameplay. Just a minor suggestion: switch A and B button to fire relative turret. Now B fire from rightmost tower and A fire from left most, that’s reversed against Pokitto buttons position.


#5

Dude: its open source. Just switch them!

I’m kinda hoping someone turns it into a high res game with slow phosphor radar screen effect.

No seriously, I am making the whole system open and easy to edit for a reason.

I also made article a wiki. you can change/link an improved bin to the first post


#6

Is pokitto fast enough to do that in hi-res?


#7

Yup! Just made some changes and pushed to the repo.
Didn’t get the game was “groupware”. I thought it was owned by @wuuff.
BTW you could add a small article on repository management (fork/push/merge etc) at the bottom of your TODO list :smile:

I’m sure it can handle without problem.


#8

Well, I made the original game, but @jonne made the port to Pokitto and uploaded the port. I made the game open source so that people could make changes if they wanted. The original license file should be added to the repository, actually. I’ll do that myself if I make any changes to it soon.

The launcher buttons were swapped because the Pokitto’s A and B buttons are reversed from the Gamebuino’s. Thanks for changing them!

By the way, I noticed that the file had been automatically processed by a tool called PokittoParser that you wrote, @jonne. Have you uploaded this tool somewhere?


#9

Nope. Thanks for reminding me. Its a Python script that repairs the broken C source code Arduino calls “Sketches” back to compilable C++. I will upload it here


#10

Sound working now!


#11

New version posted! Now that I have gotten my Pokitto, I thought a good first exercise would be to polish up this port. The details of the changes are in the first post, but I also wanted to post a list of observations I had while working on this.

  • The default font for Pokitto’s Gamebuino compatibility lib is 5x7, but I think the default is 3x5, which is why all the text in the original version of the port overlapped and was off-center. I have changed most of the code to now refer to a #define for font width and height when placing the cursor so that changes in font size will have a smaller effect.

  • The display.print function seems to have different behavior when printing out uint8_t than on Gamebuino, as it seems to be treating it like a character instead of a number.

  • It seems like the drawFastVLine function somehow drew one pixel too long? This is why the targeting cursor was taller than it was wide.

  • For Gamebuino mode, the screen scaling causes inconsistent widths (and heights? I couldn’t tell.) for the original pixels.

  • Is maxVal for the provided version of random(maxVal) inclusive or exclusive? I seem to be getting values equal to maxVal, which differs from the behavior of Arduino’s random library function.

  • It seems like I get no sound at all unless I crank the volume around 60 or so, and even then I don’t get ingame sound (just the gamebuino title screen sound) unless it’s above 80! It’s a bit different for headphones. No audio plays up through about 23, but if I increase to 26 or so the volume seems quite loud. No matter what volume I increase it above that seems equally loud. There is also a lot of background hum (in headphones) that changes depending on what’s on screen, but only starts after the volume settings screen.

  • One of the autogenerated function signatures (by PokittoParser?) didn’t match the original function. It seemed to have changed void saveHighscore(uint32_t, char*) to just void saveHighscore(char).


#12

I’ll take a look at that. Thanks for making a better version.

EDIT: care to update the .gif and binaries as well ?


#13

Binary is already updated. I haven’t actually run it in the simulator yet and I was using the online editor, so I still need to import it into Code::Blocks. I’ll try to do that shortly.

Also, I forgot to mention, but is there EEPROM support yet? I noticed that all the EEPROM functions had been commented out, so currently highscores are lost on reset.


#14

EEPROM has been reinstated in the PokittoLib and the API is 1:1 compatible with Arduino/Gamebuino.

So you could just take out the commenting and see what happens.


#15

I had tried uncommenting them, but the functions can’t be found. What file should I #include? EEPROM.h doesn’t seem to exist, and I couldn’t find a mention of EEPROM in the docs.


#16

PokittoEEPROM.h in POKITTO_HW directory. I am checking if it is included by default or not

Edit: yes, included by default in Pokitto.h in HW compilation


#17

Yep, you should be able to call EEPROM with a global instance called EEPROM, just as in Arduino.

I have tested it it works offline at least. I need to check if it works in online mbed as well.

Edit: yes, it is also included in the online PokittoLib

https://os.mbed.com/users/Pokitto/code/PokittoLib/docs/tip/PokittoEEPROM_8h_source.html


#18

Yep, looks like it works great. Saves the highscores exactly as expected. I’ll make an update with that change in a few minutes.

I have the game working in the simulator. Is the process for recording from the simulator still the same as it was back in this post? How do you usually convert to a gif? The ways I have done it in the past were time-consuming.


#19

I am relieved that someone for once says something like that instead of “Jonne, it doesn’t work!” :grimacing:


#20

On the positive side, a lot of people have started to use the PokittoLib :slight_smile: