An Enhancement of Midpont Displacement Algorithm Applied in 1D Terrain Generation
- Undergraduate Thesis ( BSCS major in Computer Science) - Pamantasan ng Lungsod ng Maynila. 2015
ABSTRACT: Midpoint Displacement algorithm works with a straight line between two points. At the midpoint of this line, the value becomes the average of the two outer points plus a random value. Continue this recursively for each line segment created, until the desired level of detail is reached. It’s that simple, with one minor addition: the range of the random value should be determined by the length of the line segment. Otherwise, every midpoint could jump erratically. By shrinking the range, beginning features are large but flat, while later features, and small detailed features. The result of this process resembles jagged terrain. However, it is fairly homogenous and isotropic. The focus of this study is to create a random terrain for game Trecycle using the midpoint displacement algorithm, the game allows the user to travel a 1D terrain, collecting coins upon reaching them and ends when the user runs out of time. The problem regarding the static roughness was solved by putting a range roughness that has been limited to produce a usable terrain. Jagged points have been eliminated by using slope formula so it would not affect the balance of the objects on the terrain. And last but not the least, the reduction of the displacement value will only be done when the segment is subdivided every iteration and not every point. The researchers conclude upon surveys and trial that the enhanced algorithm performs better than the existing algorithm. The only recommendation for future researchers is to make the number of points not limited to (2^n)+1.