How do game engines efficiently handle and draw pixels within a given display?
As a personal project / exercise, I had begun developing a simple game engine written in Java, but came across the issue of figuring a way to efficiently and quickly update the pixels within the game window.
Since I had decided to model this engine after the NES' (which maintains a resolution of 256x240 at 60hz, if i recall correctly) 6502 chip, I had quickly created an array of pixels at that resolution.
Though already thinking that looping through the array and drawing the pixels within that loop was not the best way to handle this task, it performed worse that what I had thought.
My method was only able to produce 100 frames a second at 30% CPU usage, and 40% GPU.
How did the early programmers of the NES / 6502 chip accomplish this task of drawing the display, given the limited power of systems back then, or is this really the most efficient method of going about this problem?