MMORPG for Telegram - The First Big Project - Part 0

The birth of an idea


We all remember such legendary zero MMORPGs as Lineage 2, World of Warcraft, Aion, Perfect World. We are growing, life priorities are changing - work, family, friends. And we can’t devote so much time to games. But the desire to play does not disappear! I want to go to my character in the evening, collect loot, go on a siege, get Korean randomize my luck and sharpen weapons one more level.


However, for the sake of this, I do not want to download a computer, choose a game and study it anew.


image


" ?". Warspear Online. Nokia . , β€” . , , , ( ) , MMORPG. , , 1.5 , 2-3 ( ), .


, , . , β€” .


. Idle MMO , GazizovMadMax52 Wasteland Wars.


MMORPG β€” Telegram! , . , , . , , β€” , , , . β€” .


background


, . . β€” , , , .


3-4 - . , .


, JavaScript , Swift 2, Java, Python, C# iPhone, excel , 2D Unity Path finding. , Chrome Extension, . . , , MMORPG Telegram .


"MMORPG β€” ?"


, MMORPG , , , , . … … …
, . .


, . . , .



2019. β€” , . 31 . , : MMORPG β€” . . , , , .


2 -


image


(7‑ ). , . , . 4-5 .


PostgreSQL. β€” . , . "" , . . , , 10-20 .


. "Telegram bot β€” Telebot. 2 Telegram API: 1) Long Poll 2) Webhook. , Webhook.


, , β€” . , β€” , .


. API. webhook β€” . . ! .


, , , . , Heroku Google Cloud Platform, Google 300 , . Google Cloud Vision API, , Heroku, , . , 1 CPU 2Gb RAM


Linux Terminal . OS, , , , , . , .
SSH , Mac.


? terminal?! , Google Cloud Platform (GCP) " ". , Python, pip, Telebot . , "". .



, , Telebot message.from_user.username, " ?". . , SQL . username, "/createuser Someuser" 2 Someuser Telegram . , SQL , , Python . .



handler ( ). , . Foreign Key, Primary Key β€” . ( JOIN ). Unit fight. Mob Player, β€” . . . . .


β€” ", !". . 10 "" :


image


/ API . . 1-2 . , , , . pull connections ORM, . Deadlock, 2 .
7 . , . 2 .



. . .
β€” , , . , . Midnight Commander, , SSH . , . IDE, , . PyCharm , Visual Studio code. Ave VS code! IDE , .


It remains to solve the problem with user queries. At the time of receipt of the first request, while it is being processed, cut off subsequent requests from the user. Add Redis to store the status of the user (are there any requests from the user in the processing, or not). The search engine tells you how to process the request before executing the main file - through the middlware handler. However, in the library, the next handler after middleware is executed regardless of whether it throws a middleware exception, returns None, or any other factors. Well?! We will try to write our first decorator.


And that’s all for now. I hope that the next part will not wait long.


All Articles