MY electronics teacher has some amazing videos on linear shunt and series regulators that could absolutely help you out. Please check out that playlist.
also RSD academy on youtube has some great videos on precision voltage regulators.
Watch this part 4:
and part 5 goes over current limiting which should help you out with the 500mA current limit.
I have a good bit of experience with these regulators, and I'm designing some more right now. You can email me if ya want dominic.meads@oit.edu or we can just talk on the forum.
the problem with the LM317 is that it is not very efficent and acts kind like a resistor. It just wastes a bunch of power as heat.