Page 2 of 2

Re: Version 0.5.0

Posted: Mon Jun 10, 2013 4:43 am
by ssilk
zlosynus wrote:It would be really nice to be able to have custom map generators in lua for example, even if they would be slower. Then nicer levels could be achieved.
Maybe this is difficult because the algorithm needs to be deterministic. This means that it can generate any pice of map just by the coordinates and the parameters you have set.

I think the idea of silverwarior is great. I would add, that the areas with less creepers and small but near resources could repeat. For me, that's the points I would like to settle out and begin a second base.

Re: Version 0.5.0

Posted: Mon Jun 10, 2013 5:40 am
by slpwnd
SilverWarior wrote:nles you count the fact that Factorio didn't figured out that old scenario pack is already obsolete and should be updated with new one.
Yes I read the instructions in the first post bout the need to manually delete old scenario pack folder but I still gave it a try.
The updates are basically packages with diffs between different versions. The scenario pack update is a diff from version 0.0.0 (no scenario pack) to 0.5.0. Therefore it doesn't apply in the case when scenario pack (like 0.4.4) is already installed. Sure Factorio could see that 0.4.4 < 0.5.0 and 0.5.0 is a complete package (doesn't need any diff) and simply delete the 0.4.4 version and offer the update. That might be the case in the future (it is not so much work). However we wanted to avoid any complications with the first updater version.
Hi-Torque wrote:There is certainly no reason to apologize for an experimental alpha. I hope with our input you guys can finish crafting a game we will all enjoy playing for a very long time. I look forward to further updates with great enthusiasm. A bit off topic, but I am so pleased with Factorio, I have been playing it to the exclusion of nearly every single game I own.
Thank you. That is very encouraging to hear.
Hi-Torque wrote:It has also completely disrupted my hobby of building paper models...
That is rather pity.
zlosynus wrote:t would be really nice to be able to have custom map generators in lua for example, even if they would be slower. Then nicer levels could be achieved.
This is doable. The map generator can be represented by two functions:

TilePosition -> GeneratedTile
TilePosition -> GeneratedEntities (fish, resources, enemy bases, etc.)

Both of these functions use the deterministic randomness (internal random generator). The issue I see with making a Lua API for this is the performance. It would have to be tested. And of course once we migrate to LuaJIT it coudl be feasible.
ficolas wrote:How?
Can this be made by the lua script for different GUIs or just in the begining for all the GUIs?
Because it would be awesome to have a smartphone-like frame arround the PDA item, or an electric circuhit as the background for the soldering iron GUI. (Something new coming in some update of the F-Mod)
Have a look at the data/core/prototypes/style.lua. These values can be changed from the mod in the same way the regular prototypes for entities, items, recipes, etc. are.
SilverWarior wrote:
slpwnd wrote:The map generator has a minimal hardcoded distance for the enemy bases from the player spawning position. At the moment this is set to 100 but it should probably be higher. Also the enemy bases frequency / size increases slightly with the distance form the starting position.
This is the direction I think we will take. We already have this for the enemy bases (min distance 100).
SilverWarior wrote: Now without knowing how your map generator algorithm works I can't give you any more detailed information as how to achieve this. But if you are wiling to share that infor with me on PM I would try to help you out with this as best I could.
The map generator is based on the Perlin's noise. For an overview it is good to imagine that the generator creates a "mountain range". Afterwards the shape of this mountain range is translated into what is on the map. So for instance if a point on the map is "higher than 3000m" then it will be sand. If it is lower than 3000m but higher than 1000m then it will be grass, etc. There is a lot of manual tweaks to make the maps look reasonable. And yes we are aware that the maps are not of a high quality - it is on the list:)

Re: Version 0.5.0

Posted: Mon Jun 10, 2013 7:46 am
by zlosynus
slpwnd wrote:
zlosynus wrote:t would be really nice to be able to have custom map generators in lua for example, even if they would be slower. Then nicer levels could be achieved.
This is doable. The map generator can be represented by two functions:

TilePosition -> GeneratedTile
TilePosition -> GeneratedEntities (fish, resources, enemy bases, etc.)

