In response to Bravo1
Your plasma laser looks op.
In response to Kozuma3
Kozuma3 wrote:
Blunt weapons such as bats can break bones hindering movement and/or resulting in death.
Slashing/Stabbing Weapons such as knives or machetes have a chance of making the target bleed.
And if you bleed out you die, of course.

..did I mention perma death?


Hyped the most over this, tbh.
slashing someone with a knife has a chance to make someone bleed - game logic
slashing someone with a knife makes someone bleed - real life logic.
In response to Ghost of ET
Ghost of ET wrote:
slashing someone with a knife has a chance to make someone bleed - game logic
slashing someone with a knife makes someone bleed - real life logic.

Attempting to slash someone with a knife has a chance to make someone bleed. You can be within stabbing distance of someone and still completely miss a good 60% of the time depending on how agile or aware your target is.

That's why we add stealth bonuses to stabbing games, duh. hintity hint hint
Aww, it seems no one is hyping over my super awesome BigInt library that no one will use except if and when I use it to implement some PRNGs or encryption algorithms.

Maybe if I post some code of the bitwise magic inside? This is from the addition method.
for(var/i = 1, i <= JLength, i ++)
var
IntBlock = (
(type_flag == 3) ? 0 : (
(type_flag == 1) ? Int._GetBlock(i) : (
i <= IntLength ? (Int[IntLength - i + 1] || 0) : 0
)
)
)
JBlock = J._GetBlock(i)

B1 = (JBlock & 0x00FF) + (IntBlock & 0x00FF) + (Carry & 0x00FF)
B2 = ((JBlock & 0xFF00) >> 8) + ((IntBlock & 0xFF00) >> 8) + ((B1 & 0xFF00) >> 8) + ((Carry & 0xFF00) >> 8)

Carry = (B2 & 0xFF00) >> 8
J._SetBlock(i, (B1 & 0x00FF) | ((B2 & 0x00FF) << 8))

And this is from the multiplication method.
for(var/i = 1, i <= IntLength, i ++)
var
IntBlock = (type_flag == 1) ? Int._GetBlock(i) : (
(type_flag == 2) ? Int[i] : (
(type_flag == 3) ? Int : 0
)
)

// Nibbles of Int.
s = (IntBlock & 0xF000) >> 12
t = (IntBlock & 0x0F00) >> 8
u = (IntBlock & 0x00F0) >> 4
v = IntBlock & 0x000F

for(var/j = 1, j <= Length, j ++)
var
Block = _GetBlock(j)

// Nibbles of Block.
w = (Block & 0xF000) >> 12
x = (Block & 0x0F00) >> 8
y = (Block & 0x00F0) >> 4
z = Block & 0x000F
// Following are always true:
ch0 = v*z // ch0 & 0xFF00 = 0
ch4 = u*z + v*y // ch4 & 0xF000 = 0
ch8 = t*z + u*y + v*x // ch8 & 0xF000 = 0
ch12 = s*z + t*y + u*x + v*w // ch12 & 0xF000 = 0
ch16 = s*y + t*x + u*w // ch16 & 0xF000 = 0
ch20 = s*x + t*w // ch20 & 0xF000 = 0
ch24 = s*w // ch24 & 0xFF00 = 0

// Block i+1 Block i
Grp1 = ch0 + ( ch4 << 4) // Max: | 0001 1101 0000 0001
Grp2 = ch8 + (ch12 << 4) // Max: 0011 1010 | 1110 0011
Grp3 = ch16 + (ch20 << 4) // Max: 0001 1110 1100 0011 |
// Grp4 = ch24 Max: 1110 0001 |

if(Grp1)
J._AddAtBlock(Grp1, j+i-1)
if(Grp2 & 0x00FF)
J._AddAtBlock(Grp2 << 8, j+i-1)

if(Grp2 & 0xFF00)
J._AddAtBlock(Grp2 >> 8, j+i)
if(Grp3)
J._AddAtBlock(Grp3, j+i)
if(ch24)
J._AddAtBlock(ch24 << 8, j+i)
Man, I need to get better at programming. I:
Dear robotic lord, help!

In response to Kumorii
Kumorii wrote:
Man, I need to get better at programming. I:

I'm an okay programmer, but I'm cheating because I'm pretty decent at math. All I'm really doing is using algebraic identities together with some understanding of how bitwise operators work.

For example, if you want a hint about how the multiplication method works, keep in mind that (using the above notation), I can write IntBlock = 212s + 28t + 24u + 20v and Block = 212w + 28x + 24y + 20z. Now imagine what happens if you expand IntBlock×Block and group them according to common factors of 2n.

