Page 1 of 1

Confusion About File Size

PostPosted: Tue Dec 15, 2015 3:59 pm
by superfreaky
So I'm taking crabator to recycle some of the code for my game, and the other day, I was wondering how much room was left for new code and bitmaps, so I looked at the .HEX file I had downloaded. It says it's a 67 kilobyte file! I thought that the max size for a game was somewhere around 30 kilobytes. Right?

Re: Confusion About File Size

PostPosted: Tue Dec 15, 2015 5:52 pm
by Sutchig
The hex file format is not just the binary. It contains only ascii data, so that a download doesn't get corrupted by using different operating systems. (Cr/lf for instance) and each line contains a checksum.
Details: https://en.m.wikipedia.org/wiki/Intel_HEX

Re: Confusion About File Size

PostPosted: Wed Dec 16, 2015 5:50 am
by superfreaky
Soo ... The actual game file is 67 Kb, but the GB itself only gets ''fed'' the binary? If not, i'm still confused. Also, do you think
that there is enough leftover space in crabator left for new code of my own + sound effects and bitmaps, or am I better off starting from scratch?

Re: Confusion About File Size

PostPosted: Wed Dec 16, 2015 7:11 am
by Sutchig
I downloaded the code from https://github.com/Rodot/Crabator, copied the src/Crabator-folder into my Sketchbook and loaded it into Arduino-IDE:

Der Sketch verwendet 24.698 Bytes (80%) des Programmspeicherplatzes. Das Maximum sind 30.592 Bytes.
Globale Variablen verwenden 1.164 Bytes des dynamischen Speichers.


It uses 24.698B of 30.592B available... there is some room ;)
You should take care of RAM usage. The runtime-usage will be higher than the 1.164Byte. (there are threads in this forum explaining this. I think, the wiki has something about RAM usage, too)

Re: Confusion About File Size

PostPosted: Thu Dec 24, 2015 4:46 am
by superfreaky
Thank you, you have been a big help. I'm looking forward to creating my game! Expect a post in the development thread soon, and lots of questions.