Auto Updating Maps

Chickencatch

Active Member
Reaction score
16
Chickencatch's Auto-Updating maps

Maps can be found here

Some examples from en82:
TopTribes.png

AvPoints.png

RecentConquers.png

TribeDominance.png

TopPlayers.png

MostOffensive.png

TopODPlayers.png

PlayerDominance.png

FastestNoblers.png

Details of maps:
Top Tribes:
Simply the top 15 tribes.

Average Points/Player
The 15 tribes with the highest average points per player. Note this is total points over total players, not the top 40. Also, tribes must have a minimum of 5 players to be shown on this map.

Recent Conquers
The last 48 hours of tribal conquers.

Tribal Dominance
Shows the largest and second largest tribe in each continent, over the top of the Top Tribes map. The percentages are calculated including all of the tribeless players, to get 100% dominance there must be no players outside the tribe in the K.

Top Players
Again, simply the top 15 players.

Highest ODA
As it says on the tin - the 15 players with the highest ODA.

Highest OD
The 15 players with the highest total OD.

Player Dominance
Shows the largest and second largest player in each continent, over the top of the Top Players map.

Fastest Noblers
The 15 fastest nobling players on the server. This is calculated by dividing their total number of conquers by the number of days since their first conquer. The numbers by a players name are in units of villages per day. Nobling a village from yourself does not count, but it does count villages you noble and lose again - it is total conquers, not current number of villages. A player must have conquered at least 5 villages to show up on this map.



Automatic updates of the maps are currently scheduled to occur every 4 hours. New worlds and servers should automatically have maps generated as soon as they open for pre-registration, post in this thread if they don't appear.

Coming soon(ish)
Family Tribes
Custom colours
World videos



Feel free to post the images in your world forums, just include a link back here. If you have any suggestions, either post them here or send me a PM.
 
Last edited:

Chickencatch

Active Member
Reaction score
16
Change Log:

9/8/2015
Code has been completely re-written today.
Changed the sidebar to be more like nickjers maps.
Markers are now a fixed size on any map.
Top Noblers map no longer uses the top tribes map as the background and now ranks them based on #villages nobled. Will swap this to #points soon.
The markers for the nobled villages on Top Noblers look a lot cleaner.

3/8/2015
Dominance Maps added.

28/7/2015
Slight changes have been made to the text in a few places, it should look better now.
Numbers have been changed. It now displays:
0 - 10k: 1,234
10k - 1M: 123k
1M-10M: 12.3M
10M+: 123M
K lines are now all drawing. Text has also been smoothed on the K numbers, it was quite pixellated after I shrunk the images.
Colours have been changed (again).

2 New maps:
Total OD
Recent Conquers.

27/7/2015
Images have been shrunk to fit in the spoilers.
Markers have been increased in size by 50%.
Text now scales to fit the space. I'm not quite happy with how the font looks, I need to do some fiddling with that.
Some of the colours have been changed. I'm still looking for a list of good colours though.
 
Last edited:

DeletedUser

Guest
So, it appears that the maps are slightly too wide for the spoilers. Does anyone know of a way to shrink them to fit on the forums, or should I just make them slightly smaller on my end?

Depends on the language you are writing it in. The maps that I created are in java. That code looks something like this:

Image scaledImage = fullImage.getScaledInstance(750, (int) (fullImage.getHeight()*(750.00/fullImage.getWidth())), Image.SCALE_SMOOTH);
BufferedImage buffered = new BufferedImage(750, (int) (fullImage.getHeight()*(750.00/fullImage.getWidth())), BufferedImage.TYPE_INT_RGB);
Graphics2D bimg = buffered.createGraphics();
bimg.drawImage(scaledImage, 0, 0, null);
g.dispose();
 

DeletedUser92753

Guest
So, it appears that the maps are slightly too wide for the spoilers. Does anyone know of a way to shrink them to fit on the forums, or should I just make them slightly smaller on my end?

Seems you are already aware of what I was going to bring up. Also, these look great and have potential. But the colors are so faded. A bolder color would help. Also consider making the individual markers larger. For example the difference between selecting larger markers on Twstats Maps. Overall, a great addition to the forums. Thank you.
 

DeletedUser

Guest
Also, the way you can handle this:


Probably-not-coming-at-any-point:
Some player names are too long to fit on the side. This only affects a very small number of players, and I think that anyone playing that server would be able to tell who it is anyway. It is possible to fix this, but I don't think it's worth it.
Due to how the maps are created, the ones for smaller worlds are quite fuzzy since they have been zoomed in so much. If I can think of a good way to sort this, I will, but otherwise it is not very high on the list. Similarly, the continent numbers are very large on them

Is by doing something like this:

