Comments (7)
Thanks, I saw your post and replied on YouTube, but probably better to keep the convo here I think. It definitely looks like a memory issue, as the sprites are also in the wrong place. Is your Arduino UNO an ATMega328P - based board? It seems like the graphical data at the top end of memory is missing or corrupted. If you can tell me the revision of the board you have then I can investigate :) Also, are you using the latest version of Arduino to compile?
from uno_manic_miner.
It's an Arduino UNO SMD R2 which according to https://support.arduino.cc/hc/en-us/articles/7901453165724-An-overview-of-different-UNO-boards is based on the ATmega328P.
I updated the Arduino IDE just before compiling, I'm on version 2.3.2
Also, the game does seem playable, I can make progress at least on level 1 and score points!
from uno_manic_miner.
Ok that's good that some of it is working at least! I'm going to try sourcing an R2. I have an R3 here, and am getting an SMD R3 to test also. They should all use the same microcontroller though, so I'm wondering if it is the bootloader. When you compile the sketch does it report the following for you?
Sketch uses 32252 bytes (99%) of program storage space. Maximum is 32256 bytes.
Global variables use 1888 bytes (92%) of dynamic memory, leaving 160 bytes for local variables. Maximum is 2048 bytes.
from uno_manic_miner.
Thanks for this! The compile message, having removed debug.h, is:
Sketch uses 31422 bytes (97%) of program storage space. Maximum is 32256 bytes.
Global variables use 1696 bytes (82%) of dynamic memory, leaving 352 bytes for local variables. Maximum is 2048 bytes.
It won't compile with debug.h present, I get this message:
Sketch uses 32278 bytes (100%) of program storage space. Maximum is 32256 bytes.
Global variables use 1888 bytes (92%) of dynamic memory, leaving 160 bytes for local variables. Maximum is 2048 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
text section exceeds available space in board
Compilation error: text section exceeds available space in board
I wonder if I have the wrong programmer selected and that's the cause? (I don't really understand what the programmer is!)
from uno_manic_miner.
Ah! I've just removed debug.h here and see the same decrease in memory usage. It's weird as those functions are not used. Now I'm seeing the same issue you can see. I think I know what it is - watch this space!
from uno_manic_miner.
I have reduced the code size slightly, so it should compile for you with debug.h included now. Been discussing with the Arduino devs and apparently Serial.print() is treated in a "special" way, and always results in additional code, even if not used! For some reason some alignment was being broken when Serial.print() was not included, so I've left it in for now! Please let me know if it fixes things.
from uno_manic_miner.
That's fixed it! Thank you so much.
from uno_manic_miner.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uno_manic_miner.