5 ms·
32/64 bit float is the native float type on the cpu you are running on.. hence you can't really claim "native" support for larger types.. if you mean native in
by irascible 11y ago
32/64 bit float is the native float type on the cpu you are running on.. hence you can't really claim "native" support for larger types.. if you mean native in terms of being able to write a+b for a numeric type, then that eliminates all languages that don't have operator overloading..
- simoncion 11y agoI mean "native" in terms of what's supported by the language itself, out of the box. C and C++ offer -at a minimum- the following numeric types: * signed and unsigned integers in a variety of widths * 32 and 64-bit floating point numbers JavaScript offers: * 64-bit floating point numbers When performing integer math, JavaScript's numeric type is only safe for arithmetic operations between -((2^53)-1) and +((2^53)-1). Now that we have that out of the way, my original question remains unanswered. :)
- ectoplasm 11y agoIn general 54-bit signed ints are enough for games. Floats are more common for math.
- simoncion 11y agoCool. Many contemporary games are multi-threaded out of necessity. How would you deal with JavaScript's single-threaded, single-process model of execution? Experimental features like Web Workers?
- ectoplasm 11y agoNo disagreement on that one! If your application must be multi-threaded, it does make sense to write it in a language with proper multi-threading support.
- simoncion 11y agonod nod I just wish irascible would come back. I was interested in hearing what -from his 25 years of game development experience- makes him feel that "Rewriting any game in javascript is imho a great idea.". I'm obviously missing something, and I was looking for the benefit of his insight.