What should I use instead of sf::Clock (it's in the missing system package).
I saw a game made in C# which used dll-imports of QueryPerformanceCounter.
You said that the package is missing, because C# already offers such functionality, so is there a C# clock with the same accuracy as the performancecounter or sf::Clock (which probably also uses the counter)?
And is this the right way to use BitConverter?
int toSerialize1 = 42;
int toSerialize1 = 43;
List<byte> bytes = new List<byte>();
byte[] arr = BitConverter.GetBytes(toSerialize1);
foreach(byte b in arr)
{
list.Add(b);
}
arr = BitConverter.GetBytes(toSerialize2);
foreach(byte b in arr)
{
list.Add(b);
}
byte[] bytesToSend = new byte[list.Count];
//lets pretend we just received that and want to deserialize it
byte[] received = bytesToSend;
int received1 = BitConverter.ToInt32(received, 0);
int received2 = BitConverter.ToInt32(received, 4);