Flappy Bird on Unity 3D

Teaching materials for the school of programming. Part 3

Spoiler

Part 1 you can find here





Part 2 you can find here





While developing the concept of a programming school, we wanted to become not only interesting for children, but also understandable for parents. After all, the decision to buy a course is made jointly. At the start of the project and testing the business model, emphasis was placed on the parent, it seemed that the most important thing is to satisfy the request of the paying target audience. Therefore, the first open lessons and master classes were maximally integrated with the school curriculum.





To do this, we divided the groups by age, looked at which textbooks on geometry, algebra and physics are chosen by nearby schools, identified a list of overlapping topics, chose those topics that can be most clearly revealed using Unity, and prepared for explosive success! But it was not there.





For parents, our concept seemed very attractive, because everyone is puzzling over how to interest the child in school subjects and influence academic performance. But we did not take into account that any benefit fades if the youth left the class without sparkling eyes and a smile from ear to ear. Everyone said that the idea was cool, that such a course would be an excellent solution to their problems, but the student was not hooked on the lesson, it was difficult, he did not want to go.





The next step, we decided to talk to the second half of our target audience - children. It turned out that the guys realize that they need to learn useful things, they "google" courses, see who teaches what. But the determining factor for them is the atmosphere of the class. It is important for them to feel surrounded by like-minded people, to make small victories in each lesson, to feel the freedom and friendliness of the environment, and, of course, have a great time.





The solution was to reduce the number of topics from the school curriculum, and add an element of recognition, competition and fun to the projects! So there was a lesson in assembling an analogue of the Flappy Bird game.





The purpose of the lesson: to learn how to work with 2D physics and Canvas when using the latter at different resolutions of the target platform.





We consider topics with students:





  • AudioSource Event- UI;





  • Event- UI - ;





  • 2D-;





  • 2D ;





  • Android.





!

2- .







, , .





  • ;





  • ;





  • ;





. sprites.png, Multiple, SpriteEditor .





sprites.png , , - . . , , . , , .





, . , Polygon Collider 2D, , 3D.





. : , , . . , .





, , , - . .





Android . , , . ( , ).





Canvas .





. . , .







EventTrigger, OnPointerEnter. Jump.





.





File->Preferences->External Tools. - SDK, JDK NDK. Browse Download. - , sdk, jdk, ndk, - .





Android studio SDK. , API 16 25. JDK.







NDK .





File-> Build Settings , Android Switch Platform.





Edit -> Project Settings -> Player





Resolution and presentation Landscape left, , .





other settings , . , , . API.





Optionally, you can expose an icon and compile. As a result, we will get the APK file of the game.

If you connect your Android phone in debug mode and click Build and Run, the game will automatically install on your phone and start.





I would like to remind you that the presented methodological recommendations for lessons on Unity were developed for computer science teachers and programmers working with children.








All Articles