From af436fa589ca20c0521205f87d9811c121205d4f Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Sun, 3 Apr 2016 20:05:05 +0200 Subject: [PATCH] docs update --- README.md | 87 +---------------------------------- src/modules/core/GameConfig.h | 6 +++ 2 files changed, 7 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index 3db347e6c..3eaaa1086 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # About -Voxel engine that depends on [PolyVox](http://www.volumesoffun.com/polyvox-about/) and [AccidentalNoise](http://accidentalnoise.sourceforge.net/) +Voxel engine that depends on [PolyVox](http://www.volumesoffun.com/polyvox-about/). The build system is a cmake based system that automatically downloads all the needed dependencies. See [fips homepage](http://floooh.github.io/fips). @@ -11,18 +11,6 @@ There are vars inside the engine that you can override via commandline. Var inst configuration variables that you can influence from within the game. e.g. run the server with ```./server -set sv_port 1025``` to change the *sv_port* var to 1025 and bind that port. -* cl_cammaxpitch the max pitch should not be bigger than 89.9 - because at 90 we have a visual switch -* cl_camspeed -* cl_cammousespeed -* sv_seed the server side seed -* cl_name the name of the client -* cl_port the port to connect to -* cl_host e.g. 127.0.0.1 -* cl_fullscreen true|false -* cl_chunksize 16 The size of the chunk that is extracted with each step -* core_loglevel 0 = Error => 4 = Trace -* cl_vsync false|true To disable|enable vsync - # Dependencies * You need to have **SDL2** installed * Windows: env var *SDL2DIR* point to the directory where you extracted it into ([Download link](http://libsdl.org/release/SDL2-devel-2.0.3-VC.zip)) @@ -97,76 +85,3 @@ after db is initialized start the server and type `store init` this will create the user table to add an user type `store useradd ` - - - -# AI -* Request -* Produce -* Consume - -## Production chain -Define a need, to be able to produce something -In order to fulfill this need, the ai should request the needed objects (or walk to a location to get it) -Even food can be handled via "request -> produce" (the production is the health) - -We need a system that is able to define the needs and define how to fulfill them. -* Points of Interest (where is something produced) -* Reference other production chains (The product of something else might be the 'request' to 'produce' my own product -* Price one has to pay (exchange with some other good [e.g. of of the 'requests' of the producer] or money) - -So every npc should have several requests: -* money (used to get the production chain start good) -* food (used to produce health) -* production chain start good (use to produce something to get money/food/production chain start good) - -Each of these requests will get a priority. This way we have unique characters where one is just trying to survive, while another one -is just trying to get rich and yet another one that is already satisfied if he can fulfill the need of others. (The food should always be relative high) - -## Requests -requests[] = { - health - money -} - -## Health -Possibe production chains: -Money -> Food -> Health -InputGood -> OutputGood -> $ReferenceToFoodCreatorRequests - -So we need to save the needed outputs - and then recursively search for stuff that leads to fulfilling the need. If we can -fulfill the need on the first level, skip everything else - otherwise go a level deeper. - -fulfills[health] = { food 100% } -fulfills[food] = { buyfood 80%, createfood 15%, stealfood 5% } -fulfills[createfood] = { huntanimals 50%, producefood 50% } -fulfills[buyfood] = { money 100% } -fulfills[money] = { sellproduction 95%, stealmoney 5% } -fulfills[sellproduction] = { produce 100% } -fulfills[produce] = { work 99%, findprofession 1% } -fulfills[work] = { getmaterial 1%, convertmaterial 99% } -[...] - -I think this can all be modeled into behaviour trees. We need to implement the slot mechanism into SimpleAI to replace -profession slot. So the behaviour tree would e.g. look like this: - - - - CreateFood[IfFoodCreator] - BuyFood[IfEoughMoney] - GetFood[IsHungry] StealFood - StayHealthy - Work - - -## Requests can't be fulfilled -* Walk to the town hall and cry about not being able to fulfill your need. Do that for x time units - after that change your -profession, get new requests and try to fulfill those. -* A player can now walk into the town hall to resolve unfulfilled requests -* After x time units the unfulfilled request is again visible in the town hall for other players. - -# Spawn of npcs -* We need points of interest and a fillrate at those POIs. -* We need to be able to pick a profession (visual appearance will be tight to the profession) -* Do we need a sheriff in each town? One that already investigates unfulfilled requests? -* We need one town master chief rocker in the town hall that gives away the collected quests to the users. diff --git a/src/modules/core/GameConfig.h b/src/modules/core/GameConfig.h index 4af0386af..9eca3a14f 100644 --- a/src/modules/core/GameConfig.h +++ b/src/modules/core/GameConfig.h @@ -3,17 +3,22 @@ namespace cfg { constexpr const char *ClientMouseSpeed = "cl_cammousespeed"; +// the max pitch should not be bigger than 89.9 - because at 90 we have a visual switch constexpr const char *ClientCameraMaxPitch = "cl_cammaxpitch"; constexpr const char *ClientEmail = "cl_email"; constexpr const char *ClientPassword = "cl_password"; +// name of the player that is visible by other players constexpr const char *ClientName = "cl_name"; constexpr const char *ClientVSync = "cl_vsync"; +// the port where the server is listening on that the client wants to connect to constexpr const char *ClientPort = "cl_port"; +// the host where the server is running on that the client wants to connect to constexpr const char *ClientHost = "cl_host"; constexpr const char *ClientFullscreen = "cl_fullscreen"; constexpr const char *ServerAutoRegister = "sv_autoregister"; constexpr const char *ServerUserTimeout = "sv_usertimeout"; +// the server side seed that is used to create the world constexpr const char *ServerSeed = "sv_seed"; constexpr const char *ServerHost = "sv_host"; constexpr const char *ServerPort = "sv_port"; @@ -21,6 +26,7 @@ constexpr const char *ServerMaxClients = "sv_maxclients"; constexpr const char *CoreLogLevel = "core_loglevel"; +// The size of the chunk that is extracted with each step constexpr const char *VoxelChunkSize = "voxel_chunksize"; constexpr const char *DatabaseName = "db_name";