int fontSize = 20;
boolean isTrue = true;
while(isTrue) {
g.setFont(new Font("TimesRoman",Font.BOLD,fontSize));
fm = g.getFontMetrics();
if(height - 15*fm.getHeight() > 20) {
isTrue = false;
}else {
fontSize--;
}
}
int resetFont = fontSize;

(This is to make sure the height stays within your bounded height)

Then, for the width:

fontSize = resetFont;
g.setFont(new Font("TimesRoman", Font.BOLD, fontSize));
fm = g.getFontMetrics();
if(fm.stringWidth(key) > 200) {
boolean stay = true;
while(stay) {
fontSize--;
g.setFont(new Font("TimesRoman",Font.BOLD,fontSize));
fm = g.getFontMetrics();
if(fm.stringWidth(key) <= 200)
stay = false;
}
}

Just some examples of how to manage some of your minor issues that I've already had to face. This is obviously completely useless if you aren't programming in java
 

Chickencatch

Active Member
Reaction score
16
Depends on the language you are writing it in. The maps that I created are in java. That code looks something like this:

Yeah, that's the make them slightly smaller on my end. Easy enough to do, I was just wondering if there was an option on the forums themselves. I'll just make them smaller in my code.

Seems you are already aware of what I was going to bring up. Also, these look great and have potential. But the colors are so faded. A bolder color would help. Also consider making the individual markers larger. For example the difference between selecting larger markers on Twstats Maps. Overall, a great addition to the forums. Thank you.

I am looking for a list of colours that people think work well for the markers, these were just ones that I could tell apart. I can certainly make the markers bigger, but that does make them huge on smaller worlds, since I create the entire map 1000px square and then just zoom on the appropriate area.

Also, the way you can handle this:
I'm using c#, but I assume that it has similar things. I will take a look into it, thanks.
 

twenty-five

