ID:152801
 
It has come to my attention that dream_maker understands hexadecimal numbers...
eg.
world/New()
world.log<<0xA00 //outputs 2560

Could this mean an all new high for game efficiency?






Blu Itanium
I'm not too familiar with hexadecimals, but how would it potentially improve game efficiency?
In response to Mecha Destroyer JD
What are hexadecimals?
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
In response to Popisfizzy
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
In response to Hiead
Um, hexadecimals don't always mean a colour code. It's just another way of counting.

~~> Dragon Lord
In response to Unknown Person
Unknown Person wrote:
Um, hexadecimals don't always mean a colour code. It's just another way of counting.

~~> Dragon Lord

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 flag2 2
#define flag3 4
#define flag4 8
#define flag5 16

#define flag1 0x0001
#define flag2 0x0002
#define flag3 0x0004
#define flag4 0x0008
#define flag5 0x0010


I find the second set of bitflags easier to read at a glance than the first set.
In response to Jon88
BYOND needs to read binary. Then those flags can be:

#define flag1 b0001
#define flag2 b0010
#define flag3 b0011
#define flag4 b0100
#define flag5 b0101


And so on.
In response to Jp
Jp wrote:
BYOND needs to read binary. Then those flags can be:

> #define flag1 b0001
> #define flag2 b0010
> #define flag3 b0011
> #define flag4 b0100
> #define flag5 b0101
>


Nothing "needs" to read binary; very few languages do. Hexadecimal is easier to work with.

Lummox JR
In response to Jp
Jp wrote:
BYOND needs to read binary. Then those flags can be:

> #define flag1 b0001
> #define flag2 b0010
> #define flag3 b0011
> #define flag4 b0100
> #define flag5 b0101
>

And so on.

More like this:
#define flag1 00001b
#define flag2 00010b
#define flag3 00100b
#define flag4 01000b
#define flag5 10000b

(The entire POINT of bit-flags is they each correspond to a single bit set to one)