pokemon emerald is only 2D, looks the same as rpg maker and runs in a gameboy advance sp
- Memory: 32 kilobyte+96 kilobyte VRAM (internal CPU), 256 kilobyte DRAM (external CPU).
while a core2duo+4gb struggles to make a equal game but with a large map, why?
Textures require an insane amount of space, and GPUs have limited bandwidth. You want to avoid storing an uncompressed texture in VRAM, so you can afford to store more textures, and waste less time pushing the textures around. This is why texture compression algorithms are a very big deal when it comes to 3D graphics.
They are less important to 2D games, because 2D games generally don't need as many or as high resolution textures as 3D games. This is why RPG Maker games can afford to use PNGs without absolutely
murdering their performance. 2D games also use a technique called "tiling", which allows them to create gigantic maps with very little textures.
Let's do the math:
You have a 256x256 tile map. That's 65 536 tiles in total. Each tile is 48x48 pixels in size, for a total of 2304 pixels per tile. In other words, your map has 12 288² = 150 994 944 pixels in total. So far, your math was correct. But we're not done yet.
On a 24 bpp screen, a single pixel requires 3 bytes (1 byte per color channel), so your map requires a total of 452 984 832 bytes, or almost 453 MB. By comparison a single FullHD (1080p) frame would consume a little over 6 MB. Your map is 72.8 times that size.
453 MB may not sound like much, but from my limited research, libpng (the official PNG reference library) has a decompression speed of around 100 MB/s (on a mid-range laptop in 2021), so it'd take 4 seconds to decompress your map. Imagine doing that on every frame, and you can easily see why a Core2Duo struggles with it. It also doesn't help that libpng is not multithreaded, so even a Ryzen 9 5950X (with 16 cores and 32 threads) would struggle with that map.
Even if we use the GBA's 15 bpp color screen (5 bits per color channel), that's still 283 MB of space for a single map. Pokémon Emerald would never run on a GBA if it had to load a map this large, and the Core2Duo would still struggle with it on every frame.
Since we're already here, let's calculate how much RAM the GBA needs to display a single frame.
The GBA has a resolution of 240x160 pixels. That's 38 400 pixels in total. At 15 bpp, that's a total of 72 kB per frame. As a result we can calculate that more than half the GBA's VRAM is dedicated to its frame buffer: 72/(32+96) = 0.5625, leaving 56 kB of VRAM for textures.
With its 16 MHz CPU, the GBA has a roughly 100 times slower clock speed than a mid-range laptop with 1.6 GHz CPU. Let's be generous and say that the GBA is about 1000 times slower. With libpng, the GBA would have a decompression speed of 100 kB/s. That would allow it to decompress a 56 kB texture in 0.56 seconds.
While this is still slow, note that the GBA only supported uncompressed textures (of either 256 or 16 colors per pixel). That means developers could store up to 29 866 pixels of textures in the GBA's VRAM (16 times as many if using only 16 colors). With 16x16 pixel tiles (the GBA could fit 15x10 such tiles on screen), that's a total of 116 unique tiles that fits in the GBA's VRAM.
During my research, I found a map of Pokémon Emerald's Safari Zone. I counted over 50 unique tiles and estimated less than 100, which is well within the GBA's capabilities. If each tile of the Safari Zone's map was unique, the Safari Zone would not fit in the GBA's VRAM either.
And herein lies the problem. When you create a 256x256 tile map for the purpose of parallax mapping, you are essentially creating a map of 256² unique tiles. That would most definitely not fit the GBA's VRAM at all, unless you subdivide that huge map into many smaller submaps.
That way, you could load the next submap as your player approached the edge of the current submap. You'd need to ensure that at least 4 submaps can be loaded at the same time, so the player can approach the corner of a submap without your device going OOM (out of memory). This is how large open world games work. They can't possibly load everything in memory, so they divide the world in chunks and only load the chunks as needed.