Guest
Hmm just this weekend I finished writing auto-updating map code myself (well the drawing bit, there's still maps I could add if I wanted to etc), was actually thinking of posting them later today. Guess mine are surplus to requirements now.

(Although yes I have brilliant domain name and will probably do other tw related things with it (although there is some stuff drawing "big pink bombs" based on rank at some random url somewhere))

Anyways...

It seems w72 tw realised their worlds weren't filling up and decided to reduce them to a 9x9 instead of a 10x10. It then semi-filled up so we have that shape that 'back in the day' every world used to ultimately become (if not full), I thought something broke when I first looked at it too.

Also noticed the missing data a few months back and gave it about 5 mins consideration before being like nah I don't really care. They may have got rid of it because they don't need it, although that data clearly still exists on their servers as the guest links work fine so idk really.

Nice work anyway.
 
Last edited:

Chickencatch

Active Member
Reaction score
16
Hmm just this weekend I finished writing auto-updating map code myself (well the drawing bit, there's still maps I could add if I wanted to etc), was actually thinking of posting them later today. Guess mine are surplus to requirements now.

(Although yes I have brilliant domain name and will probably do other tw related things with it (although there is some stuff drawing "big pink bombs" based on rank at some random url somewhere))

I don't have dominance maps done yet, so yours aren't surplus.

Anyways...

It seems w72 tw realised their worlds weren't filling up and decided to reduce them to a 9x9 instead of a 10x10. It then semi-filled up so we have that shape that 'back in the day' every world used to ultimately become (if not full), I thought something broke when I first looked at it too.

Also noticed the missing data a few months back and gave it about 5 mins consideration before being like nah I don't really care. They may have got rid of it because they don't need it, although that data clearly still exists on their servers as the guest links work fine so idk really.

Nice work anyway.

That's about how long I thought about it for as well, especially after I realized that Dropbox couldn't hold them all without expanding it.

Update:
Images have been shrunk to fit in the spoilers.
Markers have been increased in size by 50%.
Text now scales to fit the space. I'm not quite happy with how the font looks, I need to do some fiddling with that.
Some of the colours have been changed. I'm still looking for a list of good colours though.

Some of these changes have been made on the current update pass, others will be changing on the next one. Also, the current pass has a K next to the fastest noblers number - this is fixed on the next update.
 
Last edited:

DeletedUser

Guest
PlayerDominance map general idea for you(how I handle it):

grab village.txt, iterate over each line-by-line

create a hashtable, key being the playerId, value being a long integer based on the size of the village. Continue adding/updating the value of the hashtable.

TribeDominance: same as playerDominance, but after creating the playerdominance hashtable, you create a method to pull the tribeId of each player, and create a new hashtable using the tribeId, and each player's size as the value added to itself.

I'll be releasing my code shortly to the public, I've already released it to a few people while I was taking midterms, but I've got all of the maps working and it shouldn't be hard for you to convert my java code to C#
 

darkaniken2

Guest
Would it be possible to change how it abbreviates the numbers for big tribes? Such as 122,20k(122.2 million) to 122.2m? I don't know how you're totaling the points, but it should be fairly simple to just count the number of digits(or use if(points > 999,999){formatstuff}) to change how it works.
 

DeletedUser

Guest
Our Saviour! You have come to us in our time of need, we thank you! :icon_biggrin:

Good job on working on bringing these back. They're not quite the same standard as the previous ones but I have faith that they will improve.
 

Chickencatch

Active Member
Reaction score
16
PlayerDominance map general idea for you(how I handle it):

grab village.txt, iterate over each line-by-line

create a hashtable, key being the playerId, value being a long integer based on the size of the village. Continue adding/updating the value of the hashtable.

TribeDominance: same as playerDominance, but after creating the playerdominance hashtable, you create a method to pull the tribeId of each player, and create a new hashtable using the tribeId, and each player's size as the value added to itself.

I'll be releasing my code shortly to the public, I've already released it to a few people while I was taking midterms, but I've got all of the maps working and it shouldn't be hard for you to convert my java code to C#

Yeah, that's along the lines I was thinking. Was thinking #villages instead of points, points is probably better though - #villages wouldn't work very well on small worlds where you've got a lot of 26 point players in the core.

Would it be possible to change how it abbreviates the numbers for big tribes? Such as 122,20k(122.2 million) to 122.2m? I don't know how you're totaling the points, but it should be fairly simple to just count the number of digits(or use if(points > 999,999){formatstuff}) to change how it works.

That is on the list of things to do, but I'm not sure when I'm going to get a chance to work on it again - might not be until next weekend. Also, changing it from 2k -> 2345 as well.

Our Saviour! You have come to us in our time of need, we thank you! :icon_biggrin:

Good job on working on bringing these back. They're not quite the same standard as the previous ones but I have faith that they will improve.

Thanks! If you've got any specific suggestions, please post them. Or, some pictures of nickjers maps - I haven't actually seen his in about 2 years, so I'm sort of starting from scratch here.
 

DeletedUser61336

Guest
If you don't mind me asking chicken, what language(s) is this written in?
 

darkaniken2

Guest
[spoil]
wOj8y7Y.png
[/spoil]

Here is one of Nickjer's for layout. I rather like his white text with black border, since it's pretty easy to see.

If you don't mind me asking chicken, what language(s) is this written in?

He said he's using C#.

I've also noted some of your K lines don't draw.(20/30 border, for example).
 
Last edited:

DeletedUser61336

Guest
[spoil]
wOj8y7Y.png
[/spoil]

Here is one of Nickjer's for layout. I rather like his white text with black border, since it's pretty easy to see.



He said he's using C#.

I've also noted some of your K lines don't draw.(20/30 border, for example).

TY, didn't read all of it, figured if anywhere he would post it in the OP.
 

DeletedUser92753

Guest
I appreciate the recent updates. Its already looking much better. :)

A few things.

Including top OD map as well as ODA would be great. And can't forget the classic K dominance maps.

You also asked for suggestions about colors. I don't know 15 on hand, but if you had a list of colors linked to a rank, it would lend to consistency and look really nice imo. While mostly a throwback to nickjers, I've always considered the colors as follows.

#1- Blue
#2- Yellow
#3- Red
#4- Green

The order I've seen vary, but those are the colors I'd reserve for top spots. To fill out your top ten, I'd include black, white, cyan, pink, orange and purple. After those, the colors imo get murky anyway.

Cheers! We all appreciate the hard work of people like you and WointPhore who are stepping up admirably in the wake of nickjer's departure.
 

Chickencatch

Active Member
Reaction score
16
Made a bunch of changes suggested/pointed out by people here, including 2 new maps, Recent Conquers and Top OD - Dominance maps will be coming soon, potentially tomorrow.

I will go through and add the new maps to the world forums when I get a chance tomorrow.

I'm looking for people's thought's on merging the Recent Conquers into the Top Tribes - They are almost the same, so I can't see any downsides. I would simply show the conquers on Top Tribes and scrap the Recent Conquers. If anyone can think of a reason not to, post it, else I will do this in a few days.

Update:
Slight changes have been made to the text in a few places, it should look better now.
Numbers have been changed. It now displays:
0 - 10k: 1,234
10k - 1M: 123k
1M-10M: 12.3M
10M+: 123M
K lines are now all drawing. Text has also been smoothed on the K numbers, it was quite pixellated after I shrunk the images.
Colours have been changed (again). I have avoided black since it would blend in with the sidebar.

2 New maps:
Total OD
Recent Conquers.

Some updates are live now, others will be coming live soon.
 
Top