I find that giving a real good presentation to the class will keep tem alive until the end. Asking questions before the lecture starts is a good way to get their attention. Focusing questions on real world situations tht involve class room lecture can create a open question through out the class time. Also in the middle of lectures, asking open questions to students will also keep the alert and focused on the lecture which detour them from sleeping and playing in the class room. Finally, go back and ask the questions through out the lecture to see if anyone have obtained any knowledge from it.