Rapid backend prototyping for a geolocation-based mobile game

Video in TIB AV-Portal: Rapid backend prototyping for a geolocation-based mobile game

Formal Metadata

Rapid backend prototyping for a geolocation-based mobile game
With OpenResty, Redis and Docker
Title of Series
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Release Date
Production Year

Content Metadata

Subject Area
The case of rapid prototyping of a small prototype for a server backend of ageolocation-based mobile game, using nginx, OpenResty, Redis and Docker willbe examined in the talk. Topics will include: why was the technology stackselected, what are the advantages (and some disadvantages), the architectureof the prototype, and how the features of the stack were used in theimplementation. Some words will be said on how to keep iterations on theprototype rapid and how to upgrade the project from the prototype to aproduction system.
Mobile Web Prototype Bit Vertex (graph theory) Game theory Open set James Waddell Alexander II Front and back ends Game theory
Programming language Texture mapping Demo (music) Multiplication sign Demo (music) Client (computing) Bit Stack (abstract data type) Client (computing) Uniform resource locator Software Personal digital assistant Personal digital assistant Website Game theory Game theory
Installation art Code System administrator Multiplication sign Set (mathematics) Price index Primitive (album) Voltmeter Client (computing) Open set Mereology Disk read-and-write head Web 2.0 Fluid statics Direct numerical simulation Computer configuration Single-precision floating-point format Cuboid Monster group Resource allocation Sanitary sewer Service (economics) Email Mapping Software developer Electronic mailing list Bit Mereology Virtual machine Web application Root Fluid statics Configuration space Procedural programming Figurate number Prototype Resultant Sinc function Spacetime Web page Point (geometry) Slide rule Server (computing) Implementation Statistics Computer file Software developer Virtual machine Data storage device Web browser Code Computer Number Product (business) Revision control Prototype Radius Game theory Demon Server (computing) Projective plane Counting Client (computing) Database Stack (abstract data type) Line (geometry) Cartesian coordinate system Limit (category theory) Web browser Subject indexing Cache (computing) Uniform resource locator Radius Integrated development environment Query language Revision control Object (grammar) Game theory Resolvent formalism
Group action Code State of matter Multiplication sign System administrator Range (statistics) Computer programming Fraction (mathematics) Mechanism design Object (grammar) Set (mathematics) Office suite Local ring Monster group Position operator Physical system Discrete element method Electronic mailing list Auto mechanic Category of being Digital rights management Green's function Chain Right angle Escape character Freeware Prototype Slide rule Server (computing) Implementation Characteristic polynomial Number Product (business) Revision control Chain Prototype Latent heat Green's function Game theory Inheritance (object-oriented programming) Characteristic polynomial Uniqueness quantification Group action Graphical user interface Database normalization Query language Factory (trading post) Object (grammar) Game theory Musical ensemble
Suite (music) Group action Building Code State of matter System administrator Multiplication sign Source code Client (computing) Open set Mereology Facebook Mechanism design Google Maps Negative number Software framework Physical system Mapping Closed set Moment (mathematics) Electronic mailing list Bit Auto mechanic Flow separation Type theory Computer configuration Green's function Configuration space Text editor Electric current Row (database) Point (geometry) Web page Metre Slide rule Functional (mathematics) Link (knot theory) Open source Patch (Unix) Web browser Event horizon Number Mach's principle Prototype Internetworking Googol Authorization Nichtlineares Gleichungssystem Implementation Computing platform Alpha (investment) Authentication Time zone Demo (music) Projective plane Physical law Group action Cartesian coordinate system Limit (category theory) Graphical user interface Uniform resource locator Logic Personal digital assistant Password Moment <Mathematik> Object (grammar) Game theory Library (computing)
however them my hey listen exam de Gladish and today I
will tell you about rapid back-end prototyping for a girl jo location-based mobile game the opener st ladies and Daka come on sorry a little bit about the
case about the technology stack in general and then details about the nuances of the stack will tell you about how the game world techy texture is laid out hopefully I will show you a very brief demo because the time is really short and mentioned a little bit about the client site and after conclusion maybe we will have a little bit of time for the questions otherwise I will be here a little bit about me I'm developing software since 2002 most of the time in game development and lots of things beyond the game development now as well well I know a Waterson Lua programming language it's my favorite one and we are holding the conference in Moscow this March there would be hopefully some topics on the game development so you're welcome to come here what are the games with your
location anyone knows what this is okay so those are the games with go location given the success of that game we
decided to try to invent something to prototype a number of ideas on the gameplay we had and so while to figure out what what's fun what's not what figure what works out what what doesn't and figure out what are the technical limitations of the thing too as a result less than two calendar months and about 100 hours we have playable prototype for mostly for the server-side technology but if small client and it's enough to get us rapidly iterating on the gameplay while they start stalkers above this talk is about technological side not the game design not many ties ation not not something like that so some of the examples will be silly from the gameplay standpoint I'm talking about technology well right now it's easier than ever I believe to develop the gear location-based games and I believe that there's quite a lot of space for creativity there quite a lot of space of the new free no new things not to repeat the other major brands but just took have fun since it's so easy it's easy to have fun as a developer to not only as a player here's a gameplay for the prototype it's quite simple really the player with his phone in his head and sorry walks around he searches for mobs monsters that is which placed on the map if finds a monster he can try to collect it there's a certain chance that the monster you escaped otherwise so a statistics counter gets increased when player's profile most vanished and valuate responds after a certain time and basically that's it other than that admin users may add new mobs on the map new spawn points for the initial prototype that's quite enough you have to start small but so small that not so small that you don't lay down the foundation for the next new features so start small but generic the sequiturs is something we used on other projects it's something the familiar if you can choose of course something else but I'm talking about what we did it's readies the as the better database opener st as web server and application server docker as a thing to hold it all together that's for server for client though that's a single page web application in the browser we fetched email five implementation of the client for us it's a reliable proven solution which luckily supports positioning out of the box here two commands for the radius related to that you can google them up radius is wrong has nice set of primitives to store the game object data and well since we're coding in Lua our application on the server side it kind some counts as a nice bonus radius has stored procedures in Lua never use them actually for this project but the if you play places they can be useful and why up investing investing what what it is first open our season nginx web server distributive not which supports out-of-the-box no radius and many other useful things and no other is you have an option to install a newer but for the fastest performance not that it's needed for the prototype of course but still you can use legit which is much faster so open rest is something very fast quite friendly at least to me and well-maintained there are some large corporations behind it let me move the cursor though sorry and it's useful as
for quick prototyping as well as for the production environment we use it on production on other projects we use Redis too and the docker is a good thing for us because usually when you have a complicated ecosystem on the server side it's a pain to set it up for each single developer okay for prototype there may be single one developer but then you have to deploy it somewhere and it's do the same thing in again with dock away you have reproducible environment which you just write once the dock your file and after this you can set up the docker container so you need to just leave a few comments but for us is that okay it's really good for developers you don't have to teach you every single developer to set it the set your project up but it is arguable if it is suitable for production because there are certain performance problems certain reliability problems which can arise still unfortunately on the high Awards so to say but that's a prototype that doesn't matter so you can set up doc environment on your server really quickly for the prototype and then decide what to do with it one point though doc usually is outdated on Linux is at least in a brutal not to say about Linux is in general so you have to updated to sufficiently recent version and I don't know maybe it's changed with the last release haven't seen it so and the browser well it's for this project we have prototype in the server side first so the client doesn't matter much but still the game has to be playable you can of course as a developers and see you all queries from the common line but it's not fun and it's hard to do from the mobile phone while you're walking around and playing the game so some client has to be there and you have to have a map you have to have a list of game objects but if you remember this original title we are talking about in the first place there's certain kind of combat there you can imagine this in your head in general don't implement anything you can imagine it is first at first so you are sure you can implement later for us it's not a problem to well do this kind of thing not tied to the allocation and the gear location is the main topic here so we skip the battles they skipped out the frills and the client is pretty basic now the problem here is that allocation data data accesses rather limited on the browser but it's okay for our purposes and well I will skip some of the slides you can read them later we have little time so the developer machine deck is very simple the client wishes browser connects to the localhost port and there those two square boxes sitting docker open resti shows HTTP requests and talks to radius which resides in another dr. container here is the configuration for the Redis it's almost works out of the box and I will not read it to save the time here's the configuration for nginx the interesting parts basically you saw these statics the static here from the index and you solve the rest like API for your application at another URL and well that's it one thing to note here though is - you have to disable the lower code cache and for faster loading so you change the code on your computer and it's it's on a server it drops the performance a bit but you don't care that's a prototype and here's a docker file for the open rest basically it's just copies on your all your code there and launches it one little trick so the doc said open waste he sees another docker containers you have to tell it you have to tell that the DNS server when the docker resides right here so you have you have to adjust resolver scope anyway the API
works there only three player calls to get the game will start to get the specific game object state that's a bit redundant because the objects are here as well and to call the game object action and there's a few system calls to create a new player to reset everything to the factory state it's often lead it when you're prototyping and to upgrade the the base that's be to the current version so if you just deployed your code and you version and have to change the data and we are not implementing any kind of back office UI to say there to save the effort but they're using the in-game mechanics for in game well game management so certain users can be made at mean and free game actions so they can change the world if they they have the proper permissions how much time do they object now for server they won't consist of game objects and game objects only a game objects has numeric characteristics and the list of fractions it may have coordinates and if it doesn't it's a prototype for another game object or it it's inside another game object like an a item in inventory the prototypes are there to say if you work on the setting up the objects in the same way each time so it basically prototypes object in hits its properties and actions from its prototypes and a prototype can have a prototype as well so that's a like inheritance in programming [Music] characteristics well this slide talks about how they derive from the prototype doesn't matter dem objects actions as well so he said here's an object it's a green thought monster well here it is the toward itself it has a UUID unique ID so it has a position and it has a reference to a prototype here's its prototype which is specific prototype of this kind of monster once it sets the escape chains for it and here's it it has a prototype in itself and that prototype well it's it says they'll spot respawn time and here's the implementation of an action that catches them up we'll skip it one
interesting feeling red is that you can using the sorted ranges you can implement the delayed action execution you don't create any kind of Chrome you just in each query to your server check if there are any actions to be executed by this time and execute them in production you will have to limit this by the number of actions to execute right now but for the prototype it works here's an interesting item it makes it anyone who wears it administrator it wants user admin rights here's how we give the admin half the player and here's how the start inventory items work is how the objects
attached to another object work sorry for skipping this not no time here's a spawn point for mob well what else a demo let me show you the demo quickly is quite basic you can open it yourself and play a little bit on the mobile phone don't forget to change the user idea otherwise you will be jumping it out as you see no authorization it doesn't matter because it's a prototype only people who know it played and the link later in in slides as you can see there's a map here's a green toad and me under if it and here's a another group thought I placed yesterday there's me I have an admin hat I removed it let's done it if the internet works no problem and there's a green thought it's name is Bradley Perry the names are randomly generated by a JavaScript library based on this as a seed it's very useful because this it you can't remember it and here's another user nearby anyway what else case how the client what not not interesting slide no problem here's a trick how to launch the Google Maps I found that all the examples in the internet rock 100 so I have to compile it together and well the problems the problem here is a noisy position data from client and extremely low precision of their location in buildings but there's no other problems actually that's technical limitations you have to adjust the gameplay for well what's missing the event system is sorely missing it has to be added to the engine and lots of small functions like the Demeter the number of steps you take enou meters you walked so it can tie some gameplay mechanics to it well that's a prototype after you done with the prototype after you understand how it should work throw everything away well it doesn't work but ok at least start over and thoughtfully move parts do parts of the code they're not just reuse and cut around because in the end close to release it would not work at all and thank you that's it sorry for skip slides do it have a moment for questions oh good anyone sorry can you figure out beyond the coordinates if I'm in the city the player in the sea or somewhere else but yes you can but you have to get the coordinates to the zone data somewhere there is open sleep state map project which I believe that's something like this so if you will tie this to do this before that will work three parts of technologies here ready stalker and open rested openness is there the application code is the recording law that defines your server-side game logic next question please no questions yes is this a game here you're trying to the the Golda prototype is to experiment with the technologies or your China are you gonna make an open-source game that what's the goal of the prototype equation well for us the goal of the prototype is to understand how the games the girl location games work whatever like a list of ideas for several pages which try this try this try this stuff and without something easy which we can rapidly iterate we cannot try these those ideas of course the technology is second and that's important only because you have to filter those ideas by the technology limitations but that's it no I'm sorry I don't have the you all on my so do i I probably called all the come on everyone write down this logic editor calm if you want sources or torque slides they they are there I will publish the english-language stock slides there today and in the game there as well it's available for everyone to play so it's a little small open source game patches and contributions are welcome I will publish them as well oh well so another question are we done I think there's a question yes patient fun no authentication at all we trust that you are his stop or for implementing this can you do anything out the box with ready so it depends on the platform sorry how to do the authentication properly in this game it depends on the problem on the platform you're targeting because users don't like to type in passwords you have to tie into Facebook or Google+ sorry or whatever so you basically the proper client would not be just a patient a browser it will will be an application and case can campaign HTML no problem if the technology suits you but you will have some framework and you will tie the alpha authentication from this framework to this game if you will worry about this prototype being secured just that basic off there at your nginx config and that's it well in Surbiton HTTP as I did because the chrome limits the Gale location the data on plain HTTP another question please yes please you are correct it doesn't matter how can you be sure that the coordinates clients and you are correct like I said it doesn't matter much because well it will be probably a problem for the final game but then you will have the proper application where you it would be harder to hack right right here it's easy to hock but you just trying it out so if you worried about hacking this first the people have to start to care about your game enough to hock it and as long as you don't pay money to people who come to a certain place you can forget about this until release until better at least [Applause]


  407 ms - page object


AV-Portal 3.21.3 (19e43a18c8aa08bcbdf3e35b975c18acb737c630)