Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
has done the game development people all know, the end swims may use C + +, the page swims may use SL or AS3, in view of this period of time has been watching the web game development knowledge, therefore regarding the game development, I have a little own opinion. Take AS3 Web game, general game development Front-End can use AS3 to do front-end, back end with Erlang, do not understand these two kinds of things friends can Baidu or Google. Then game data management and interaction how! Please look at my analysis below!
The main content of this article:
Game Data interaction
Back-end Data Management summary
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, the table has a lot of records, you can say that a table has thousands of thousand of data, the specific table how to design I do not say, interested friends can privately and I exchange. I now said that the data in the backend how to interact, when the game planning to do a good job, to AS3 front-end staff to produce front-end display, the front-end display is mainly for game users to play the game operation of the page, game operation of the background data directly and Erlang to achieve, It's like you use ASP.net aspx to complete the front end of the HTML display, the back-end data exchange by the aspx.cx to complete, Erlang also completed the data additions and deletions to check the interaction, of course, this is only game back-end data interaction. A game development team in addition to a large number of art, the rest except Erlang programmers, as well as PHP programmers, a PHP Programmer's main task is to complete the page Tour backend management system, this system is to facilitate the planning team to edit, easy game management. Of course, a large number of game data are stored in several servers, this time may be heard, such as a page today, or opened a new server, and so on, these different servers and the game itself has no direct relationship, they just save data, different server data is not the same, This is related to which server the player is in. PHP is about interacting with these different servers. The specific is you in this backend management system can carry on the seal number, the reward, the seal VIP,NPC, the duplicate, the backpack management, but also may carry on the login your account directly to let you off-line and so on.
back-end data Management summary
From the following two points to say my personal experience and insights:
Requirements and specific implementation
1, the background management system is nothing more than the data to check and modify operations
2, add data and modify the data can make the same page that is to say the same form, this kind of verification just write a set of code can be
3, the front of the verification can be used JS or jquery
4, background verification can be used function or the framework of the verification mechanism
5, add function you can through the form one by one, another can be through the Excel table guide, that is, batch processing
6, the query can be a query to save the conditions in the session, this way to ensure that users can edit after the query, delete and other operations
7, the page is placed on the top of the table or below can be or bulk operation is the same
8, add the operation completed to return a message to determine whether to add success
9, delete operation to do first to determine whether the real deletion, determination and cancellation, delete success and so on
Technology and framework code multiplexing each layer division of labor is responsible for
1, can use MySQL database or MONGO database to save data, it is necessary to familiarize yourself with MySQL or MONGO data operations
2, the use of template technology, Php+smarty template engine, it is necessary to be familiar with Smarty
3, the use of object-oriented technology, Php+smarty+mysql (MONGO) +oop, it is necessary to familiarize yourself with OOP
4, the use of design pattern technology, can generally adopt a single case model, it is necessary to familiarize yourself with the knowledge of design patterns
5, of course, you can use the framework fast and rapid development, now popular many frameworks, can speed up the development of efficiency, such as helper class, Picture validator, Form generator, Excel interactive class, Mencache distributed caching system, etc.
A simple Demo
This article at the end of a simple demo to give PHP enthusiasts novice A simple introduction to learn, to understand this you must understand smarty, and then is MySQL a little common operation, there is a point is to install and use Smarty when the attention of delimiters and JS distinction, This example uses literal to solve this problem, please see the screenshot below: The function is very simple, did not use what technology, the main completion of a modification of the crud need to check it! Excuse me!
Download Address Cudr_jb51.rar
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to email@example.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.