eg.
world/New()
world.log<<0xA00 //outputs 2560
Could this mean an all new high for game efficiency?
Blu Itanium
ID:152801
![]() Oct 4 2005, 9:47 am
|
|
It has come to my attention that dream_maker understands hexadecimal numbers...
eg. world/New() Could this mean an all new high for game efficiency? Blu Itanium |
![]() Oct 4 2005, 10:52 am
|
|
I'm not too familiar with hexadecimals, but how would it potentially improve game efficiency?
|
maybe for handling really large numbers... however I can't name a game that might handle such large numbers where performance could be increased by changing it to hexadecimal
|
Popisfizzy wrote:
What are hexadecimals? XD Hexadecimal is base-16 math. It has 3 base-16 numbers each taking 2 digits; the first number for red, the second for green, the third for blue. I don't want to explain what base 16 is, so pick up a book or look it up. #FF00FF # - Hexadecimal identifier FF - 255 red 00 - 0 green FF - 255 blue That's a simple breakdown. In BYOND, rgb(255,0,255) would return that hexadecimal string. Hiead |
Um, hexadecimals don't always mean a colour code. It's just another way of counting.
~~> Dragon Lord |
Unknown Person wrote:
Um, hexadecimals don't always mean a colour code. It's just another way of counting. Well, I never said that is was only for color code. And I DID say it's base-16 math. It's just that the following sentence jumped straight into the color code interpretation. XD Hiead |
Itanium wrote:
Could this mean an all new high for game efficiency? Nope. Just another way of representing the same number. An example of where it is useful is with bitflags. #define flag1 1 #define flag1 0x0001 I find the second set of bitflags easier to read at a glance than the first set. |
BYOND needs to read binary. Then those flags can be:
#define flag1 b0001 And so on. |
Jp wrote:
BYOND needs to read binary. Then those flags can be: > #define flag1 b0001 Nothing "needs" to read binary; very few languages do. Hexadecimal is easier to work with. Lummox JR |
Jp wrote:
BYOND needs to read binary. Then those flags can be: > #define flag1 b0001 And so on. More like this: #define flag1 00001b (The entire POINT of bit-flags is they each correspond to a single bit set to one) |