I created a roguelike sample game as a language study for python. Publish the project on GitHub, so this is an introductory article.
This is based on a full-scale RPG sample game, which is the subject of "Introduction to Game Development with Python" by Go Hirose, and adjustments to the game content. It is an object-oriented product.
So it may be easier to understand if you finish this introductory book before checking the code.
See the GitHub readme
for a detailed description of the project.
It is a play video. https://youtu.be/MsCe81pIWYY
pygame 1.9.6 A convenient library for creating 2D games with python https://github.com/pygame/pygame/
numpy 1.18.4 Just a little reference to the use of arrays. I just wanted to use it, so I put it in.
https://numpy.org/
In the original RPG, the battle scene was a Dragon Quest-style face-to-face battle, but we have changed it to a mechanism that allows seamless battles on the map. Also, when publishing to GitHub, all resources are replaced with my own.
Below are the main changes.
--Object-oriented production --File division by class --Battle method changed from face-to-face to seamless type --Introduction of scene and task procedures to the progress of the game --Smooth movement animation --Changed the image drawing procedure to a structure using a camera --Replacement of resources
https://apps.apple.com/jp/app/music-studio/id328608539
A DAW app that allows you to compose on your iPad. I couldn't easily find a DAW that I could easily use on Win, so I pulled out an app that I bought about 5 years ago and almost left unattended. The server mode, a function that allows you to access from a browser and download files directly, is quite good.
https://www.vector.co.jp/soft/win95/art/se232653.html
A freeware tool that allows you to create sound effects with hiragana. It is very useful when you want to make a little sound effect quickly.
https://forest.watch.impress.co.jp/library/software/audacity/
A voice waveform editing tool, also freeware. It was used for adjusting the volume of audio files and converting wav to ogg.
https://store.steampowered.com/app/431730/Aseprite/?l=japanese
It is a dot creation tool. I bought it at the STEAM store. It also includes an animation confirmation tool, etc., and it is a fairly full-fledged tool, but even when you want to write a little dot, you can use it easily without stress.
This book was the subject of this time, Anyway, it was a practical content, and it was a style of making things by moving hands first rather than explaining detailed language specifications. In the end, the full-scale RPG I referred to this time has explanations for creating games that are quite tight, such as falling block puzzles, and I think it is a very good book as an introductory book to learn while enjoying programming. On the other hand, there are few explanations about the Python language specifications, so if you can write code in this book, it seems better to keep it in another introductory book.
** ■ Introductory course on game development made with Python ** https://amzn.to/2ZNCgps [](https: // amzn.to/2ZNCgps)
GitHub https://github.com/becky3/python_dungeon_game_sample
For studying Python, I was planning to finish it in a couple of days while lightly refactoring it, but I was addicted to building the game engine part, and before I knew it, it was a two-week scale work.
I used VS Code for the IDE, but it was easy to develop because it could be debugged and renamed if it was light. I also used pylint and flake8 as lint libraries, and thanks to these I learned the general coding rules for python. When studying a new language, it is quite effective to include lint for the time being.
I think I was able to make it until just before it could be used for general purposes to some extent, so I hope that I can make use of this learning and try to make a similar application on my smartphone in the future and show some development.
Recommended Posts