pvar vs playerinfo[][]
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
1) True, but only useful for data that needs sharing, and as a general rule, you should provide function accessors, not shared global state. This is true for any variable type.

2) True, but hardly a hardship - you can reset an enum in one simple expression (even though many people don't). And if your default values aren't '0', you still need reset code.

3) Structured data is a GOOD thing! Though vast 'PlayerInfo' structures aren't.

4) False, PVars take WAY more space.

5) See 3 for why the 'PlayerInfo' pattern is bad.

6) In other words, it hides errors in yiur code, instead of having the compile pick them up instantly to fix them.

7) I've written a whole multi-language text library and not needed them yet.

Oh, and contrary to popular belief, they are VASTLY slower, not just a little bit.
What would you store player data in for not a big server (100 players on peak)?
Reply


Messages In This Thread
pvar vs playerinfo[][] - by C0mBat1ve - 20.04.2018, 03:31
Re: pvar vs playerinfo[][] - by Kane - 20.04.2018, 04:00
Re: pvar vs playerinfo[][] - by C0mBat1ve - 20.04.2018, 10:26
Re: pvar vs playerinfo[][] - by NaS - 20.04.2018, 12:40
Re: pvar vs playerinfo[][] - by iKarim - 20.04.2018, 12:44
Re: pvar vs playerinfo[][] - by C0mBat1ve - 21.04.2018, 02:43

Forum Jump:


Users browsing this thread: 2 Guest(s)