Screens stop loading once program memory reaches 38%

I am having a problem where my screens go white and stop loading their content once program memory reaches 38%. I have tested up to 37% and the code runs fine.

Sorry for the extremely long code it is an Arduino RPG that I am making.

base_code.ino (43.7 KB)

Hi,
What screens?
What Arduino controller?
What is Arduino RPG?
What do you mean by program memory reaches 38%?

Please explain exactly what your hardware consists of?

Tom... :slight_smile:

Make better use of the F() macro.
Get back to us.

I am currently using two 2.2in ILI9341 TFT screens, an Arduino Mega 2560, Arduino RPG just means I am trying to code and display an RPG (Role Playing Game like Pokemon for example). Once the code compiles the sketch uses 38% of program storage. The hardware is the Arduino Mega 2560 and the two screens paired with three buttons each.

How big are the frame buffers for the display(s)?

Zero I think? They are soldered up to the same solderable breadboard to display the same thing at the same time.

Zero I think? T

You have the source for the display drivers - why not take a look?
While you're down there, you could dig around and check for other unexpected "new"s / "malloc"s

I'll check and get back about this in around 2.5 hours when I'm back to the setup.

And get rid of the Strings

TheMemberFormerlyKnownAsAWOL:
While you're down there, you could dig around and check for other unexpected "new"s / "malloc"s

What does this mean? Sorry, I am new to this.

TheMemberFormerlyKnownAsAWOL:
And get rid of the Strings

What would I replace them with? They are what I use to name each monster as it appears. The screens do display the same thing at the exact same time.

I could also not need to worry about this problem if my SD card reader actually read the bitmaps I give it. All it can do currently is read txt files.