Sign in to follow this  
  • entries
    90
  • comments
    66
  • views
    72444

I've been working. Honest!

Sign in to follow this  
Tesseract

89 views

I have been avoiding the computer as much as possible in my non-work hours. That doesn't mean I haven't been working on the game. Sitting on my porch with a tablet of graph paper, a pen and a glass of wine is a great way to work through some of the logic problems I have come up against.

The most immediate one is the following: I have an excellent pseudo-random number generator pumping out excellent pseudo-random numbers. But what do I do with those numbers? None of the procedural content generator tutorials actually address those issues. I have a table of name prefixes, roots and suffixes. How do I make those numbers wrangle the word fragments into something meaningful? Likewise I have a long list of trade goods and their origin points, general rarity and the like. What kind of function/algorithm should I use to make "3701454" turn into "Novo Zerebevo"?

I am exploring using the modulo operator ("%") to come up with the data I need. For example, here is how I am determining town size: I have a seed number which is assigned to a town. I take that seed number and apply %15 to it, giving me a range of 0-14. I check this number against a table which looks something like this:

% seed population
00 - 04 100
05 - 08 250
09 - 11 500
12 - 13 1000
14 2500

I am sure this method will work for everything else. I just need to get straight in my head how I will turn this:




Novo
Dobro
Velkyo_
Ljubo
Mala_
Kryva_
Stari_


Valentyn
Soskar
Cebryk
Kalyn
Blakoj
Stepan
Dmytr
Zvir
Lukash
Kater
Levk
Taras
Oleksandr
Lozuv
Vytjaz
Percun
Pavl
Voron
Yelzav
Zachar
Janys
Oleks
Mychajl
Pozn
Vojnyc
Most
Zovtn
Borys
Strjuk
Lukan
Natas
Zereb
Lebed
Fedor
Scasl


ivka
ynka
anka
evo
ove
ovate
ajka



name="deer hide"
weight="4"
volume="2"
base_value="5"
base_availability="7"
availability_dropoff=".2"
price_increase=".3"
lifespan="100"
origin="-18,0"
category="clothing"
/>
name="walnuts"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="timber"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="wood,fuel"
/>
name="iron"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="metal,material"
/>
name="wine"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="wool"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="material"
/>
name="sheep"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="animal"
/>
name="whale oil"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="fuel"
/>
name="wolf pelt"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="clothing"
/>
name="amber"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="luxury"
/>
name="leopard pelt"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="clothing"
/>
name="felt"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="clothing"
/>
name="caviar"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="paper"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="sundries"
/>
name="horse"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="animal"
/>
name="potatoes"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="opium"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="luxury"
/>
name="glass"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="luxury"
/>
name="silk"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="clothing"
/>
name="spices"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="copper"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="metal"
/>
name="tea"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="jade"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="luxury"
/>
name="camel"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="animal"
/>
name="dates"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="carpet"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="luxury"
/>
name="pearls"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="luxury"
/>
name="tiger pelt"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="clothing"
/>
name="fish"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="ivory"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="luxury"
/>
name="olives"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="grapes"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="wheat"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="oats"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="barley"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="goat"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="animal"
/>
name="pig"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="animal"
/>
name="cow"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="animal"
/>
name="cheese"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="butter"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="food"
/>
name="wootz steel"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="metal,material"
/>
name="greek fire"
weight=""
volume=""
base_value=""
base_availability=""
availability_dropoff=""
price_increase=""
lifespan=""
origin=""
category="material"
/>






...into a meaningful world.
Sign in to follow this  


1 Comment


Recommended Comments

Quote:
Sitting on my porch with a tablet of graph paper, a pen and a glass of wine


I completely agree with you. Minus the porch, tablet, and pen. [grin]

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now