12-25-2011, 10:01 AM
(12-25-2011, 02:08 AM)STR_Warrior Wrote:(11-10-2011, 10:13 AM)rs2k Wrote: I think the world class should gain m_MobLimit, m_CurrentPlayers and m_CurrentMobs. If ( m_CurrentMobs * m_CurrentPlayers > m_MobLimit), then no more mobs can spawn. When a mob spawns add + 1 to m_CurrentMobs, when it is removed, remove one from it. Same thing with m_CurrentPlayers.
The mob rate should also be slower and a bit more random I think.
How does this sound?
sounds great there are too many mobs spawning now
I have been following this project now for a couple of days and I have to put my thoughts into this. First from what it looks like the whole mob spawning that is currently implemented is more proof of concept than anything. The correct way to spawn mob is definitely not to just spawn them at random intervals around the player. Again this seems like a proof of concept. The main reason I saw this is because you are talking about adding all kinds of new methods/variables to the world class, but all this is going to do is bury it deeper so that when it is changed it is harder to do.
The way it probably should be done is to spawn mob with the chunks that are loaded around the player. They would have probabilities of spawning based on lighting/biome/location etc. With this you can add a limit for the number of mob per chunk which will also inherently create a 'mob limit' for the world, but based on the number of players/chunks loaded.
Let me know what you think, and this is my first post so hello everyone.