Honestly, I have probably not gotten a whole lot better at programming since I originally left BYOND a few years, as I rarely do much programming anymore except in Javascript or Mathematica to help me with my math research. The real difference is that I've learned a lot about math in that time.
In response to Bravo1
This. This is hype. This is good. Keep it up!
@Popisfizzy, I've been observing- I'm actually terrible at math and don't understand what's going on under the hood.

I'm under the assumption that this lib of yours will allow us to use extremely big integers without losing accuracy like BYOND does.
In response to Lavenblade
Lavenblade wrote:
I'm under the assumption that this lib of yours will allow us to use extremely big integers without losing accuracy like BYOND does.

Exactly. What I'm currently making is an arbitrary-precision integer class, which will expand to be as large as necessary. Hence why I can compute something like 300!, which as 615 decimal digits and takes 215 bytes to store in memory. something far beyond BYOND's native capabilities. The only actual limit on the numbers is memory, though there is of course the practical question of how much processing power you're willing to let it use. Bigger numbers require more memory and processor cycles to deal with.

The good news is, it is both faster than the currently-available libraries and more memory efficient. Asielen's RealBignum library requires a list of 615 elements to store 300!, while Hobnob's Bignum library requires a string of 615 characters. My library requires a list of 127 elements.

I also plan on including fixed-precision integers that are still larger than what BYOND can handle, and will be faster to use since I can unwrap any loops involved (probably double, triple, and quadruple length integers, and unsigned variants), with the caveat that they could roll over.

As I said, I don't expect a whole lot of people will need them directly, except maybe for a double-precision integer which could certainly be useful. The thing is, I do plan on extending the utility of the library in two different manners:
  • Writing a random number generator library which would make use of the larger numbers. This would have a bonus over the built-in PRNG in that you can have multiple ones running at different times with different seeds.
  • A cryptographic library with at least the RSA algorithm. I implemented RSA last semester for fun, in JAvascript, after we proved the RSA lemma in my discrete math class, so I have some experience with it at least. Possibly others.
  • An extension to the library allowing for larger floating-point arithmetic.
  • An extension to the library allowing for arbitrary precision rational numbers (numbers of the form a/b where a, b are integers and b != 0).


I also plan on making a Math library, which would probably be done before any sort of BigFloat and BigRational library, and be extended to play nice with them. Of course, this is all a lot of work so it would be over a long period of time.
In response to Popisfizzy
I may not be very immersed in the whole thing, but I really like how you're extending things past BYOND's limits, and I could certainly see uses for the random number generator one.

The others will probably be more rare to use, but I'm sure some people will be in need.
In response to Toddab503
I don't think you get just how important this is. We'll soon be able to have power levels like 13467285291949438285481949838245484, which are well beyond what BYOND's numbers can handle.
In response to Toddab503
Toddab503 wrote:
The others will probably be more rare to use, but I'm sure some people will be in need.

Don't forget the dbz fan-games.

EDIT: Kaiochao beat me to the punch.
Yut Put wrote:
Lavenblade wrote:
Toddab503 wrote:
The others will probably be more rare to use, but I'm sure some people will be in need.

Don't forget the dbz fan-games.

EDIT: Kaiochao beat me to the punch.

is it sad that we all think the same thing when we are addressing this particular issue

Well, tbh nothing outside the realms of science and DBZ rips use numbers that massive.
I could use something like that
In response to Kumorii
Well, DBZ games can still do that with already-available libraries and I don't think it would matter much. I doubt there's much utility in them computing large exponents.

Kumorii wrote:
Well, tbh nothing outside the realms of science and DBZ rips use numbers that massive.

It depends on how much you consider it science, but cryptosystems that rely on the assumed difficulty of prime factorization often use prime numbers with hundreds of digits.
In response to Kaiochao
Kaiochao wrote:
I don't think you get just how important this is. We'll soon be able to have power levels like 13467285291949438285481949838245484, which are well beyond what BYOND's numbers can handle.

I believe the max number in BYOND somewhere around 1e+037; even though adding and subtracting anything to and from it isn't all that feasible. Small numbers can't engage in proper math with bigger numbers... it ends up just ignoring it.

That number has 35 characters. Meaning it's something like 1.34e+034. But, I get what you're saying. *laughs for the sake of laughing at the joke*
In response to Xirre
Xirre wrote:
I believe the max number in BYOND somewhere around 1e+037; even though adding and subtracting anything to and from it isn't all that feasible. Small numbers can't engage in proper math with bigger numbers... it ends up just ignoring it.

That number has 35 characters. Meaning it's something like 1.34e+034. But, I get what you're saying. *laughs for the sake of laughing at the joke*

Look back in the thread to get why he's talking about it.
HAHA! I coded you to be able to take damage, but not deal it! GET REKT!

Page: 1 2 3 ... 67 68 69 70 71 ... 349 350 351