Both of these functions use the deterministic randomness (internal random generator). The issue I see with making a Lua API for this is the performance. It would have to be tested. And of course once we migrate to LuaJIT it coudl be feasible.
I don't think speed is really an issue, and it should be reasonably fast even in Lua. The thing is that with this one can experiment with maps and stuff like this. And if something is really good, it could be done faster. Also map generator should not be running so much, so it should be fine. (There really are bigger speed concerns than this.)

Re: Version 0.5.0

Posted: Mon Jun 10, 2013 8:32 pm
by SilverWarior
slpwnd wrote:The map generator is based on the Perlin's noise. For an overview it is good to imagine that the generator creates a "mountain range". Afterwards the shape of this mountain range is translated into what is on the map. So for instance if a point on the map is "higher than 3000m" then it will be sand. If it is lower than 3000m but higher than 1000m then it will be grass, etc. There is a lot of manual tweaks to make the maps look reasonable. And yes we are aware that the maps are not of a high quality - it is on the list:)
How do you manage to incorporate all map generation parameters into perlin noise. I have read quite some domumentation on perlin noise lately but I can't seem to figure this out.
Now the size of each patch of gound type (sand, grass, mud) could be afected by changing the height range which belongs to each individual patch.
But how do you controll how often do these patches emerge?

Also how do you controll resource placments and creaper base placments?

Re: Version 0.5.0

Posted: Mon Jun 10, 2013 11:45 pm
by kovarex
The noises we use have 3 basic parameters.
1) Scale
2) Shift
3) Magnitude.

For the purpose of terrain generating, noise for all terrains are generated, every with different settings, and the highest value on the field wins, simple.

Re: Version 0.5.0

Posted: Tue Jun 11, 2013 2:18 am
by SilverWarior
Wait you are generating perlin noise for every posible terrain and then compare them between to see which one has higher value at certain location?

Re: Version 0.5.0

Posted: Tue Jun 11, 2013 3:47 am
by rlerner
Found a bug.

Have two engines coupled, then, select the rear one (and be in it!), and press "R" or your rotate key.

Hyper warp speed!

Love this, even though I know it's unintentional.

Re: Version 0.5.0

Posted: Tue Jun 11, 2013 7:49 am
by MF-
rlerner wrote:Found a bug.

Have two engines coupled, then, select the rear one (and be in it!), and press "R" or your rotate key.

Hyper warp speed!

Love this, even though I know it's unintentional.
Is it compatible with stopping at stations for cargo?

Re: Version 0.5.0

Posted: Fri Jun 14, 2013 8:05 am
by elgreen
https://www.factorio.com/download/experimental
The following link is not possible to download

Re: Version 0.5.0

Posted: Fri Jun 14, 2013 8:18 am
by MF-
elgreen wrote:https://www.factorio.com/download/experimental
The following link is not possible to download
You need to be logged in. You don't download this link, it's a web page with all the available versions of 0.5.0

Re: Version 0.5.0

Posted: Fri Jun 14, 2013 8:50 am
by elgreen
MF- wrote:
elgreen wrote:https://www.factorio.com/download/experimental
The following link is not possible to download
You need to be logged in. You don't download this link, it's a web page with all the available versions of 0.5.0
factorio_not_loads.jpg
factorio_not_loads.jpg (83.74 KiB) Viewed 6497 times

Re: Version 0.5.0

Posted: Wed Jun 19, 2013 9:11 pm
by ficolas
How can I use the game.findentitiesfiltered?? I tried with game.findentitiesfiltered(name="underground-mining-drill",{pos}{pos}) but it says wrong number of arguments.

Re: Version 0.5.0

Posted: Wed Jun 19, 2013 9:12 pm
by ficolas
How can I use the game.findentitiesfiltered?? I tried with game.findentitiesfiltered(name="underground-mining-drill",{pos}{pos}) but it says wrong number of arguments.

Re: Version 0.5.0

Posted: Wed Jun 19, 2013 9:16 pm
by kovarex
Oh, I forgot to document it.
It is now here:
https://forums.factorio.com/wiki/inde ... esfiltered