A resistor just drops the voltage so not really the ideal solution (for example, size to drop your max expected voltage to 12V).
You can also buy external DC-DC voltage regulators and install them in circuit to deliver 12V consistently across variable input voltage.
Best I think to buy bulbs with a built in voltage regulator
. Easy to see fom the specs because they will have a voltage range rather than a fixed voltage. Generally better quality components too.
See MarineBeam.com (high quality, boat specific inventory) and superbrighteds.com (huge inventory of everything LED).