Mobile Terminal webpage game porting R & D framework [client Combat System]

Source: Internet
Author: User

There are only two types of combat systems in traditional web games. After the server requests data resources, it configures them in the game and displays them in an animated form. For online games such as the ten-year-old sword, the combat system is to rely on equipment, skill configuration, and household assistance. Here I want to decide whether a game is fun. The key lies in two places: gameplay [novel systems, and various innovative gameplay] and interactivity. Therefore, in addition to developing game technologies, we also need to develop game ideas. What kind of system can attract players? In our games, the combat system is a small highlight. Like most text games, the combat data can be obtained through gamer requests to create a layer-based interface.

The following describes the structure and framework of the combat system in our game:

First, View:

Because it is on the mobile phone interface, the screen size of the mobile phone is the biggest limitation for us to play games. There are good scenarios and beautiful jobs, but there is nowhere to display them! So when I was working on the combat system, I regionalized the map background and showed it to some places. Then, I used the Android mobile phone's slide feature to allow my home to freely view every detail in the combat scenario!

This makes the background image of the battle in our combat system. It is obvious that the competitive platform in the middle is the battlefield where players fight! We need to materialized players and monsters, and instantiate players' shapes and monster shapes. Let's take a brief look at the production interface and requirements in the game:

In the battle interface, you must have

1. character styling

2 character attributes, including display of blood records and display of Property Values

3. character skill display

4. battle information box

These four components constitute a complete combat system.

Finally, let's take a closer look at our skills. This is also a major aspect of the game. First, let's take a look at the green background area in detail in seconds, that is, our skill display area. We don't use the andorid controls and tools, but we do our own Frame Animation playback mechanism, timer in Android Java makes us a hero of skill!

Timer timer; runnable runanble; private Int J = 0; // skill play public void onplay (final string nowskillname, final string nowlife, final Boolean nowpkdxflag) {timer = new timer (); timer. scheduleatfixedrate (New timertask () {@ overridepublic void run () {// todo auto-generated method handle = nowskillname; nowlife = nowlife; nowpkdxflag = nowpkdxflag; j ++; message mesasge = new message (); mesasge. what = J; If (j <= 5) {playerhandler. sendmessage (mesasge);} else {J = 0; timer. cancel (); close_skill (); playerhandler. removemessages (j) ;}}, 0,200);} public class delaythread extends thread {int milliseconds; Public delaythread (Int J) {milliseconds = J;} public void run () {While (true) {try {sleep (milliseconds);} catch (interruptedexception e) {// todo auto-generated catch blocke. printstacktrace ();} playerhandler. sendemptymessage (0) ;}} private handler playerhandler = new handler () {@ overridepublic void handlemessage (final message MSG) {Tapp. getactivity (). runonuithread (New runnable () {@ overridepublic void run () {// release skills }});}};

Then we run the skills to release the animation through the thread. I won't talk about the animation taking the idea. Our algorithm is frame combination, and different frames are taken out for presentation.

Finally, let's talk about the data structure. Through the above modules, the combined combat effect can only be said to have achieved a high imitation real-time PK interface, but the smoothness and display form of the Screen still need to be improved.

The following shows the latest group of combat images:

We can find the leveling map on the map through the shanhe Community map and enter the level 1-10 map:

After entering the map scenario, the monsters and the NPC on the scene are both smooth and visible. Monsters and the NPC are actually genie systems. Currently, there are few elements in the genie system, but it can be simply implemented for action and conversation.

Finally, click the monster, and then the combat prompt pops up to enter the combat scene !! Start fighting !!

This is the specific process of the entire Combat System and the gameplay !! In terms of the interface effect, it is basically the mode that can achieve the PK of the real-time interface, and through partial display, players can view each scene point in the battle.

If you have any friends who like our game, you can join the group [jianshen inn R & D group: 45578308 ]. Discuss and plan the game together!

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.