Mob limit
#11
Yeah better perhaps they also should have there own m_Health.
So we can set how much health they have. ALL pawns already have health, so you don't need to add anything.
Reply
Thanks given by:
#12
What are you talking about?
Reply
Thanks given by:
#13
Hey,
for your Problem with the Pickups, which were crashing the client:
I came across the same problem.Big Grin
But after a while a found the bug.
The cItem-Class is causing this.
if(!isValidItem( m_ItemID ) ) m_ItemID = E_ITEM_EMPTY;

is in the cItem constructor.. and now.. raw chicken etc arenĀ“t in IsValidItem so the itemid is E_ITEM_EMPTY.
And sending an E_ITEM_EMPTY to the client seems to crash it.
(IsValidItem is in Defines.h)

So i updated the Function and the cPickup to prevent it sending E_ITEM_EMPTY for the future Wink

This is basically what you have to do Wink
Reply
Thanks given by:
#14
Ah okay, makes sense!

Should add a check in cPickup then, to see if the Item ID is 0 (or -1) and output an error in te log if so
Reply
Thanks given by:
#15
(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
Reply
Thanks given by:
#16
(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.

Reply
Thanks given by:
#17
(12-25-2011, 10:01 AM)AsianBusinessman Wrote: 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.

Hi and welcome to the forums Smile

This does sound like a good idea!Big Grin Thanks
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)