WIP: More planets

From Pandorabox
Revision as of 18:00, 19 September 2020 by BuckarooBanzai (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Work-in-progress talk/discussions around more planets / an additional planets layer

Name generator

-- http://www.jongware.com/galaxy1.html


local nameparts = {
   "en" , "la" , "can", "be" ,
   "and", "phi", "eth", "ol" ,
   "ve" , "ho" , "a"  , "lia",
   "an" , "ar" , "ur" , "mi" ,
   "in" , "ti" , "qu" , "so" ,
   "ed" , "ess", "ex" , "io" ,
   "ce" , "ze" , "fa" , "ay" ,
   "wa" , "da" , "ack", "gre"
};

-- initial random seed
math.randomseed(os.time())

-- pick random name part
local function randompart()
  return nameparts[math.random(#nameparts)]
end

-- generate random name
local function randomname()
  local name = randompart() .. randompart()

  -- 1:3 chance that the name has 3 parts
  if math.random(3) == 1 then
    name = name .. randompart()

    -- 1:(3*3) chance that the name has 4 parts
    if math.random(3) == 1 then
      name = name .. randompart()
    end
  end

  -- upper case first letter
  name = string.upper(string.sub(name, 1, 1)) .. string.sub(name, 2)

  -- add number suffix by chance
  if math.random(4) == 1 then
    name = name .. " " .. math.random(9) + 1
  end

  return name
end

for _=1,10 do
  print(randomname())
end

Produces:

Daar
Tiackur
Miol
Beur
Iogrephiho
Mieth
Alaio 4
Ioho 2
Ollia 6
Entiio 10
Edce
Aran 6
Daenzebe
Cephi
Edce
Hoackenur
Essethbe
Canedgre 9
Exethur
Veen
Miphi 9
Befa
Enla
Canqu
Daze
Quphi
Uraessan 5
Laanphibe
Oland
Olho 4

Ingame talk

10:41 <jessicara> BuckarooBanzai: i have auto-generate planetoids working in singleplayer now
10:41 <jessicara> just missing better generation which is like orbits around stars rather than random scatter
10:41 <pandorabot> <BuckarooBanzai> jessicara: nice, i've read you had some problems with table-cloning?
10:41 <jessicara> yeah
10:42 <jessicara> it's the c habit of expecting something to make a copy
10:42 <jessicara> and reusing the same memory over and over
10:42 <jessicara> it doesn't go well with lua
10:43 <pandorabot> <BuckarooBanzai> jessicara: those would ne nice in the warzone, along with some alien remnants :)
10:43 <pandorabot> <Zlo> BuckarooBanzai: or space pandas :D
10:44 <pandorabot> <Zlo> if someone think i have some weird thing about pandas hes right :D i adore them :D
10:44 <jessicara> yeah, and adding space-only materials can get would be interesting too
10:44 <pandorabot> <Huhhila> Zlo: Well there've been Pandas as JD upgrades / "pilots" :)
10:44 <pandorabot> <BuckarooBanzai> jessicara: do you have the code somewhere?
10:45 <pandorabot> <BuckarooBanzai> :D
10:45 <jessicara> in ~/.minetest/games with a reduced set similar to pandorabox
10:45 <jessicara> lol
10:45 <pandorabot> <Huhhila> (not that there is any code referencing them, but they can still fit in the upgrade slots along with some bamboo)
10:46 <pandorabot> <Zlo> lol :D upgraded panda :D
10:46 <pandorabot> <Zlo> i upgraded my pandas till they reach maximum cutiness :D
10:48 <pandorabot> alain01-fr left the game (timed out)
10:48 <jessicara> something silly i was thinking of on a possible future server: negative x disallows pvp, negative y disallows protection...
10:48 <jessicara> lol
10:48 <jessicara> z, not y
10:48 <jessicara> so get quadrants of the same generation with options on how to play inside them
10:48 <pandorabot> MrCube-bit left the game (timed out)
10:49 <pandorabot> <BuckarooBanzai> jessicara: there was some talk about a space-only server ;)
10:49 <jessicara> yeah, was thinking of that too, if have planets of various types they are like replacing biomes
10:49 <pandorabot> <BuckarooBanzai> exactly :)
10:51 <jessicara> the way it works now it just adds a sun at 0,10000,0 and the distance from that sun defines the type of planet, whether it's a mercury-like smaller 'sun' to ice planet
10:51 <pandorabot> <BuckarooBanzai> did you play with the max-radius too?
10:51 <pandorabot> <BuckarooBanzai> also: dyson-speheres? :D
10:51 <jessicara> ideally would min distance from all defined stars to determine this and scatter stars out with a large gap
10:51 <pandorabot> <BuckarooBanzai> *spheres
10:52 <jessicara> yeah, i added a 2% chance to generate one at the cold parts
10:52 <pandorabot> <Zlo> ability to destroy planet is nothing to the power of force
10:52 <cyriax> Solar power falloff?
10:52 <jessicara> 2% per-planet for a cold one to turn in to it
10:52 <jessicara> i should really go over this and make these configurable in minetest.conf
10:52 <pandorabot> <Huhhila> ... binary star systems?
10:53 <cyriax> (If we're in a brainstorming phase...)
10:53 <pandorabot> <BuckarooBanzai> there is also "scifi" alien-dirt that could be used as an additional biome
10:55 <jessicara> one other thing are planning to do yeah, 1-2 stars per system and making sure at least one of each type exists in the world
10:56 <pandorabot> Player alain01-fr joined the game
10:56 <jessicara> some planets don't even generate without airshell = true though
10:56 <pandorabot> <Zlo> mercury type planets are full of lava and minerals ?
10:56 <jessicara> would need to add more planets than that, they are just smaller 'sun' for that at the moment
10:56 <pandorabot> <BuckarooBanzai> jessicara: can you open an issue with a repro if possible?
10:57 <pandorabot> <BuckarooBanzai> another thing: teleportation should be restricted and only "by-foot" or jumpdrive should be possible :)
10:57 <jessicara> the checking for air could just be replaced with an or-vacuum i think
10:57 <jessicara> yes, is why i removed travel mods from my singleplayer
10:58 <jessicara> although i ended up adding ethereal and banana trees everywhere
10:58 <jessicara> lol
10:58 <pandorabot> <BuckarooBanzai> :D
10:59 <pandorabot> <Zlo> we have bananas but not monkies :(
10:59 <jessicara> being able to discover a planet and protect it with an area though, that would be ideal i think
11:00 <jessicara> think i'd probably add it as another layer over 19000?
11:00 <pandorabot> <BuckarooBanzai> hmm, planet-protection-block ;)
11:01 <pandorabot> <BuckarooBanzai> how big are the planets? how much y-space would we need? i'd like to have some "reserve" up there :D
11:01 <jessicara> that's why i'm going to go over and make every option configurable in the config
11:01 <jessicara> so can fit it to spaces
11:02 <pandorabot> <BuckarooBanzai> so, the plan is to add that here, right? if so: what are the conditions for traveling up there (if any)? And is teleportation allowed there?
11:02 <jessicara> so can set the min/max xz and y, the min/max radius of stars and planets
11:03 <jessicara> it's pretty much left as-is for other mods to allow/disallow things at the moment
11:04 <jessicara> and yeah, that is the tricky thing if were to add it to pandora, would need to discover at least one planet and make a teleporter to get the first access going. and have questions about how much y space it should take
11:04 <pandorabot> <BuckarooBanzai> is 4k nodes enough?
11:04 <jessicara> because can't travel above 18000?
11:05 <jessicara> yeah probably, would mean 4k size stars max
11:05 <pandorabot> <BuckarooBanzai> and if it is going to get displayed on the map it would be nice if they would not overlap much :P
11:05 <pandorabot> <BuckarooBanzai> the 18k+ travel can be fixed of course
11:06 <pandorabot> <Huhhila> 18k-31k reserved for future stuff anyway right?
11:06 <pandorabot> <BuckarooBanzai> 4000 node planets are quite huge though :X
11:06 <pandorabot> <BuckarooBanzai> this qualifies as "future stuff" :D
11:06 <pandorabot> <Huhhila> exactly :)
11:07 <jessicara> another thing which needs done: it generates on init the entire set of planets, for speed reasons and if PcgRandom has a bug in future which changes it's generation it needs to store it after first generation and just load it next time instead
11:08 <pandorabot> <BuckarooBanzai> how does it store the data? as files?
11:08 <jessicara> it doesn't yet
11:09 <jessicara> it just generates it entirely on start, this is fast with only 3 planets, but not with a max of 1000
11:09 <pandorabot> <BuckarooBanzai> oh, another thing: the vacuum-checks...
11:09 <pandorabot> <BuckarooBanzai> previously the air-shell around the planets checked for all planets (a list)
11:10 <pandorabot> <BuckarooBanzai> i think i added an index there, don't know about the performance though
11:10 <jessicara> yeah i saw that 1 dimensional per-block index
11:10 <jessicara> which could be extended to 2 if it gets slow
11:10 <pandorabot> <Huhhila> talking of vacuum... post-jump air leftovers disappear slower these days than earlier?
11:11 <pandorabot> <BuckarooBanzai> Huhhila: yeah, the abm-chance was decreased to 3
11:11 <pandorabot> <BuckarooBanzai> feels a bit more random
11:11 <pandorabot> Player MrCube-bit joined the game
11:12 <pandorabot> <BuckarooBanzai> jessicara: i'd like to help with all that somehow but i can't promise that i have enough time for all that, i also want to play a little more again :) in any case: i think opening an issue, discussing things and adding one thing after another would be the right way i think...
11:13 <pandorabot> <Huhhila> might want to go see int's restaurant neighbourhood for massive amounts of air/vacuum abm...
11:13 <jessicara> yeah, certainly give it some time to improve before actually add it
11:13 <pandorabot> <BuckarooBanzai> Huhhila: the current air/vacuum propagation might be buggy: i have a "wobbly" wall near my space ship currently :D
11:14 <jessicara> yeah i have one which tries to encase a place at 907 height
11:14 <jessicara> the place is fine, but around it the vacuum wobbles downwards
11:15 <jessicara> another thing yet to do: get a seperate non-map seed so can roll the dice on generation in a particular config offline and pick better seeds
11:16 <jessicara> there's a lot of random luck if happen to put things in nice places