14
2013
Heightmap Chunk
Saw this in the forums (simpleminecraft), sounds interesting!. Havent looked at their sources yet, but made own test version first..
Current version:
– Single chunk..
– Chunk creator (random or perlin)
– 2D array for grid heights
– 3D array for grid cell types
– Using texture atlas (current texture is from some minecraft texture pack..)
– Using grid movement from unifywiki: player can move around, if target pos it not too high (modified the script so that it moves first up or down, if need to)
– Basic camera switch
– Basic Vertex color lightness calculation (if neighbours are higher, make this block darker..)
– Added better controls (w = move forwards, a/d = move sideways, q/e = rotate)
– Added basic laser effect for “cutting” a block in front
– Added basic terrain editing (press space to eat block in front of you, blocks above it will go down instantly..)
– GridMove was too sensitive, modified:
// before
input = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
// after
input = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
– Added version 3.0 webplayer
– Added health guitexture (hearts, you can see it decrease when player digs ground..just for testing)
– Added some metal textures to player (low res substances from here)
– Added firepower guitexture (mousescroll to adjust it)
– Added basic cannon (rotates slowly towards mouse, taken from deflector proto test)
– Added basic shooting (rigidbody sphere) & missile collision checker
– Adjusted fog color
TODO:
– Better world generation (+biomes..)
– Fix rounding errors.. using Vector3()..values start to get away from exact 0.5 steps.. maybe this: Rounding values to 0.5
– Collisions?
– Animate falling blocks?
– Multiple chunks
– Physics? (no need caves, so if you remove a block, other blocks from top of it should fall down)
– 2D version? (then could use the watersim fluids for it)
– Fake shadows, ao..etc (since we are in fixed grid..could be easier) *Some tools here: VertexAo
– Use 3D A* pathfinder!? (mouseclick target, then player moves there? or for enemies..)
– Add something to collect..coins..
– FPS view? Camera follow?
– 1 chunk is 1 room? (add teleport as a goal >>> moves to next level after tasks are done?)
– Terrain mesh normals, tangents (tangentsSolver)
– Water block?
– Cap grid borders
– Grid visibility ?
– Health (lose health if fall from high)
– Better camera (dont go inside blocks)
– Enemies?
– Building something?
– Toolbar / inventory
Webplayer:
http://unitycoder.com/upload/demos/HeightMapChunkCraft1/ (v3.0 updated: 19.4.2013 )
Download sources:
https://github.com/unitycoder/PlanecraftMeshTerrain
—
Image#2: Randomized terrain
—
Image#3: Vertex colors for darkening.. (using vertex color shader from here)
—
Image#4: Version 3.0
Related Posts
1 Comment + Add Comment
Leave a comment
Recent posts
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
- Convert LAS/LAZ/PLY pointclouds to GLTF (GLB) Point Meshes (standalone converter)
Recent Comments
- on Mesh Exploder (sources)
- on Sprite Sheet Flip Book Shader
- on Sprite Sheet Flip Book Shader
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by
















Source added:
https://github.com/unitycoder/PlanecraftMeshTerrain