When you find yourself trying to remember a show (or any works) that's on the tip of your tongue but just out of reach, come here - the collective brain of the TVTropes community can probably help. Post all the details you can remember (examples help). If you're looking for a trope, head over to Trope Finder. Have general questions about tropes? Visit Ask The Tropers!
> a 2D platformer on Commodore 64
> a caveman
> dark bluish caves
> facing a lizzard
> big
> wasn't scrolling but switching rooms.
Prehistorik? https://youtu.be/O5mZ2ahgd4M?t=467
https://youtu.be/O5mZ2ahgd4M?t=501
https://youtu.be/O5mZ2ahgd4M?t=441
The outdoors is bright and colourful, but I think next levels get darker. Unless I'm mistaking it for sequels (not sure if they were ported to C64, though.)

I faintly remember playing a 2D platformer on Commodore 64 featuring a caveman (or something thereof) navigating a series of dark bluish caves and facing a lizzard as big as a rhino at the end (or was it? I never managed to beat it). The game probably wasn't scrolling but switching rooms.
Rings any bells?