How many buffers should I use?

H

HelmutShaftshwingen

Guest
I just got some LAN working for the first time in one of my games, so now it's time for me to start filling up packets with information about objects in the room.

Now I'm wondering how I should send packets in a resource friendly manner.
I've read that:
-strings should be aligned to 1
-8 bit integers should be aligned to 2
-16 bit integers and floats should be aligned to 4
-32 bit integers and floats should be aligned to 8

so should I make a separate buffer for each data type?
or pick one alignment on one buffer for everything to go into?

if I have multiple instances of an object spawning and despawning,
should I make one buffer that is specifically for that object and the associated data?
 
Top