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
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on
Source added:
https://github.com/unitycoder/PlanecraftMeshTerrain