WOW, if you plan on losing weight in a gym, I would suggest using a cross trainer coupled with a diet plan. Cross trainers are not impact intensive machines but rather rotational in nature and provide a fairly full body workout, cardio, upper and lower body and depending on the settings you choose (I alternate) will use both fast and slow twitch muscles. Additionally, if you have the stamina, if you set the intensity level at around 15 (they usually go 1-20), set it for hills, or hills+, and hold an rpm of around 65-75, you are burning in the neighborhood of 1,100 to 1,300 calories an hour, and I would do it for at least 20 minutes 3-4 times a week to start. Under 20 minutes and you never really hit your right cardio intensity, the benefits really start to come after about 20 minutes and if you can survive it at that level, you should hit a second wind and be able to get 30-45 minute out of it. I usually do an hour to an hour and a half. Be sure to check with a doctor before you start though. And don't eat for at least an hour after your workout, you peak calorie burn comes from recovery within the first 1-2 hours, not the actual workout, it also is the peak timeframe for metobolic readjustment, which if you develop properly, has your metabolism working increasing its fat burning potential even on non-workout days, provided you still watch your caloric intake and focus on varying your carb and protein intake (carbs fuel, proteins build), so eat carbs 4-5 hours before your workout or the night before if you workout early in the morning (not good if you have high blood pressure) and eat proteins to rebuild after a workout.
My right knee has been just about completely replaced with artificial parts except for the actual joints themselves so running and high impact sports like basketball for any length of time are over for me, but with my biking, the crosstrainer is perfect in that it fairly mimics pedal strokes without applying undue pressure to my knee.
On the diet front, whatever is sound and works for you is what I would do, but stay away from the low-carb nonsense, it is hype and not conducive to fitness, it is a cheap quick way to lose a few pounds at the expense of cardiovascular fitness. The body is designed to live on COMPLEX carbs and use them efficiently as its primary source of fuel, don't ignore the natural use of them because of some fad. Just avoid the simple sugar carbs, workout, and you WILL lose weight, it is a mathematical certainty