Yes, Lucerne city is walkable and compact, especially the Old Town area. This is where you will find most of the attractions such as the lake shores, boat trips, museums, Chapel bridge, etc.  You can also head outside the central Old Town to places like the Lion of Lucerne easily.