Dilly Tools |
Post Reply
|
Page <1 3456> |
| Author | |
Albatross
Postmaster General
Joined: 11 May 2011 Status: Offline Points: 1118 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 Feb 2015 at 15:50 |
|
And I think you've hit upon the critical part of success of failure in these ventures. To do a decent implementation, you need a decent hosting environment, offering a proper database, server-side storage, processing and user management, BUT it costs money to run, and it's a very difficult ask for someone to give up their spare time and cash for free.
|
|
![]() |
|
![]() |
|
Digioso
Forum Warrior
Joined: 09 Feb 2015 Location: Germany Status: Offline Points: 287 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 Feb 2015 at 15:17 |
|
I'm using Perl. There are no structures (struct) like you have in C in Perl.
You can use either arrays or hashes, whereas hashes are basically just arrays with named elements. But I might have other options like using file databases. There's a Berkeley DB implementation for Perl. I'd use the MySQL database on my webspace if I didn't have these restrictions there. :( |
|
![]() |
|
IbnSenna
Postmaster
Joined: 20 Nov 2011 Location: Paris france Status: Offline Points: 632 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 Feb 2015 at 14:14 |
|
python hashable structures shouldn't amount to huge number of bytes, either…
|
|
![]() |
|
Albatross
Postmaster General
Joined: 11 May 2011 Status: Offline Points: 1118 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 Feb 2015 at 13:46 |
|
If you can use a strictly-typed language (where memory usage tends to be very efficient and old-school), then you might be able to code an efficient look-up, without using sparse hashing techniques. The most space-efficient method is to store it in a static array of typed structures. So, for example, most of the stats could be encoded in 2000 x 3600 x (a small number of) bytes (I forget the exact numbers), which goes nowhere near gigabytes.
|
|
![]() |
|
![]() |
|
Digioso
Forum Warrior
Joined: 09 Feb 2015 Location: Germany Status: Offline Points: 287 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 Feb 2015 at 13:38 |
|
Oh, that would be great!
I'm not using a database as all for the settlement script. My own websapce is unfortunately very limited when it comes to the size of the databases (and number of queries per hour). So I am not able to load the mapdata into my databases. :( I have the alliance data on my webspace and I'm using this for the webtools, though. The settlement spot finder downloads the towndata and mapdata to your computer and does the whole calculation there. Unfortunately I cannot load the whole mapdata into a hash because even with my 8GB of memory I run out of memory. That's why I split it up into checking region by region. Well, I ordered an ODROID U3 Mini-Computer. Maybe I can use this as an database server. |
|
![]() |
|
Albatross
Postmaster General
Joined: 11 May 2011 Status: Offline Points: 1118 |
Post Options
Thanks(1)
Quote Reply
Posted: 23 Feb 2015 at 12:26 |
|
If I have time soon, I'll donate a few bits.
I have a SQL-based settlement/terrain finder that also scans sovereignty and nearby player occupation, which takes about a minute on a laptop (result here). The speed-up is mostly a matter of indexing correctly, and structuring the queries to exploit that. It has benefits for any other limited-distance queries you might like to run on the map data.
There might also be bits from here (or its back-end, which I've effectively discontinued) that you might want -- let me know, and I'll see what I can extract. Note that I've very little free time, so probably can't help much with implementation, other than general guidance.
|
|
![]() |
|
![]() |
|
Digioso
Forum Warrior
Joined: 09 Feb 2015 Location: Germany Status: Offline Points: 287 |
Post Options
Thanks(1)
Quote Reply
Posted: 23 Feb 2015 at 10:16 |
|
Features so far:
- Show all tows of an alliance - Show towns near coordinate - Show inactive players and towns - Show towns of a specific player and display nearby towns of all or specific alliances - Distance Calculator between two coordinates And I have the settlement spot finder ready as well. But not in a form that I can release it to the public. It takes a LONG time to scan everything and eats CPU power and RAM like nothing. I'm having a scan running since Friday which is not finished yet with the whole map. But scanning single regions works quite well. And I want to introduce a lot more variables to scan for (EG +% Spear bonusses and stuff like that). And I was encouraged to hold back with that tool... Settlement spots are a valuable asset. I haven't decided on this yet. Making it public at least involves more work because I have to introduce a user friendly way to configure the search parameters. Right now this is done by directly changing the parameters in the script. What does it look for? It looks for a high ressource spot (more than 13 food or so) and a nearby settlement spot (eg 7 food directly next to the high res spot). These can be changed. EG if you want a high res spot with at least 15 clay and a settlement spot with 7 wood and 5 food it can look for that too. And then it looks for nearby towns of other players. If the towns are too near (EG below 10 squares distance) the location gets kicked out. What it can do so far: - Scan the whole world map - Scan between two coordinates - Scan single or multiple regions/countries (such as Ursur or Tor Carrock for example) Following variables can be set: - Resource on the high res spot between <min> and <max> (EG 13-25) - Default: 13-25 - Define which resource you're looking for on the high res spot. EG food or clay or whatever - Default: food - Define the distance between the settlement spot and the high res spot (1, 2, 3, ... squares) - Default 1 square - Define what resources you'd like to have on the settlement spot (EG 7 food, 5 wood and you don't care about the others) - Default: 7 food and you don't care about the others - Number of resource plots on the settlement spot - Default: 25 - On what kind of Terrain your city should be. Terrain means Plains, Small Mountain, Large Hill, ... - Default: You don't care. - Minimum distance to other cities (Default: 10 Squares) - Show distance to nearby cities. The scan radius can be set. - Default x/y +/- 20 around the settlement spot Future plans: - Your city should not be directly next to a forest, a mountain, ... - Your city should be surrounded by plains or a mountain, or ... - Additional search parameters to look for specific resources around the city for Sov. EG: The sqaures directly around your city should have at least 30 food. And the search can be enlarged to include squares in a further radius (radius of 2 around the city or more) - Additional search parameters to include bonusses like +1% Spears production per hour. Same radius thing as above. EG you want to have at least +5% Spears production directly around your city or +10% in radius 2. Both combined: EG 30 food and 5% Spears production. Edited by Digioso - 23 Feb 2015 at 10:20 |
|
![]() |
|
Rill
Postmaster General
Player Council - Geographer Joined: 17 Jun 2011 Location: California Status: Offline Points: 6903 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 Feb 2015 at 19:52 |
|
thanks for working on this -- I know people have been clamoring for it!
|
|
![]() |
|
Digioso
Forum Warrior
Joined: 09 Feb 2015 Location: Germany Status: Offline Points: 287 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 Feb 2015 at 17:24 |
|
Thank you. :)
|
|
![]() |
|
Badger7
New Poster
Joined: 05 May 2014 Status: Offline Points: 15 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 Feb 2015 at 12:17 |
|
great work,
well done.
|
|
|
I love everyone! I love to be around some people, I love to stay away from others, and some I'd just love to punch right in the face!
|
|
![]() |
|
Post Reply
|
Page <1 3456> |
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |