Dark&Under - A Dungeon Crawler


#161

Oh right then the savings will be a bit less. Just ran a test with the latest version on GitHub without any changes:

  • Standard Arduino IDE with Leonardo 26614 bytes
  • Homemade package Arduboy - Standard core - 26604 bytes
  • Homemade package Arduboy - Arduboy optimized core - 26398 bytes

With the Arduboy optimized core you also have the bootloader/reset button feature in case you decide to remove the USB code.


(Scott) #162

To be more specific; you get a feature that allows you to reset to the bootloader, using a button combo, while the sketch is running. Even with the standard Arduboy2 library you can reset to the bootloader, but only during power up, by holding the DOWN button.

Also (as is recommended), a sketch can include a menu or prompt to do the reset.


(Pharap) #163

Normally I wouldn’t presume to know what @filmote’s response would be, but I think in this case I’m reasonably confident we’d both opt against removing the USB code and requiring a non-standard reset procedure.

Or at least the demand for another feature (like saving) would have to be sufficiently great, which I’m doubtful is currently the case.

In that case it might be worth looking into at some point.

Though we may have to consult @luxregina on that one, I vaguely remember him saying he preferred not having the save functionality for design reasons.


(Scott R) #164

I’ve found that the game has the best balance and replay value with the extras disabled even now it’s a flip of a coin if I win.

I think I’ve said it before but I would prefer to see a manticore and a larger bestiary to play with in the level editor rather than more features.


(Scott) #165

I don’t want to go too far off topic, so last post on this…

The plan is to incorporate most of @Mr.Blinky’s changes into the Arduboy2 library and Arduboy boards package. I can’t give a specific date on when that will happen, though.


(Simon) #166

All the good conversations happen when I am asleep … damn you the southern hemisphere.

As @Pharap suggested, I would be keen not to use a custom bootloader as I think this dissuades casual users from the game if they feel getting rid of it later might be difficult.

At some stage, we should look at upgrading the library to the new one. We made some mods to reduce the size of the ‘justPressed’ and ‘Pressed’ and possibly some others around text-wrapping.


(Frederik J. Mooshaber) #167

Just small bug report:

DarkUnder_Battle.ino line 187:
uint8_t maxHP = enemies[attackingEnemyIdx].getAttackPower() - myHero.getDefence();
if (maxHP > 10) maxHP = 10;

This causes maxHP to be 10 if enemy attackPower is smaller than player defence (because negative number casted to unsigned is likely very large number (255) and then following clamping makes it 10).
I noticed it at the end of the first level when relatively weak creature did few 8HP hits.


(Pharap) #168

I noticed this earlier, but I’ve been preoccupied today so I didn’t get chance to reply.

I think we noticed this once before but forgot about it.

I’ll add a fix for it, but while I’m at it I’m going to try to make a few more space savings since it seems a bit silly to just make one fix and not do anything else.


(Pharap) #169

And thus it is fixed, v2.0.2 rises.

We’ve also got a PR pending to update it on @eried’s repo.
It’s been merged. Thanks @eried.

Not only will it update to the latest version, but we’ll finally be moving it from the Action category to the RPG category.

(The Action category thing was my fault. Back then I was worn down from both Dark & Under and the game jam so I made a small mistake and dumped everything in the wrong category.)


#170

Going to finally try to beat this during my oil change tomorrow. Dragon better be ready.


(Liam) #171

Just wanted to say, tried the game to test it and I love it already! but I’m going to save it for the car journey i have this Saturday!


(Simon) #172

Thanks Liam. Hope it lives up to your expectations.


(Garry osborne) #173

Hi Filmote, I wish to add some of my own monsters, Can you post how to do that? I wish to create my own graphics and add them to the enemies.h file.

Anorak


(Simon) #174

Wow … I would love to see someone do that!

If you are just looking to replace the graphics in our game with your own then you need to look at:

If you want to add additional enemies, then you will need to:

  • add to the enumeration of enemies here > https://github.com/filmote/DarkUnder/blob/master/Enums.h#L148

  • search for each occurrence of EnemyType in the game and make the appropriate changes to cater for the additional enemies and their unique traits.

  • download and alter the level editor and add your new monster. You can then design your own levels or use the existing ones and add your new monsters to that.

Adding new monsters will not be trivial. When we were creating the game, we kept running out of memory however the newest version of the library should free up some space.

You could convert the code to use SpritesB, as described here > https://github.com/MLXXXp/Arduboy2#use-the-spritesb-class-instead-of-sprites This should be a simple ‘find and replace’

If all else fails, you can use the ARDUBOY_NO_USB directive described here > https://github.com/MLXXXp/Arduboy2#eliminate-the-usb-stack-code < this should free up a heap of memory.


(Garry osborne) #175

Fantastic! Your detailed steps are what I was looking for. Yes what I plan to do is add on additional creatures for levels beyond 3 and I am also looking at additional game mechanics like teleport squares and traps to throw off the player. Later I wish to add a a random level generator to dynamically build a level on the fly. Think when you finish a level the next level is shuffled or set up in a random manner.

Anorak


(Simon) #176

You will definitely need the ARDUBOY_NO_USB directive to squeeze half of that in. You will have memory issues - but its not impossible.


(Garry osborne) #177

Hi Filmote. Ok I will add the conversion to Spriteb to my list. What do you use to create the data array for the monsters? Also I plan to use piskel to create the bmp monster images.

Anorak


(Garry osborne) #178

Haha I keep thinking of things to ask. Any unfinished ideas to squeeze additional memory out of the arduino?


(Garry osborne) #179

Never mind I figured out the rle cabi code handles that. Kool now time to hit the old school monster manual for candidates!

Anorak


(Simon) #180

Do you mean the graphic data? Cabin compression of the bitmaoa as mentioned before. If you meant the maps then the level editor (see links at top of thread)

I can’t think of any other obvious memory savings other than the two mentioned.