[Game]Armageddon

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.

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.

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.

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

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

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.

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

2 Likes

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

1 Like

I posted the most recent version with EEPROM-saved highscores. I also posted a gameplay gif, which I converted with imagemagick, but even with a delay of zero between frames, it seems to play the animation back too slowly. Anyway, I’m done with this for now. There are perhaps a few small changes I could make, but I’m leaving them to later.

In the meantime, I present a highscore challenge: my highscore on the game is currently 10630. Post a photo if you get a higher score, and I might put a little leaderboard in the first post.

3 Likes

Nothing to brag about : 3405 at first try :slight_smile:

1 Like

Nice job for a first attempt!

7145

It has become an excellent game @wuuff … now we will try to get the sound working better. I think I might know what the problem is. The same volume affects output now in two ways: 1) it affects the digital potentiometer that controls the overall volume. But in Gamebuino sound, the same master volume is also used as a multiplier when the sound output byte is calculated.

1 Like

7495, on second attempt :slight_smile: (sound is ok btw)

1 Like

3 posts were split to a new topic: [Troubleshooting] Battery issues

2 posts were merged into an existing topic: [Troubleshooting] Battery issues

well…its only a little higher but still counts ?

3 Likes

Yeah, it counts! I added a highscore list to the first post. I probably should have done so earlier but at least I have enough scores now that I can have 5.

I noticed that you also encountered the bug with the highscore table where the loader overwrites data over Armageddon’s highscore table. I should have chosen a different EEPROM location other than starting from zero. I would have preferred the loader data to be at the end of EEPROM but that’s just a personal preference.

I probably should update the game to save at a different place in EEPROM, but nobody has complained about it so it was low priority. I’m pretty busy for the next two weeks or so, but if anybody finds it bothersome I can patch it easily after that, or they could patch it themselves! Open source!

2 Likes

We could do with a ‘save/load EEPROM to/from SD file’ program.

The reason for picking a different spot isn’t just to avoid overwriting other game’s saves, it’s also because if everyone writes to the start then the early areas of EEPROM wear out faster than the rest (depending on how good the wear levelling is).

(It would be neat if chip manufacturers took that into account and gave earlier areas a better lifespan.)

the max write cycles is something like >100k.

If you wear out EEPROM by playing Armageddon, I will bring a new Pokitto to your door! :wink:

Edit:1M cycles at 25C (source: Microchip)

1 Like

Why would you use a Microchip specification for an NXP part?

From the NXP LPC11U6x datasheet section 12.1 table 11:
EEPROM endurance: 100000 min, 1000000 typical cycles
(Tamb = -40℃ to +85℃; VDD = 2.7 V to 3.6 V. Based on JEDEC NVM qualification. Failure rate < 10 ppm)