📜 ⬆️ ⬇️

How I started to create a text MMO RPG

image


In this article I will describe the personal experience of writing the first version of the text MMO RPG for Telegram, the technologies used for this, and the stages through which it was used to create the game.


Introduction, or how I came to all this


I'll start a little from afar - from 2010 year. It was then that I got acquainted with browser games and even gave them a lot of my free time. After a couple of years of such games, I wanted to write my own. I gathered several of the same enthusiasts in one of these browsers and we threw some kind of TK for our future game. At the stage of writing TK, everything ended then.


But the thought itself to participate "in a big game maiden" did not leave me - it was warming somewhere inside while I was engaged in web programming.


It lasted until the beginning of 2017.


Around mid-January, our development team received an order from a well-known company to write a bot for several instant messengers. Since the server part of the development in the team on me, I chose the platform mainly. First, the Microsoft Bot Framework for Skype and Telegram was tested (I note here in brackets that I was not familiar with Telegram until that moment). The Bot Framework showed some wild delays in answering user requests from a telegram and I decided to work directly with the Telegram Bot API.


This is how the first bot was written, not related to games.


But in the process of writing it, I discovered several text games implemented as bots for Telegram. I tried one "classic" MMO RPG about castles, swords, crafting, and so on. I liked the idea of ​​division into 5 factions and the battle between them. I looked, tried and soon realized that this is it - I can make a text RPG. For this, enough of my resources and my motivation.


It was the beginning of February 2017 ...




Creating the first version of the text MMO RPG


Firstly, the setting was chosen - the most modernity. Initially, the game was called "Hacker Wars" and it was decided that there are 5 companies in which hackers work and hack each other. For successful hacks get local currency and experience, for failures - they lose currency.


This basis is still with us, although it is constantly being rebalanced (about this another time).


The character, according to the classics, has a level and current experience. With the growth of experience, the level of the character grows. There is nothing difficult.


Next, it was necessary to determine the skills of the character. I could not use strength, protection, dexterity and other physical parameters - hackers do not physically fight. Therefore, I have chosen the 4th such parameters, which are opposite to each other in pairs: Practice-Theory, Cunning-Wisdom.


The next 3 days I devoted to the balancer and worked out on it various formulas for the interaction of these 4 parameters in different characters.


At this point, it was decided that there would be more than just a comparison of the parameters of the opponents and who has more, he won. It is boring and there is no playing moment. It was necessary to fight, with the chances of hitting, dodging (analogs are still taken from the physical world, so that it is easier to explain). Or, the same thing - with a chance of hacking, avoiding hacking. For this answered Cunning and Wisdom + Random. And for the amount of damage and critical hits - Practice and Theory. Those. I did not invent anything, I just called the skills in a more appropriate way.


So, 3 days and millions of bots fights with each other were held.


The next stage is the so-called "gear". Various swords, shields, bows and other belongings in classic RPG. Or plazmogany in post-apocalyptic. In modern realities, I decided to use Gadgets. The character has 6 slots for each type of gadget. Only one matching gadget can be worn in one slot.


After calculating the cost of the gadgets and adding them to the skills of the character, I received such a sign (the sign was later prepared by the girl player, in my version was just a spreadsheet):


image


The basics of RPG laid - skills and gadgets. MMO interaction added - Battle 5 companies. Formula gain experience and utakivaemoy with successful burglary currency - painted. But something was missing. I wanted some kind of zest.


So on the 7th day (and the programmer saw that it was good :)) Shares of all 5 companies appeared in the project. A player could buy shares of any company, but he had to keep a certain amount in local currency in his hands after purchase. Thus, by the beginning of the battles, players often had non-empty wallets that had something to drag off if they had been successfully hacked. This was the first linking of actions and battles among themselves. The next step is to change the value of the shares, depending on the results of each battle. If a company is hacked - the shares lose in price, if they could not be hacked, the shares rise in price. So actions began to influence battles, and battles - on actions.


At the same time, I decided to rename the game in Startup Wars - the Battle of Startups.


