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.
-
- Rpg
Loading ......
-