Mythruna
June 23, 2021, 07:47:13 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: A day's worth of standing still...  (Read 15247 times)
pspeed
Administrator
Hero Member
*****
Posts: 5593



View Profile
« on: August 20, 2012, 01:26:55 AM »

Spent nearly all day today heads-down coding to end up back where I was some time the previous night.  The game's internal infrastructure made great strides but it doesn't change the fact that it feels like treading water all day.  Also, the internal stuff still needs some work before it's in shape for the real engine... but it works ok in the AI prototype for now.

Lately, I find all kinds of reasons to bypass the normal terrain generation to get large sections of raw map data instead of the little chunks.  The random town stuff and road generation was kind of the last straw so I finally started incorporating this formally into the engine... which will reap a lot of benefits down the road.  The biggest plus is that it means I can generate these data files once and reuse them rather than doing the expensive calculation on the fly.

This is the same kind of data used to generate the classifier info in this pic: http://i.imgur.com/RAJMT.png

The other thing is that previously, the data was always from the raw fractal (and it still is) and so didn't have any of the gorges or cave systems in it.  Now that it's being more formalized, I can update this map-level data as the terrain is changed by that stuff... and by some user edits.

Half a dozen other planned features were sort of waiting for this data also... so in the long run it's "about time".


This came up now because when I went to bed last night, I was pretty sure that today I'd be starting to plot where towns should go... starting with the spawn point and spawn town.  The problem was, even to find the proper terrain-based spawn point, I needed to do several seconds worth of calculations.  I've been sort of living with these long pauses in the AI tester lately but it was starting to get ridiculous.  The layer in the image above did its calculations, spawn placement was going to have to do its calculation... it was time for proper support for map classification data.

So I did finally get this in.  It adds about 400k to each "node" (a 1024x1024 area) on disk... but given the ultimate utility of this information, that's small.


Later this evening, I did finally get to plotting the location of the spawn town.  This is the kind of trial-and-error coding that I generally obsess over.  If it took me 3 hours to get the color of fire right, you can guess how much time it takes to figure out why a town is placed in a location that seems wrong.  I had a lot of that.  Tweaking the algorithm, running the AI tester, scratching my head, looking at the data, and then finally copying it over to one of my Mythruna worlds to look at it in person.

Things always look different on the map.  In the 3D world, you have nice sight lines, etc... a few hours of tweaking and I mostly have the spawn town selection working pretty well.  The potential port sites is still a little weird.  It's technically correct now but I always end up having to go look at it in the world to confirm because it looks wrong on the map... and sometimes seeing what the computer saw as a good port site is a little tricky.  Fortunately, the computer will also be placing the docks someday.

As a debugging measure, at one point I ended up plotting all of the potential port sites for a good section of the map.  This view was nice and it's a relatively quick calculation... I may go ahead and store this information instead of recalculating it all the time.  This information would be useful even if there is no port there but an NPC ship for some reason wanted to go ashore.  The places that are good for ports are also good for reversibly beaching.

Anyway, I feel like things are starting to come together a little bit.  Hopefully this manifests in "something to show" soon.

« Last Edit: August 20, 2012, 01:35:39 AM by pspeed » Logged
pspeed
Administrator
Hero Member
*****
Posts: 5593



View Profile
« Reply #1 on: August 20, 2012, 01:35:07 AM »

For the curious, here is a picture showing where the engine chose to place the spawn point and the spawn town given the rules as I have them today:

http://i.imgur.com/FJNVm.png



I plotted some roads for testing.  The spawn connects to my original hand-built town and also to the spawn town location.  I also plotted a road to where the engine says is a good port site.  I even hand built a dock there in my Mythruna world to confirm it.
Logged
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #2 on: August 20, 2012, 02:41:41 AM »

Paul that sounds pretty cool haha so the roads ect are spawning in game now? or just in the little testing bit.
good work when ever i read your blogs like this its as if the games coming along fast Tongue
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
pspeed
Administrator
Hero Member
*****
Posts: 5593



View Profile
« Reply #3 on: August 20, 2012, 08:30:27 AM »

Paul that sounds pretty cool haha so the roads ect are spawning in game now? or just in the little testing bit.
good work when ever i read your blogs like this its as if the games coming along fast Tongue

Only my AI tester thing will make the roads but then I can copy the world over to my Mythruna single player world and see what they look like.
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #4 on: August 20, 2012, 09:24:09 PM »

Paul that sounds pretty cool haha so the roads ect are spawning in game now? or just in the little testing bit.
good work when ever i read your blogs like this its as if the games coming along fast Tongue

Only my AI tester thing will make the roads but then I can copy the world over to my Mythruna single player world and see what they look like.

Next: The spawning and rotation of buildings. Smiley I bet If you posted what you did everyday, It would be like an everyday adventure Wink. Love your work Paul. So I'm guessing the donators are getting something special soon? Hehe.

Edit: I can see you and FutureB are on Smiley
« Last Edit: August 20, 2012, 09:25:50 PM by Moonkey » Logged

Mythruna: Don't you dare read any posts I made before 2014.
pspeed
Administrator
Hero Member
*****
Posts: 5593



View Profile
« Reply #5 on: August 20, 2012, 09:28:18 PM »

Paul that sounds pretty cool haha so the roads ect are spawning in game now? or just in the little testing bit.
good work when ever i read your blogs like this its as if the games coming along fast Tongue

Only my AI tester thing will make the roads but then I can copy the world over to my Mythruna single player world and see what they look like.

