Some experiences and personal opinions on the backend Management System of large-scale browser games

Source: Internet
Author: User
Tags smarty template

Preface:

People who have worked in Game Development know that client games can use c ++ and web games can use sl or as3. Given the knowledge of web game development, I have some opinions. Take the web game of as3. Generally, the front-end of game development can use as3 as the front-end, and the back-end can use erlang. If you are not familiar with these two things, you can use Baidu or google. What about game data management and interaction! Please refer to my analysis below!

Main content of this article:

Preface
Game Data Interaction
Summary of backend Data Management
A simple demo
Game Data Interaction

Generally, a large web game has one or more databases. These databases have a large number of data tables and many records in the table. It can be said that a table contains tens of thousands of data records, I will not talk about the specific table design. If you are interested, you can communicate with me without authorization. Now I want to talk about how data interacts with the backend. When game planning completes the requirement, I will hand it over to as3's front-end staff to create a front-end display. The front-end display is mainly a page for game users to perform game operations, the background data of game operations is directly implemented with erlang, just as you have used aspx in asp.net to display the html front-end, and the backend data exchange is implemented by aspx. erlang also completes the interaction of adding, deleting, querying, and modifying the data. Of course, this is only the game back-end data interaction. In addition to a large number of artists in a game development team, the rest include erlang programmers and php programmers. The main task of a php programmer is to complete the browser game backend management system, this system facilitates editing by planning groups to facilitate game operation management. Of course, a large amount of game data is stored in several servers. At this time, you may hear that today, a certain browser game is available, or a new server is opened, these different servers have no direct relationship with the game itself. They only store data. The data of different servers is different, which is related to the server on which the player is located. Php interacts with these different servers. Specifically, you can use this backend management system to issue code, reward, vip, npc, copy, and backpack management. You can also log on to your account to turn you offline.

Summary of backend Data Management

My personal experience and opinions are as follows:
Requirements and implementation
1. The background management system is nothing more than adding, deleting, querying, and modifying data.
2. Adding and modifying data enables the same page to be the same form. In this way, you only need to write a set of code for verification.
3. You can use js or jquery for front-end verification.
4. functions or built-in verification mechanisms can be used for background verification.
5. You can add one by one through the form, and import the other through an excel table, that is, batch processing.
6. You can save the query conditions in the session to ensure that you can edit or delete the query conditions.
7. Place pages on or below tables or perform batch operations.
8. After the add operation is complete, a message is returned to determine whether the add operation is successful.
9. You must first determine whether to delete, confirm, cancel, and delete the deletion.

Division of labor at different layers of technology and framework code reuse
1. You can use the mysql database or the mongo database to store data. It is necessary to familiarize yourself with the data operations of mysql or mongo.
2. Use the template technology, php + smarty template engine, and be familiar with smarty.
3. Using object-oriented technology, php + smarty + mysql (mongo) + oop, it is necessary to be familiar with oop
4. Adopt the design mode technology. Generally, you can use the single-sample mode. It is necessary to be familiar with the knowledge of the design mode.
5. Of course, the framework can be used for fast and rapid development. Many frameworks are currently popular, which can accelerate development efficiency, such as helper classes, image validators, form generators, excel interaction classes, and mencache distributed cache systems.

A simple demo
At the end of this article, a simple demo is provided for beginners of php enthusiasts to get started with. To understand this, you must understand smarty, followed by some common mysql operations, another point is to differentiate between delimiters and js when installing and using smarty. In this example, literal is used to solve this problem. Please refer to the following: the function is very simple and no technology is used, this mainly completes the need to add, delete, query, and modify crud! Sorry!

CUDR_jb51.rar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.