From d3a6a12baea7317f6765ae7541cbc453f83d7928 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 25 Jan 2011 09:53:21 +0200 Subject: removed alternative name "pressure" from param2 --- src/main.cpp | 23 +++++++++++++++++++---- src/map.cpp | 8 ++++++-- src/mapblock.cpp | 20 ++++++++++---------- src/mapnode.h | 15 +++++---------- src/tile.cpp | 39 --------------------------------------- src/voxel.cpp | 2 +- 6 files changed, 41 insertions(+), 66 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 858d25fa1..171f1538a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -236,7 +236,7 @@ Map: NOTE: There are some lighting-related todos and fixmes in ServerMap::emergeBlock. And there always will be. 8) -TODO: Map generator version 2 +FEATURE: Map generator version 2 - Create surface areas based on central points; a given point's area type is given by the nearest central point - Separate points for heightmap, caves, plants and minerals? @@ -246,18 +246,33 @@ TODO: Map generator version 2 where some minerals are found - Create a system that allows a huge amount of different "map generator modules/filters" + +FEATURE: The map could be generated procedually: + - This would need the map to be generated in larger pieces + - How large? How do they connect to each other? + * Make the stone level with a heightmap + * Carve out stuff in the stone + * Dump dirt all around, and simulate it falling off steep + places + * Erosion simulation at map generation time + - Simulate water flows, which would carve out dirt fast and + then turn stone into gravel and sand and relocate it. + - How about relocating minerals, too? Coal and gold in + downstream sand and gravel would be kind of cool + - This would need a better way of handling minerals, mainly + to have mineral content as a separate field + - Simulate rock falling from cliffs when water has removed + enough solid rock from the bottom TODO: Change AttributeList to split the area into smaller sections so that searching won't be as heavy. -TODO: Change AttributeList to be 2D, as it would be too slow to search - in 3D fields anyway. TODO: Remove HMParams TODO: Flowing water to actually contain flow direction information TODO: Remove duplicate lighting implementation from Map (leave - VoxelManipulator) + VoxelManipulator, which is faster) Doing now: ---------- diff --git a/src/map.cpp b/src/map.cpp index bbcc0f36f..0b5872e05 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1804,7 +1804,7 @@ ServerMap::ServerMap(std::string savedir, HMParams hmp, MapParams mp): float randmax = 0; float randfactor = 0; - if(myrand()%5 == 0) + /*if(myrand()%5 == 0) { baseheight = 100; randmax = 50; @@ -1833,7 +1833,11 @@ ServerMap::ServerMap(std::string savedir, HMParams hmp, MapParams mp): baseheight = -3; randmax = 20; randfactor = 0.5; - } + }*/ + + baseheight = 0; + randmax = 15; + randfactor = 0.63; list_baseheight->addPoint(p, Attribute(baseheight)); list_randmax->addPoint(p, Attribute(randmax)); diff --git a/src/mapblock.cpp b/src/mapblock.cpp index 620c29fdd..3eb65b4da 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -1504,13 +1504,13 @@ void MapBlock::serialize(std::ostream &os, u8 version) if(version >= 10) { - // Get and compress pressure - SharedBuffer pressuredata(nodecount); + // Get and compress param2 + SharedBuffer param2data(nodecount); for(u32 i=0; i= 10) { - // Uncompress and set pressure data + // Uncompress and set param2 data std::ostringstream os(std::ios_base::binary); decompress(is, os, version); std::string s = os.str(); @@ -1630,7 +1630,7 @@ void MapBlock::deSerialize(std::istream &is, u8 version) ("MapBlock::deSerialize: invalid format"); for(u32 i=0; i -// A mapping from tiles to paths of textures - -/*const char * g_tile_texture_filenames[TILES_COUNT] = -{ - NULL, - "stone.png", - "water.png", - "grass.png", - "tree.png", - "leaves.png", - "grass_footsteps.png", - "mese.png", - "mud.png", - "tree_top.png", - "mud.png_sidegrass", - "cloud.png", - "coalstone.png", - "wood.png", -};*/ - /* These can either be real paths or generated names of preloaded textures (like "mud.png_sidegrass") */ std::string g_tile_texture_paths[TILES_COUNT]; -/*std::string g_tile_texture_path_strings[TILES_COUNT]; -const char * g_tile_texture_paths[TILES_COUNT] = {0}; - -void init_tile_texture_paths() -{ - for(s32 i=0; i