Html5 game development-Zero-basic development RPG games-Open Source lecture (1 )-

Source: Internet
Author: User
This article explains how to develop an RPG Game from a zero-base point of view. In the gaming world, we can see various maps, various game characters, and figures walking and talking on maps. maps and figures are actually processed and displayed, display different images on the screen ...,. This article explains how to develop an RPG Game from a zero-base point of view.

In the gaming world, we can see various maps, various game characters, and figures walking and talking on maps. maps and figures are actually processed and displayed, by displaying different images on the screen, we can see different game interfaces. To make these images display on the screen at the same time, we need to process the layers so that they can display them hierarchically, as we can imagine, if a game character is displayed on the lower layer of the map, it will obviously be blocked by the map.
In an RPG Game, I simply divide it into map layer, character layer, effect layer (some spell effects, etc.), conversation layer, control layer (Button menu, etc ).

For example





We only need to draw pictures on the screen in sequence, and the game figures will stand on the map. If there is a conversation, the conversation will appear on the figures and maps, the buttons and other controls appear on the outermost layer of the game.

Next, we will develop a simple RPG Game step by step.



Preparations

1. Download the Repository

This game development requires the use of the open-source Library: LegendForHtml5Programming

Please download the latest LegendForHtml5Programming. This development requires version 1.2 or later.

Http://code.google.com/p/legendforhtml5programming/downloads/list

For the development process of the library, see here


Http://bbs.html5cn.org/thread-2712-1-1.html

Ii. Database Configuration

Create a folder rpg (you can also name it)


Decompress the downloaded library, decompress it, and put the legend folder in the same directory as the rpg folder.
Then, create an index.html file and a js folder in the rpgfolder, and create a Main. js file in the js folder.

Add the following code to index.html.





  1. Rpg


  2. Loading ......



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.