Hi,
I am working on a game which I am developing taking base of Spacewar game.
It is kind of persistent world game where players join and leave.
I notice that mmoItemId is an id assigned as an integer to all new mmoitems.
Also new bullets spawned are mmoitems.
Does it mean I need to worry about reaching integer limits of Java if there are too many bullets or that game world being persistent is there for weeks.
What happens when integer limits are reached?
Regards.
SpaceWar Demo -- mmoItem ID integer limits?
Re: SpaceWar Demo -- mmoItem ID integer limits?
Are you planning to run more than 4 billions items/bullets?
If that's the case I think you will have to worry about RAM (and possibly network) before anything else
Reasonably speaking I don't think that should be a concern, unless you plan to never remove any item you ever create in the game.
Cheers
If that's the case I think you will have to worry about RAM (and possibly network) before anything else
Reasonably speaking I don't think that should be a concern, unless you plan to never remove any item you ever create in the game.
Cheers
Re: SpaceWar Demo -- mmoItem ID integer limits?
Lapo wrote:Are you planning to run more than 4 billions items/bullets?
If that's the case I think you will have to worry about RAM (and possibly network) before anything else
Reasonably speaking I don't think that should be a concern, unless you plan to never remove any item you ever create in the game.
Cheers
Hey.
What I noticed is that the int value just keeps on increasing.
So say I create 1000 bullets then 1 to 1000 are used . Then I create thousand more they use 1001 to 2000. Now if previous bullets are destroyed.
Next set of bullets will use what 1 to 1000 or 2001 to 3000?
I mean does it automatically repeat the unused into values for mmoitems once the previous items with that number are removed?
I assume / believe it just keep increasing by one everytime a new bullet is generated. In which case I would need to implement some sort of pooling for bullets.
Hope I could explain properly.
Re: SpaceWar Demo -- mmoItem ID integer limits?
Malala in case the expected behaviour is that it wraps around after reaching maximum value
Does it check for any item already existing with that particular id.
Although I am asking a very unrealistic scenario but still I need to understand as I would leave some objects as permanent objects and others as temporary bullets. So got to make sure for my understanding.
Does it check for any item already existing with that particular id.
Although I am asking a very unrealistic scenario but still I need to understand as I would leave some objects as permanent objects and others as temporary bullets. So got to make sure for my understanding.
Re: SpaceWar Demo -- mmoItem ID integer limits?
Hi,
no, the counter keeps incrementing.
Zenith wrote:I mean does it automatically repeat the unused into values for mmoitems once the previous items with that number are removed?
no, the counter keeps incrementing.
Re: SpaceWar Demo -- mmoItem ID integer limits?
Lapo wrote:Hi,Zenith wrote:I mean does it automatically repeat the unused into values for mmoitems once the previous items with that number are removed?
no, the counter keeps incrementing.
So does it not mean that there is total limit of maximum 4 billion game items in the lifetime of a game server running. Even if the items get destroyed just in seconds after they are created?
Re: SpaceWar Demo -- mmoItem ID integer limits?
Theoretically yes.
So if you create 50K objects a day you have 80.000 days before the the counter restarts. 219 years, seems a reasonable amount of time
cheers
So if you create 50K objects a day you have 80.000 days before the the counter restarts. 219 years, seems a reasonable amount of time
cheers
Re: SpaceWar Demo -- mmoItem ID integer limits?
Lapo wrote:Theoretically yes.
So if you create 50K objects a day you have 80.000 days before the the counter restarts. 219 years, seems a reasonable amount of time
cheers
oh! Seems like I did not do that maths. Cool !
Who is online
Users browsing this forum: No registered users and 64 guests