Intel sponsors gamedev.net search:   
Tesseract's Game Development JournalBy Tesseract      

How I Work
Preferred Language
Actionscript 3
Development Environment
Notepad++ for coding
Flex 3 SDK for compiling
Graphics
The GIMP, among others

See my personal weblog

Completed (and published) Flash Game Projects:
Games
TriGavoid
Tutorials
Creating Textures with Perlin Noise
Simple Trigonometry and Curves Tutorial



Thursday, July 27, 2006
The map covers an area roughly 50 miles in diameter (~1960 squre miles), and I will be scaling back to ~150 villages. Right now there are 200 in the example. That will space them out, and decrease the possibility of repetition in the town names, sizes, etc.

The user will probably never see the entire map at once. I plan to have the main interface area, in which a village will be represented as a house icon of some kind. Once inside he village everything will be menu-driven, rather than walking around the town. Something like a combination of Ultima IV and Elite.

As I complete more of the game I will re-visit some of these ideas and see if I can add more detail to different areas.

Seeded Pseudo-random numbers, combined with using modulo to keep the numbers within a specific range, have a hidden gotcha: repetition. If you do a little digging in the example I posted yesterday you will see some village names repeated up to four times.

Also: you may notice a pause of a second or two when the Flash movie first loads. This is the game creating 200 instances of the Town object. In the full version of the game there will only ever be one Town object at a time; the object will not be instantiated until the player enters, and it will be destroyed immediately upon leaving. Any persistent data will be saved to a global-level variables.

But this is a minor issue; my theories are still valid, and I will continue to add detail throughout the week.

Next up: Village sizes and available trade goods.

Comments: 0 - Leave a Comment

Link



Wednesday, July 26, 2006
I am playing around with town generator algorithms. I still have a long way to go. My initial test can be found here. You will need the Flash 8 plugin to view the demo.

It is late. More info on this test tomorrow.

Comments: 1 - Leave a Comment

Link



Saturday, July 22, 2006
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:
<world>
	<town_names>
		<prefix>
			<n>Novo</n>
			<n>Dobro</n>
			<n>Velkyo_</n>
			<n>Ljubo</n>
			<n>Mala_</n>
			<n>Kryva_</n>
			<n>Stari_</n>
		</prefix>
		<root>
			<n>Valentyn</n>
			<n>Soskar</n>
			<n>Cebryk</n>
			<n>Kalyn</n>
			<n>Blakoj</n>
			<n>Stepan</n>
			<n>Dmytr</n>
			<n>Zvir</n>
			<n>Lukash</n>
			<n>Kater</n>
			<n>Levk</n>
			<n>Taras</n>
			<n>Oleksandr</n>
			<n>Lozuv</n>
			<n>Vytjaz</n>
			<n>Percun</n>
			<n>Pavl</n>
			<n>Voron</n>
			<n>Yelzav</n>
			<n>Zachar</n>
			<n>Janys</n>
			<n>Oleks</n>
			<n>Mychajl</n>
			<n>Pozn</n>
			<n>Vojnyc</n>
			<n>Most</n>
			<n>Zovtn</n>
			<n>Borys</n>
			<n>Strjuk</n>
			<n>Lukan</n>
			<n>Natas</n>
			<n>Zereb</n>
			<n>Lebed</n>
			<n>Fedor</n>
			<n>Scasl</n>
		</root>
		<suffix>
			<n>ivka</n>
			<n>ynka</n>
			<n>anka</n>
			<n>evo</n>
			<n>ove</n>
			<n>ovate</n>
			<n>ajka</n>
		</suffix>
	</town_names>
	<goods>
		<item
			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"
			/>
		<item
			name="walnuts"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="timber"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="wood,fuel"
			/>
		<item
			name="iron"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="metal,material"
			/>
		<item
			name="wine"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="wool"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="material"
			/>
		<item
			name="sheep"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="animal"
			/>
		<item
			name="whale oil"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="fuel"
			/>
		<item
			name="wolf pelt"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="clothing"
			/>
		<item
			name="amber"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="luxury"
			/>
		<item
			name="leopard pelt"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="clothing"
			/>
		<item
			name="felt"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="clothing"
			/>
		<item
			name="caviar"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="paper"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="sundries"
			/>
		<item
			name="horse"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="animal"
			/>
		<item
			name="potatoes"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="opium"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="luxury"
			/>
		<item
			name="glass"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="luxury"
			/>
		<item
			name="silk"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="clothing"
			/>
		<item
			name="spices"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="copper"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="metal"
			/>
		<item
			name="tea"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="jade"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="luxury"
			/>
		<item
			name="camel"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="animal"
			/>
		<item
			name="dates"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="carpet"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="luxury"
			/>
		<item
			name="pearls"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="luxury"
			/>
		<item
			name="tiger pelt"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="clothing"
			/>
		<item
			name="fish"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="ivory"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="luxury"
			/>
		<item
			name="olives"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="grapes"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="wheat"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="oats"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="barley"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="goat"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="animal"
			/>
		<item
			name="pig"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="animal"
			/>
		<item
			name="cow"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="animal"
			/>
		<item
			name="cheese"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="butter"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="food"
			/>
		<item
			name="wootz steel"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="metal,material"
			/>
		<item
			name="greek fire"
			weight=""
			volume=""
			base_value=""
			base_availability=""
			availability_dropoff=""
			price_increase=""
			lifespan=""
			origin=""
			category="material"
			/>
	</goods>
</world>




...into a meaningful world.

Comments: 1 - Leave a Comment

Link



Tuesday, July 11, 2006
After 10 days of being sick/on vacation/tired of looking at computers, I have made a little progress on the game.

I think using a raycasting engine is a little ambitious for the game as it stands right now. I will probably go with a top-down, 2D-ish look; a decision which was strengthened by finding a beautiful set of free tiles. I am not an artist, so resources like this are a big help.

I am currently putting together the town generator. I have an exhaustive list of goods available in my little world, and I spent some time last night going over a map of Ukraine, looking at hundreds of towns and breaking down the names into prefixes, suffixes and roots. A little more work and I should have a working demo of the town generator ready by this weekend.

The algorithms I use to generate the names will give me the practice I need to add the rest of the detail to the towns: Size, wealth, political leanings, adherence to The Law, specialities, unique items, and the like.

Right now all income will be purely based on trade, and any goods aquired through random encounters between towns. No item creation at this point. No hunting, no fishing, no foraging, no farming. Only trading. If, at the end of summer, I have made good enough progress that I feel I can add new features, then I may reconsider this position, but for right now I want to get something up and running by the end of the month. And that means keeping everything simple.

Comments: 2 - Leave a Comment

Link


All times are ET (US)

 
S
M
T
W
T
F
S
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
23
24
25
28
29
30
31

OPTIONS
Track this Journal

 RSS 

ARCHIVES
November, 2009
March, 2009
January, 2009
November, 2008
October, 2008
September, 2008
August, 2008
July, 2008
February, 2008
December, 2007
November, 2007
October, 2007
September, 2007
July, 2007
June, 2007
March, 2007
February, 2007
January, 2007
December, 2006
August, 2006
July, 2006
June, 2006