River path generation method and system in online game

An online game and path generation technology, applied in the field of online games, can solve problems such as large randomness, uncontrollable random effects, and large number of parameters.

Pending Publication Date: 2020-10-23
深圳雷霆数字娱乐有限公司
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Among these methods, the topological graph-based method needs to use the topological graph structure, which cannot be used for application scenarios without a corresponding graph structure
The method of pathfinding based on random height terrain cannot control the random effect, resulting in the shape of the river path being basically uncontrollable. Even if the weight parameter is added to control the randomness, it is a costly method. This is because a single weight parameter is for random results. The control is limited, the number of parameters is small, and the randomness is still large; the number of parameters is large, and the process of adjusting the effect is too complicated. In order to achieve the effect, it is often necessary to set a large number of weights for control, which brings time and control costs accordingly. Even so, increasing the number of weights, just to increase the probability of producing good effects, may still produce unwanted effects
Based on the fractal midpoint offset algorithm, when offsetting the midpoint, the offset value is often set to a random value in the same interval, which leads to a large turning point in some places in the final generated river path; set the recursion depth Or the line segment projection length threshold, because the projection length does not represent the actual line segment length, it will cause a certain section in the river path to be too long or too short, some parts have less details, and some parts have more details, which will affect the final river effect; at the same time, because of the loop The termination condition is tied to the projection length, the offset can only be done in one direction, limiting the performance of the final effect

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • River path generation method and system in online game
  • River path generation method and system in online game
  • River path generation method and system in online game

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0063] The present invention will be further described below through specific embodiments.

[0064] see Figure 1 to Figure 4 As shown, in one aspect, a method for generating a river path in an online game includes:

[0065] S101, obtain the size data of the game map, and set the starting path point position data and the ending path point position data of the river to be generated based on the size data;

[0066] S102, obtaining the straight line distance between the starting way point and the ending way point based on the starting way point position data and the ending way point position data of the river, and obtaining the offset reference value based on the product of the straight line distance and the first random number;

[0067] S103, fractal is performed based on the position data of the starting path point, the position data of the ending path point and the offset reference value of the river, and new path points are continuously inserted between the starting path poi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a river path generation method and system in an online game, and the method comprises the steps: obtaining the size data of a game map, setting the start path point position data and end path point position data of a to-be-generated river based on the size data, obtaining a linear distance between the starting path point and the ending path point based on the starting pathpoint position data and the ending path point position data of the river, and obtaining an offset reference value based on the product of the linear distance and the first random number, carrying outfractal on the basis of the starting path point position data, the ending path point position data and the offset reference value of the river, continuously inserting the new path points between thestarting path point and the ending path point, ending fractal when the linear distance between any two adjacent path points is smaller than a preset value, so that river path generation is completed.According to the method, the general trend and range of the river path can be controlled while the random river path is generated, and meanwhile, a large number of random details are contained.

Description

technical field [0001] The invention relates to the technical field of online games, in particular to a method and system for generating a river path in an online game. Background technique [0002] The random generation of rivers belongs to the subdivision of the random generation of maps. The purpose is to enrich the game screen, increase the playability of the game, and provide other functions related to the map content; the generation of river paths is a key step in the generation of rivers, and the performance of river paths It generally determines the final performance of the river. [0003] There are many ways to generate river paths, and the more common ones are as follows: random river path generation based on topological map structure, such as river path generation based on Voronoi diagram and Voronoi diagram area edge; based on random generation of height values The terrain is generated by using the path-finding algorithm to connect a river path between two point...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): A63F13/56
CPCA63F13/56
Inventor刘珏江
Owner深圳雷霆数字娱乐有限公司