64-bit integer instead of float in multiplayer games is a good idea?

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Onaylı Üye
Katılım
11 Ara 2022
Mesajlar
50
Tepki puanı
3
Ödüller
2
Yaş
26
3 HİZMET YILI
Integers seem to support only 32767.
 
Onaylı Üye
Katılım
27 May 2022
Mesajlar
50
Tepki puanı
4
Yaş
31
4 HİZMET YILI
I was experiencing problems with float in booleans and mathematical events due to the float’s inaccuracy in the engine not reaching integer values, so I changed most of the variables and events to 64 bit integers but now I’m afraid that this can causes a burden on the server when passing the RPC between clients and server. I still haven’t noticed anything different using 64-bit integer instead of float.
I'd use integer instead of a float.
 
Onaylı Üye
Katılım
29 Ara 2022
Mesajlar
54
Tepki puanı
3
Ödüller
2
Yaş
36
3 HİZMET YILI
64 good you can use more ram
 
Wanderlust
Ultra Üye
Katılım
24 Mar 2020
Mesajlar
1,535
Çözümler
2
Tepki puanı
122
Ödüller
9
6 HİZMET YILI
It is generally a good idea to use the smallest data type that can accurately represent the values you are working with. Using larger data types can lead to increased memory usage and potentially slower performance, especially if you are working with a large number of values. In the case of floating-point numbers, it is generally recommended to use the double data type, which is a 64-bit floating-point number, instead of float, which is only 32 bits. This is because double has a higher precision and can represent a wider range of values than float.

In the case of integers, using a 64-bit integer (int64_t) will definitely use more memory than a 32-bit integer (int32_t), but it will also be able to represent a much larger range of values. The actual performance impact will depend on the specific operations you are performing and the hardware you are running on. If you are not seeing any noticeable performance issues, then it is probably not a problem to use 64-bit integers. However, if you are concerned about performance, you may want to consider profiling your code to see if using 64-bit integers is causing any bottlenecks.
 
Ultra Üye
Katılım
4 Ara 2019
Mesajlar
1,515
Çözümler
3
Tepki puanı
82
Ödüller
8
Sosyal
6 HİZMET YILI
I don’t know of any games that are truly infinite (that are not set in space). E.g. Minecraft will in theory generate up to 60 million meters for you, which will take forever to traverse if you tried. It is just safer to put an upper-bound, and it is not a practical limitation.
 
Sssshhhh
Ultra Üye
Katılım
9 Şub 2022
Mesajlar
1,540
Çözümler
1
Tepki puanı
95
Ödüller
3
Yaş
24
4 HİZMET YILI
It's generally a good idea to use the most appropriate data type for the task at hand. In some cases, using 64-bit integers may be more appropriate than using floating point numbers, particularly when working with large integers or when you need a high degree of precision.
One potential downside to using 64-bit integers is that they take up more memory and may require more processing power than smaller data types like 32-bit integers or floats. This could potentially lead to a performance impact, particularly if you are working with large datasets or if you are performing a lot of mathematical operations on the integers.
That being said, the performance impact of using 64-bit integers may not be significant in many cases. In order to determine whether using 64-bit integers is causing any performance issues in your game, you may want to consider profiling your game to identify any bottlenecks or areas for optimization.
 
◘◘◘ Legend ◘◘◘
Ultra Üye
Katılım
9 Nis 2021
Mesajlar
1,505
Tepki puanı
43
Ödüller
4
5 HİZMET YILI
i dont think there is alot of people now using 32 just use the 64 its much better and faster
 
surdo oppedere
Ultra Üye
Katılım
23 Ara 2016
Mesajlar
1,531
Tepki puanı
76
Ödüller
9
Yaş
23
9 HİZMET YILI
using integers is worse than floats when u're doing the calculations cause it'll cut the number
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst