Use Adobe Flex 3 to develop massively multiplayer online games

Source: Internet
Author: User

Introduction

This article briefly introduces how to use Adobe Flex 3 technology to develop multiplayer online games. I talked about why I chose Adobe Flex 3, the issues I pay attention to during development, and a simple process for development. It is helpful for anyone who wants to know about Flex 3 in game development.

There are a few other words in the middle, so I can't think of how to express them better. Please help me with them. Thank you!

Use flex3 to develop multiplayer online games

Massively Multiplayer online games (MMO) technology has been involved in various forms of software. While we are still thinking about MMO, multiplayer games have enabled many players to connect in real time for cooperation and competition. (See figure 1 ). world of Warcraft is in the gold standard position in the MMO game industry subscribed through DVD-ROM, but through the abbench-Flash Platform, we can use a small amount of time and budget of Warcraft to develop a free-to-play MMO game similar to wakfu and small world through a browser.
 

 


Image 1

 
Figure 1. Some leading MMO games.

In this article, I aim to tell you less time to create a complete (and simple) large online game experience. Similarly, I will give you some sample code so that you can master this high-level idea. These examples are only available in flex3, but many of them are related to application developers of other technologies. Includes Adobe Flash cs4 and Flex 3 Air desktop applications.

I hope that these will give an introduction to the beginners of large online games, and give experts some knowledge.

What is MMO?

In more than ten years, the multiplayer online technology has become the mainstream in the Development of desktop PC games. In recent years, we have found that it is also popular on browsers. An MMO application is such a software that can connect many people in real time. At the same time, a person's operation will immediately affect others. Just like in the chat queue, when you make a message, the recipient will immediately see the message. When you attack an enemy, it will be attacked or blocked and attacked. In the most common form of MMO, an MMO application is a team-based application that focuses on personal experience and human-computer interaction. MMO has a variety of options: MMORPGs, mmorts, mmofps, and bbmmogs) and more.

Mmorpg is very popular, or a simulation game. A simulated real-world game is a game that connects many people through an Internet interface to create a simulated world. Simulation games have six features:

Shared Space: This is a world where multiple people can join at the same time.
Graphic user interface: This world depicts the real spatial distance, from a two-dimensional image to a three-dimensional environment.
Real-time: mutual operations occur in real time.
Mutual influence: This world allows users to change, develop, build, or submit custom content.
Keep running: No matter whether a single user is logged on or not, the operation of the entire program will not be affected.
Social/group: The world allows and encourages various community forms, such as teams, guilds, clubs, groups, cohabiting, and neighbors.
With the rapid development of computer hardware performance and technology, MMO games have evolved from desktop programs to network programs. This article focuses on the latter.

MMO games are commercial

MMO games are very popular. As more and more game players access the Internet through broadband, more and more Internet users are trying MMO games, and the number of users is rapidly increasing. Attractive web2. 0 and RIA features make these games popular among game players quickly. Users are immersed in these games in their free time. There are business opportunities Wherever users exist. However, traditional commercial games are immersed in a series of charges when buying them. MMO games are about to deliver an ever-increasing cost for development and maintenance, and lead to other business opportunities for online play. Game Developers and publishers will benefit from successful MMO games in multiple ways. The publisher usually chooses the following items:

Subscription: users pay a certain amount of money each month to continue playing. This is a profitable way in the development of desktop, and once became the most popular way to make profits.
Advertisement: In browser-based games, we can find that game publishers place a Banner Advertisement above the game scenario. These advertisements are linked to common webpages, and some advertisements are incorporated into the game scenario. For example, your role in the game will be guided by a highway billboard that displays real ad information. In addition to this method, there may also be two ways: User games do not need to be pre-paid. This maximizes the audience. Due to the inherent connectivity between the Internet and MMO games, new advertisements can rotate (appear) in the gaming experience, and the rhythm can determine how much eye each advertisement can attract.
Sales of virtual items: although you may not need money to play games, you can purchase virtual equipment in cash to increase the role's attributes or improve the game's advantages.
Sales of virtual currency: While game play may be free, users pay real-world cash to credit their account with virtual currency. the currency is then used to perform game transactions for things like advancing their character growth or purchasing virtual items.
Extends sorships: real-world companies who wish to have their brands integrated into the game pay the publishers. An example is a clothing company who wishes to include virtual clothes in the virtual world.
Surely, as the audience for MMO gaming expands, advertisers will become increasingly creative with how they monetize the Games in this industry.

Plan to create an MMO game

When planning an interactive project, it is important to have convincing creativity and use matching techniques to achieve your thoughts and meet your target audience. In the following sections, I will provide overall MMO production comments and discussions on available technologies.

 


Figure 2. Rip game logo

.

For example, let's assume that our target market is an 8-10-year-old boy and girl, and the secondary market is a childlike adult. I made a simple and complete flex game called rip for our discussion. It is not a complete project at all, but it is useful for us to exchange ideas about MMO game planning and development.

Roles and stories

In addition to challenges and beautiful pictures to attract users, increasing the difficulty of roles is a key to keeping MMO games played for a long time. People and stories are two key factors for retaining your user base.

Here are some tips to consider when designing MMO games:

Unique: You think hurting your market may save your brand differences. If you choose a super-human subject because of popular market research, your user group prefers this topic, at the same time, you must be prepared for a half-dozen competitor and think of the same method.
Let your role grow: Think about RPG games. The roles in it have many features (such as strength, health, speed, and intelligence), all of which increase with the increase of experience and new learning capabilities.
Let your game grow: Remember, if you want your MMO game to have a long life. It is necessary to design your content more like a TV program in progress than a lonely movie plot. You must set up a lot of preparations in the beginning and lay a good foundation.
For the RIP Protocol, I use a friendly ghost topic (see figure 3 ). When I created it, I could not find a friendly ghost-themed MMO game. So this is unique. Ghosts can have many characteristics and may also generate some super powers. This allows the role feature to grow. When I think of a ghost world, I think about a few things: a new ghost will appear on a regular basis, and it is possible to assume anything in a fantastic world, in the theme of heaven and hell, roles can die over and over again. These ideas should promote a long-term, rich storyline.

 


Figure 3. roles.

With the determination of characters and plots, you can ask writers and artists to start investigating the technology they need.

Client and server technologies

MMO game technology has two main considerations: client and server. Your completed project combines these two technologies. Client technology (Adobe Flash Player, air, and so on) will do everything that is heavy-it is responsible for front-end performance and mouse and keyboard input. The server-side Technology is responsible for communication between each client.

From big points to details, there are many technical issues to be considered. For example, what type of computer cannot use your product? Mac or PC or both? Is it a desktop application or a Web browser? Is it a three-dimensional or two-dimensional? What software platform does it run on?

If you are interested in creating casual online multi-player games without the headache of hosting your own servers, consider checking out the Adobe Flash collaboration service. for this and economic consideration, we use the Adobe Flash Platform to develop and deploy the game in a web browser using 2D technology. We use Adobe flexbuilder as our development environment. We use flash player on the client and electroserver 4 on the server based on the client and server technologies. With the Flash Player selected by our client, I chose to use a ready-made server technology, which includes a specific auxiliary file of ActionScript 3, as this will help speed up development. In addition to electroserver 4 and some important server-side options, the supported options include Adobe Flash Media Interactive Server 3.5 and smartfoxserver 1.6. If you are interested in creating casual multi-player games that are not used to host your own servers, Consider Adobe Flash collaboration service.

I chose electroserver 4 mainly because it is stable, easy to develop, and free (up to 20 users ). This means you can start a new project or test without paying for it. In addition, electroserver 4 is scalable and supports a wide range of help documents.

You may also ask why I chose 2D instead of 3D. Although the latest Flash Player 10 has some exciting 3D capabilities, this is a solution provided only for moving 2D objects in 3D space or using software (which provides animations that are slower than the solution provided by hardware), such as papervision3d. I am looking forward to the future of 3D in Flash Player. However, based on my experience, the Flash Platform is currently not the best choice for powerful 3D needs.

Development

Now, I have decided on the stories and characters of friendly ghosts, Flash Player as the client, and electroserver 4 as the server side. I am going to start developing in flex builder. For the user interface, we split the interface into blocks to meet the needs of specific users (see figure 4 ). Each region obtains user input and responds accordingly:

Connection: allows users to log on to and log out of the program.
User List: displays all online users.
Chat History: displays the Chat History of the game.
Chat input port: allows a user to send a message to the current user in the game.
Game interface: displays the game world, which consists of background art and user roles. You can control the role movement by controlling the role position.
 


Figure 4. Components of a rough layout

Create component

We will create the flex component as shown in Figure 4. For each component, we must take into account the user's needs to determine the UI elements to meet these needs, and make full use of the mxml In Flex to easily create a layout. In the flex development process, this is the most basic, so let's take a look at a simple example.

Like any text message application, the chat input is at the bottom of the application layout (see figure 5). You can enter text information and submit it to the chat record for other users to see. This is the main means of communication between participants.


Figure 5. Chat Input

The textinput and button components are placed in a panel component. The ID attribute is used to number the related functional controls in the main program. When you click the chatsend_button instance, any text in the chat_textinput instance is displayed, will be passed to other players. In the next section, we will see how this information is passed to the server.


Figure 6. mxml of the chat input port.

Client-server code

We continue to build our components to put down some communication between the client and the server. The fundamental difference between multiplayer games and standalone games is that nothing generated by user interaction should be modified on the screen. All game clients (a specific player running the game), including players providing input ports, should wait for a reply when the server says "Player 1 has sent a chat message ", for example, when the client of Player 1 sends a request to the server, the server sends a response to each customer. Only then will the screen be updated. Of course, the client of Player 1 must be ready to handle the response at any time, and the client can update the request at any time when it sends the request. PLAYER 1 uses client (A) to send a chat message request and handle the response (see figure 7 ). The sent information contains sufficient information for all customers to respond appropriately. In this case, the response is easily put into the chat record for all users to see.


Figure 7. client-server-client information flow

In this game, there are five types of request/response pairs (see figure 8 ). All interactions with the server are implemented through an ActionScript 3 object called electroserver. This combination is displayed when the program loads the connection server and joins the room. All text chats and operations performed by all players (such as location changes, attacks, defenses, and so on) are sent in this way.

When publicmessagerequest only sends text, it is usually used as a chat information. However, it is not only possible to use text. A message can also send an esobject object. This is a common ActionScript 3 object. Develop useful features for packaging esobject-for example, the new x and y positions that players move in the game. More complex game functions use esobjects and encapsulate more data. Creating Complex games without transmitting too much data through esobjects is an art. Sending a small amount of information will help the game to respond quickly. The final pairing shows how to disconnect the client from the server room when the user ends his or her game.


Figure 8. Rip request/response pair.

Skills, skin, and style

Because of the cooperation between Adobe's Creative Suite 4 products, it is very easy to integrate the written controls into the flex project. This is a major benefit of using Flex. If you carefully plan an efficient workflow, developers and designers can have the least conflict with the project.

For Rip, I started laying mxml for the application, while the graphic designer wrote CSS to define colors and fonts. I continue to write the role movement and interaction, while art designers use flash to create backgrounds and roles. The three of us were barely interrupted because Rip was developed based on the visible elements.

There are two main types of visual effects in flex builder: shape and appearance. In the program, the shape determines the basic color and text display attributes. The excellent (but far from completed) CSS compatibility flex allows a CSS text file to define style attributes. The Art Team edits and saves changes to each style. One example is the background color gradient of panels and the processing of various fonts (see figure 9 ).

Applications include skin design and animation design. In rip, An SWF file containing resources is embedded in the application. The UI team used Adobe Flash cs4 pro to re-publish this SWF to update each skin. Each flex project is re-compiled, and the published game is modified in both procedural and creative ways. An example of skin creation is the animation role design of the rip logo or ghost (see figure 9 ).

 


Figure 9. Complete the style and complete skin of the game

 

Now we have a solid, polished game, and we are willing to try it. Although not optimized for many users, the game should handle dozens of screens. It is easy to add interesting information. Click Connect and a unique colored ghost is displayed on the screen. Enter Text Information for communication, and click anywhere in the game to control your game role. Larger games can be expanded to include Avatar attributes such as experience and speed to complete tasks, inventory item collection, and more worlds to explore.

Next step

In addition to developing your own games, there are two major AIDS: integrating your applications online and planning project maintenance.

Integration

When your development cycle is approaching, You need to integrate your applications online. During development, you can run an electroserver instance on your desktop and directly interact with published SWF files. Open two or more game SWF files on your desktop to test multiple users. This workflow can develop rapidly.

Once you have prepared your application for online testing, perform the following steps:

An electroserver instance installed and running on a Web server.
Your game configuration requires online instances, not your desktop instances.
Browse the webpage, including your SWF file, and start playing. Open two or more windows to test multiple users from the same desktop or desktop.
Remember, for most commercial applications, you also need a player Matching System-usually called loby, so that users can find friends and start the game. You can create a loby to your game or use an external one. You can use a well-designed external loby as the portal to create multiple MMO games, so when you deploy multiplayer games, you do not need to re-invent the wheel.

Maintenance

In addition to typical application system maintenance, including error correction and functional requirements, MMO games require more actions and will continue to provide services. It is important to consider launching an online game project as a complete game. Many online game applications in business models benefit from the long-term users mentioned above.

Users' full attention is sustained for several months or years and requires solid social management and regular content updates. Most users will enjoy interaction with other players. The social dynamics and dramatic developments caused by new players will capture users' attention. This is the biggest advantage of online game developers. However, there is a lot of competition from other MMO games, as well as the sharing of users and users, to enjoy many other games. To make your game exciting and fresh, and ensure that your users continue to participate, establish a maintenance strategy to generate more roles, game levels, and plots over time. Developers often do not fully understand the maintenance requirements, so they do not maintain a balance with the budget. Poor maintenance is the biggest cause of the death of MMO games.

End

MMO games combine the best Web 2.0 and RIA methods to provide users with experience. They can be game publishers for exciting project development and profitable careers.

The successful establishment of MMO games requires careful planning, including development roles and stories should be unique and allow development and building an attractive visual design, and select the appropriate technical strength of the client and server to implement the concept.

Development includes user interface design, client server communication, game logic, art and skin. We believe that flex builder is an ideal client technology choice because of its flexible development environment. In addition to Adobe's Creative Suite 4, flex builder enables you to build your team collaboration smoothly from the very beginning.

If you plan something really special, well-developed, and keep your project running for a long time after it starts, you will use Flex 3 to create a successful MMO game.

Thank you

I am particularly grateful to the artists who have contributed. Warren Lee created style and Game art and Bill coons's billcoons.com made skin and interface graphics designs.

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.