[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
BUT FIRST, WE NEED TO TALK ABOUT RNG https://www.youtube.co
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /v/ - Video Games

Thread replies: 21
Thread images: 4
File: clip+(2016-05-16+at+08.14.09).jpg (79 KB, 1280x265) Image search: [Google]
clip+(2016-05-16+at+08.14.09).jpg
79 KB, 1280x265
BUT FIRST, WE NEED TO TALK ABOUT RNG

https://www.youtube.com/watch?v=MiuLeTE2MeQ
>>
The video made me curious to try a random number generator, so I tried making a pattern where if the last two bits of a number are even, all bits are shifted to the right and a 0 is added to the left, and the rightmost bit is cut off, but if odd then a 1 would be added to the left instead.
I got this pattern when I started with 1111:

1111 0111 0011 0001 1000 0100 0010 1001 1100 0110 1011 0101 1010 1101 1110
And then it repeats.
Interestingly, that's all combinations of 4 bits exactly once in a cycle, except for 0.

And the pattern translates to:
15 7 3 1 8 4 2 9 12 6 11 5 10 13 14
>>
>>337863483
Just finished this whole thing, holy shit

All that shit for random coin explosions
>>
File: nnnnngh.png (74 KB, 192x180) Image search: [Google]
nnnnngh.png
74 KB, 192x180
>>337866337
tech is a-mays-eing
>>
>>337864793
Nerd
>>
>>337866337
AND BLINKING
AND MOVEMENT
>>
File: le-funny-maymay.png (192 KB, 640x528) Image search: [Google]
le-funny-maymay.png
192 KB, 640x528
>>337863483
fixed
>>
File: 1350712709316.jpg (6 KB, 225x252) Image search: [Google]
1350712709316.jpg
6 KB, 225x252
My brain hurts.
>>
I made my own random number generator from scratch in assembly. Made it into a dynamic link library with it's own unique calling convention so silly high level languages can never use it.
>>
>>337864793
The easiest random number generator to understand (that I've found) goes like this:

- take a seed byte, can usually be found by reading a byte of uninitialized RAM at startup if available, just make sure it's not 0
- When the RNG function is called, take the seed number and bit shift in some direction, then XOR by something like $B9
- store this new number to be used in the future

Problem is it loops, so it can be made more random, like by adding the X position of the character to the number.
>>
>>337867393
I don't get it.
>>
>>337867938
Want to know how I know you're a bad programmer?
>>
>>337868043
Well, that's your loss
>>
>>337867393
I've been here way too long
>>
>>337868217
ok, whatever.
*cringe*
>>
>>337867393

Oh God Dammit. Even has the bonus of playing off the PU nonsense from the a presses shit.
>>
>>337867393
>BU not in the variable

ya dun goofd
>>
>>337867393
I'M COMMENTING TO INDICATE I GET THIS

US CHANNERS RITE? XD
>>
>>337863483
>>337867393
>AND result by $0001
>if result is 0, turn left
>if result is 1, turn right
Jesus, is this really that difficult to understand?
>>
>>337868162
Want to know how you're a no fun allowed programmer? I don't give a fuck it was written for myself, not whiny autistic people on /v/.
>>
>>337868418
>*cringe*
OH FUCK THAT WAS EVEN MORE CRINGY NIGGA WHY.
Thread replies: 21
Thread images: 4

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.