Next: The spawning and rotation of buildings. Smiley I bet If you posted what you did everyday, It would be like an everyday adventure Wink. Love your work Paul. So I'm guessing the donators are getting something special soon? Hehe.

Edit: I can see you and FutureB are on Smiley

I hope so... I spent the afternoon tweaking my path/road carver.  Kind of a small waste of time at this point because the old roads were ok... but they were uninspiring.  Now I'm back to proper town layout.  I don't know if I'll get to putting real 3D buildings in tonight or not but hopefully I will have the general town laid out... I'm not yet randomizing the spawn town because I want to test all of the current building types for proper placement.  one step at a time.
Logged
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #6 on: August 20, 2012, 11:47:21 PM »

Lol moonkey theres nothing me and paul where talking about in the donators section just to let you know, i just loged on earlier to check for any updates on this post :p
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
ayoriceball
Donators
Jr. Member
***
Posts: 99


Control Magic


View Profile
« Reply #7 on: August 21, 2012, 12:41:26 AM »

Paul that sounds pretty cool haha so the roads ect are spawning in game now? or just in the little testing bit.
good work when ever i read your blogs like this its as if the games coming along fast Tongue

Only my AI tester thing will make the roads but then I can copy the world over to my Mythruna single player world and see what they look like.

Next: The spawning and rotation of buildings. Smiley I bet If you posted what you did everyday, It would be like an everyday adventure Wink.

That sounds like Toady One's blog for Dwarf Fortress. Not a bad idea.
Logged

From Bay12Forums
Don't dwarven ladies know they're beautiful the way they are? They don't need to starve themselves to look like those elven bitches.
I have a skin, a potato has a skin, therefore, I'm God
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #8 on: August 21, 2012, 11:40:38 PM »

Paul that sounds pretty cool haha so the roads ect are spawning in game now? or just in the little testing bit.
good work when ever i read your blogs like this its as if the games coming along fast Tongue

Only my AI tester thing will make the roads but then I can copy the world over to my Mythruna single player world and see what they look like.

Next: The spawning and rotation of buildings. Smiley I bet If you posted what you did everyday, It would be like an everyday adventure Wink.

That sounds like Toady One's blog for Dwarf Fortress. Not a bad idea.

"Day 1: I tried wrestling a man with my front left tooth In this random house." < What I do In Dwarf Fortess. Smiley
Logged

Mythruna: Don't you dare read any posts I made before 2014.
ayoriceball
Donators
Jr. Member
***
Posts: 99


Control Magic


View Profile
« Reply #9 on: August 21, 2012, 11:55:04 PM »

Paul that sounds pretty cool haha so the roads ect are spawning in game now? or just in the little testing bit.
good work when ever i read your blogs like this its as if the games coming along fast Tongue

Only my AI tester thing will make the roads but then I can copy the world over to my Mythruna single player world and see what they look like.

Next: The spawning and rotation of buildings. Smiley I bet If you posted what you did everyday, It would be like an everyday adventure Wink.

That sounds like Toady One's blog for Dwarf Fortress. Not a bad idea.

"Day 1: I tried wrestling a man with my front left tooth In this random house." < What I do In Dwarf Fortess. Smiley

I hope you realize that it's a development blog Tongue
Logged

From Bay12Forums
Don't dwarven ladies know they're beautiful the way they are? They don't need to starve themselves to look like those elven bitches.
I have a skin, a potato has a skin, therefore, I'm God
pspeed
Administrator
Hero Member
*****
Posts: 5593



View Profile
« Reply #10 on: August 21, 2012, 11:58:00 PM »

The town generator is coming along a bit.

Here is a picture of a potential farm that the generator carved out for me:


It comes from some data analysis like this:


That's a set of "flat" regions based on terrain.  The generator then uses the criteria that it needs a large-ish area to find the big areas and potentially merge some small nearby areas... ultimately it reduces it down to more likely useable candidates through some various forms of crunching:


The top in-game screen shot was generated from a different town:


It's the large orange/red section in the bottom just left of middle.

Farms are the most extreme examples so I did them first.  It's easier to find smaller plots and most things will require relatively small plots of a specific size (8x8, 8x16, etc.).  Farms are unique in that they want potentially several regions and they don't care about the shape beyond filtering out the small-feature "noise".


Logged
pspeed
Administrator
Hero Member
*****
Posts: 5593



View Profile
« Reply #11 on: August 22, 2012, 12:00:37 AM »

P.S.: For those who know how to hack their world seed... I'm falling in love with seed 101.
Logged
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #12 on: August 22, 2012, 01:52:35 AM »

Maybe in the donators section you could give us "simple minded" people a tutorial on changing seeds Tongue
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
BigredRm
Donators
Sr. Member
***
Posts: 378


<-o Word up goes to that modern man o->


View Profile
« Reply #13 on: August 22, 2012, 08:38:20 AM »

Thanks for the updates Paul.
Logged

Visit Iron Island @ 1708,702
pspeed
Administrator
Hero Member
*****
Posts: 5593



View Profile
« Reply #14 on: August 22, 2012, 08:58:40 AM »

Maybe in the donators section you could give us "simple minded" people a tutorial on changing seeds Tongue

I think I have mentioned it elsewhere but I couldn't easily find it on a search.  The easiest way is to run the stand alone server just to get the world created with a custom seed (because you can set it in the GUI) and then copy the mythruna.db directory over to a Mythruna client install.  (Make sure to remove or rename any existing mythruna.db directory.)
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!