[DiscordArchive] Performance wise though what's the benefit of having a table of more "complex" flags over a single a
[DiscordArchive] Performance wise though what's the benefit of having a table of more "complex" flags over a single a
Archived author: whatwere • Posted: 2022-06-20T18:27:08.406000+00:00
Original source
Performance wise though what's the benefit of having a table of more "complex" flags over a single array of integers that serve as bit flags?
Archived author: vblanco • Posted: 2022-06-20T18:27:12.378000+00:00
Original source
this is a design i used once in a rpg prototype i made
Archived author: vblanco • Posted: 2022-06-20T18:27:18.957000+00:00
Original source
i was using SQLite, singleplayer project
Archived author: <o> • Posted: 2022-06-20T18:27:40.627000+00:00
Original source
tree vs array here isn't about performance, it's about what you need your system to do so you can express the things you want
Archived author: vblanco • Posted: 2022-06-20T18:27:43.063000+00:00
Original source
<@419265958549520385> lets say you have 20.000 possible quest flags
Archived author: vblanco • Posted: 2022-06-20T18:27:52.474000+00:00
Original source
now in your case, for every player, you need to reserve enough space for 20.000 flags
Archived author: vblanco • Posted: 2022-06-20T18:27:58.041000+00:00
Original source
with my design each player only has the flags he needs
Archived author: whatwere • Posted: 2022-06-20T18:28:45.721000+00:00
Original source
1 32bit integer is 4294967296, 16 bit 65535
Archived author: <o> • Posted: 2022-06-20T18:28:55.114000+00:00
Original source
if you have that many flags you might want to consider tying flags to individual quests, then you can extend them with something very simple like a uint32, which you store along with your 25 possible quests or something
Archived author: vblanco • Posted: 2022-06-20T18:28:57.578000+00:00
Original source
1 32 bit integer gives you 32 yes/no flag options