ScratchData LogoScratchData
Back to Hobson-TV's profile

3D Open World

HOHobson-TV•Created May 7, 2019
3D Open World
3091
2587
60452 views
View on Scratch

Instructions

WASD to move, space to jump, mouse to look around. The segment slider controls how detailed mountain silhouettes will be, and the layers slider controls how many color layers there are (more of either = more lag)

Description

This 3D rendering method is an adjusted version of the one used in 3D Platformer by @uplift: https://scratch.mit.edu/projects/74287684/ Music is Sweden by C418 I will try to explain what's going on: There is a grid of points around the player that have different altitudes. Based on the location of the camera, several layers of semicircles of NEW points are laid out at varying distances from the camera (these points change every time the camera position/angle changes). Based on the map grid, altitudes are calculated for each point. Then, trigonometry mumbo-jumbo tells us how to take those ordered triplets of points in a semicircle in front of the player and convert them in to coordinates to be displayed on the screen! The 'render' script then goes across each line, starting from the back, and draws lines in various shades of green. It also fills in the area below the line. The terrain map data (stored in the list 'Map') comes from a Perlin noise generator project that I haven't shared yet.

Project Details

Project ID307476661
CreatedMay 7, 2019
Last ModifiedFebruary 1, 2020
SharedMay 10, 2019
Visibilityvisible
CommentsAllowed