Программирование аркадных игр
и обучение информатикеLab 10: User Control
This lab gives you a chance to practice drawing an object with a function, and allowing the user to control it.
Create one program that has the following:
- Create at least two different functions that draw an object to the screen. For example, draw_bird and draw_tree. Do not draw a stick figure, we did that one already. Create your own unique item. Do not simply draw a circle or rectangle. That's boring. Draw a train, or cloud, or house, T-Rex or whatever. But minimal work = minimal points. If you created your own object in the create-a-picture lab feel free to adapt it to this lab.
- In Chapter 10, we talked about moving graphics with the keyboard, a game controller, and the mouse. Pick two of those and use them to control two different items on the screen.
- In the case of the game controller and the keyboard, make sure to add checks so that your object does not move off-screen and get lost. Remember the worksheet 10 question, don't just reverse the direction like the bouncing rectangle.
You are not logged in. Log in here and track your progress.
Copyright © 2017
English version by Paul Vincent Craven
Spanish version by Antonio Rodríguez Verdugo
Russian version by Vladimir Slav
Turkish version by Güray Yildirim
Portuguese version by Armando Marques Sobrinho and Tati Carvalho
Dutch version by Frank Waegeman
Hungarian version by Nagy Attila
Finnish version by Jouko Järvenpää
French version by Franco Rossi
Korean version by Kim Zeung-Il
Chinese version by Kai Lin
English version by Paul Vincent Craven
Spanish version by Antonio Rodríguez Verdugo
Russian version by Vladimir Slav
Turkish version by Güray Yildirim
Portuguese version by Armando Marques Sobrinho and Tati Carvalho
Dutch version by Frank Waegeman
Hungarian version by Nagy Attila
Finnish version by Jouko Järvenpää
French version by Franco Rossi
Korean version by Kim Zeung-Il
Chinese version by Kai Lin