From the same MMO projects, the main “currency” of the promotion was taken - Energy, which replenishes with time and increases due to the attraction of friends through the affiliate link - here I did not reinvent the wheel. The only thing is that we have this currency called Motivation. Some player's actions require motivation costs, and in return give experience, money and other resources.


In parallel with all the mechanics was working on the creation of the game interface. A bot-telegram has two kinds of buttons - the “ordinary” text buttons below the input line and the inline ones above the input line. Plus, the buttons have commands starting with a slash, for example / help.


I adopted a number of architectural solutions based on the available interfaces. So the main movements in different "scenes" of the game are made through the text buttons under the input line. There I try to keep no more than 6 buttons, taking into account the 1st one to return to the main menu (the main menu is the character profile). If on some page 1-2 actions to make a decision (for example, confirmation of the sale of all shares on hand), then I use inline buttons. If there are a lot of operations on the page (for example, buying gadgets in a local online store), then I use commands that start with a slash.


It came up by mid-February; I was scheduled for an operation on the 15th, after returning from which I was going to launch the project. There were a couple of days left before the operation, which I spent on introducing extensive help to the game and revising various little things (and the devil is just in the details) - for example, if you buy a more powerful gadget for your hand, it will automatically replace the old one, and the old one in a backpack.


The first version was developed exactly 14 days in the intervals between the main work.




Run the first version of the text MMO RPG


So, I returned from the hospital and organized the launch the very next day. The guys from our team helped with setting up the server. At that time, it was 1 main gaming bot, receiving updates from the telegram via long-polling. Plus, a couple of scripts on the server, performed by cron - the battles themselves, which take place automatically every 3 hours during the daytime and the script for restoring spent motivation.


Simultaneously with the launch of the bot, I registered 5 closed groups in a telegram - one for each of the opposing companies. Plus one open group - to communicate all the players among themselves. Plus the news channel is about updating the game itself. An artist from our team has prepared beautiful logos for all these 6 chats, game bot and news channel.


On all this uncomplicated set of content, we started on February 18th in the evening. An article on Spark was timed to launch, from where they received the first players. These players have already scattered promo promotion links to friends, and after 6 days we had about 400 players.


Text game, i.e. after each action of the player, the game sends him some answer. At the time of the start, I prepared all the texts myself. Then there were only 2 quests where one could spend the motivation - Work and Walk. At work, the player earned more money, but less experience. At the same walk more experience, but less money. Each quest required an investment of 1 motivation and ended in 5 minutes of real time. At the end of the quest, the player was sent a random phrase from a set of several phrases describing the event that happened to him at work or on a walk.


Somewhere on the third day after the start, on the courage, I decided to hold a contest for the end of walking and working phrases. "Implemented" is very simple - I suggested to write phrases for the contest with the hashtag # sw_competition in the main game chat. And that's all.


A couple of days later we already had 109 phrases of various degrees of interestingness.


And then I realized that it was time to systematize these phrases somehow, send them to my base and then use them in the game. Looking ahead, I will say that these phrases did not make it into the first version of the game.


So a second bot appeared for the game, which I, without thinking twice, called the SW Informer - something like an electronic guide-assistant. I "hooked" him in all 6 game chats and he was called to collect phrases for the contest with the hashtag. Literally right after the launch of this bot, I came up with a new hashtag for it - # idea . Each player could offer any idea to improve the existing functionality of the game or offer a completely new functionality. Later, other hashtags appeared, the most popular of which, for example, is # bug - this is a bug report from the players. For the bugs found and the ideas implemented in the game, I paid for in-game currency.


So, the game was launched and a community began to gradually form around it. I fixed the bugs found by the players and implemented interesting ideas. Unfortunately, at the very end of February I went to the hospital for 3.5 months and my friends were forced to stop the game server on March 3. So the first version of my first game ceased to exist.




Used technologies





Note


If you're wondering how I ran the second version after returning from the hospital and what I went through with it at the moment, write in the comments, I will prepare another article.


PS: For those habrovchan who want to play the game described here, I have prepared a special bonus at the start, which can be obtained only by following the link for Habr .


')

Source: https://habr.com/ru/post/335404/


All Articles