Verified:

Primeval Game profile

Game Moderator
Mod Boss
3116

Apr 7th 2013, 17:42:21

It behooves many FFA players to create countries in 1-2s rather than all 16 at once in order to get country numbers that are not consecutive.

While I understand it may be helpful for players not as concerned with losing their entire string while not available to login, I would like to suggest an option on the creation screen to randomly generate assigned country numbers.

Marshal Game profile

Member
32,589

Apr 7th 2013, 20:21:06

good idea.
Patience: Yep, I'm with ELK and Marshal.

ELKronos: Patty is more hairy.

Gallery: K at least I am to my expectations now.

LadyGrizz boobies is fine

NOW3P: Morwen is a much harsher mistress than boredom....

qzjul Game profile

Administrator
Game Development
10,263

Apr 7th 2013, 23:12:48

the problem is the numbers are currently assigned in order; i don't know how we'd make it random and not have gaps; or if we do have gaps... well it'd just be annoying... but doable....
Finally did the signature thing.

Xinhuan Game profile

Member
3728

Apr 8th 2013, 2:17:48

It will have to have gaps if you want random country numbers.

Simple Solution:
1. Maintain an array of say size 200. Put the first 200 country numbers in it from #1 to #200. (You don't have to shuffle the array or anything like that.)

2. When a country is made, pick a random country number from this array, and immediately replace the selected country number with the next number which is #201. The array is always kept at 200 full numbers.

So the next country that gets made, the code again picks 1 of the 200 random numbers, and the selected number gets replaced with #202 in the random pool.

Primeval Game profile

Game Moderator
Mod Boss
3116

Apr 8th 2013, 22:52:02

Whats the problem with gaps anyway? So nobody owns #201 - 211. What does that change?

I see the numbers as individual identifiers, not as a counting tool.

qzjul Game profile

Administrator
Game Development
10,263

Apr 9th 2013, 0:03:57

They are an index in the database =/ Sequential means the game is faster
Finally did the signature thing.

Primeval Game profile

Game Moderator
Mod Boss
3116

Apr 9th 2013, 1:41:15

I suppose I'll go ahead and ask the obvious: How much faster?

qzjul Game profile

Administrator
Game Development
10,263

Apr 9th 2013, 2:28:31

depends; sequential indices can be several times faster than non-sequential

so a country lookup that takes 0.2ms could take 1.0ms

multiply that by say 5 per turn per day (assuming you click around a bunch)... 5*80*4000 countries = 1280 seconds = 21 minutes more CPU/disk time per day...
Finally did the signature thing.

sigma Game profile

Member
406

Apr 10th 2013, 14:18:37

Perhaps something like:

During the window between old reset, new reset--countries created are sent into a "queue". Players create new countries, but no numbers are assigned to them yet. Once the set begins countries created are sequential; and the countries in the queue could be randomized order and assigned numbers.

Primeval Game profile

Game Moderator
Mod Boss
3116

Apr 22nd 2013, 0:21:34

The potential for 21 minutes out of a full day might be worth testing.

General Earl Game profile

Member
896

Apr 22nd 2013, 15:14:51

if you don't want your numbers to be sequential, i think you should have to work for it.. harder than it would take the cpu/disk. :)
General Earl
----
Every time I read AT: http://i.imgur.com/jeryjn8.gif
︻╦╤─✮ ┄ ┄ RatttaTaatataatat!

Marshal Game profile

Member
32,589

Apr 22nd 2013, 19:11:31

create 4, wait 4 mins, create next 4, wait 4 mins, create 4, wait 4 mins, create 4 and time used for waiting etc ~15 mins.
Patience: Yep, I'm with ELK and Marshal.

ELKronos: Patty is more hairy.

Gallery: K at least I am to my expectations now.

LadyGrizz boobies is fine

NOW3P: Morwen is a much harsher mistress than boredom....

Tin Man

Member
1314

Apr 22nd 2013, 23:57:37

or you could take all the countries that were created before the set begins be assigned random numbers once the server goes live, that way they are all still sequential.

After the set begins those who were lazy will have to settle with owning 1500-1515 but as far as restarts go I doubt you wait until all of your countries are dead to restart them so there's no issue there either.