Impractical Random Number Generators | Useless Game Dev

  Рет қаралды 9,039

Useless Game Dev

Useless Game Dev

Күн бұрын

Computers are bad random number generation. I want to help. Let's build a few way to extract entropy from the environment and start generating some numbers. Will it be a Tamagotchi colony? A Twitter spam bot? A dice shuffling robot? Or all of the above?
Shamelessly yonk-and-twist'd from suckerpinch's brilliant "Harder Drives" video • Harder Drive: Hard dri...
Watch me struggle to cook every recipe from Stardew Valley in real life here • Recreating EVERY recip...
More reading/watching on this subject:
- Source code for Doom's RNG github.com/id-Software/DOOM/b...
- xkcd's Tamagotchi Hive xkcd.com/1546/
- More xkcd on RNG xkcd.com/221/
- Hardware RNG en.wikipedia.org/wiki/Hardwar...
Chapters:
00:00 Intro
00:52 Tamagotchi
05:19 Twitter spam bot
06:13 Dice Shuffling machine thing
09:05 Outro
Music:
"Wholesome" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons.org/licenses/b...
"Wallpaper" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons.org/licenses/b...
A002 by Monroeville Music Center
Support the channel on Patreon to get extra content, and access to the source code of all projects!
/ uselessgamedev
Follow me on Twitter, not that I tweet that often: / uselessgamedev
Kappa Avatar art by Boskoop / ed.boskoop
And as always, have a good one!
#Unity #GameDev #IndieDev #devlog #tamagotchi

Пікірлер: 71
@GreenMonkeySam
@GreenMonkeySam 2 ай бұрын
Tamagotchi: "What's my purpose?" UGD: "You generate pseudo-random numbers" Tamagotchi: "Oh my god"
@dorkyface
@dorkyface 2 ай бұрын
One of my favorite cyber security things I watched a video on ages ago had a camera pointed at a wall of lava lamps. Convert the pixels of the current image to a string of numbers and bam- non deterministic random numbers :D
@dinhero21
@dinhero21 2 ай бұрын
I belive cloudflare does that
@redo1122
@redo1122 2 ай бұрын
yep, they use that for certificates
@alexanderrosulek159
@alexanderrosulek159 2 ай бұрын
I feel like now a days with physics ai someone could actually figure it out, definitely would need the lamp tho cuz they vary slightly and that ends up in in big changes
@redo1122
@redo1122 2 ай бұрын
@@alexanderrosulek159 you cannot predict perfect frames, simply because of the amount of factors that go into a single picture made by a camera. you could maybe estimate the flow of the lava lamps, but the individual pixels could never be the same.
@alexanderrosulek159
@alexanderrosulek159 2 ай бұрын
@@redo1122 ahh your right I see but if it was a true real lava physics simulator surely they could just use that pixeled data with an offet in a function till it finds one which flows the same as well, all hypothetical of course it would be very very hard and computational intensive running a real true physics for each instance in the offset data to find the true flow from the initial state
@mikoajstruzykowski9399
@mikoajstruzykowski9399 2 ай бұрын
My favourite way of getting random number in C is accesing memory that I didn't allocate, casting that to int value and useing modulo range+1
@onetoomany671
@onetoomany671 2 ай бұрын
Thanks, I hate it.
@icoudntfindaname
@icoudntfindaname 21 күн бұрын
Random number generator with a chance of segfault
@PaulFisher
@PaulFisher 2 ай бұрын
it’s ingenious how you used Cute Cat Creature Pals to generate a Useless Source of Statistical Randomness
@uselessgamedev
@uselessgamedev 2 ай бұрын
Nice
@Wolforce
@Wolforce 2 ай бұрын
No antenna to catch cosmic background radiation?
@uselessgamedev
@uselessgamedev 2 ай бұрын
Brownian noise detector would have been pretty sick
@VJK102
@VJK102 2 ай бұрын
An analog radio/tv antenna getting static and a dac would ve an interesting one indeed
@mkks4559
@mkks4559 2 ай бұрын
5:20 If the video gets removed for some reason, we'll know that's actually what they do to generate random numbers.
@forbiddengod1
@forbiddengod1 2 ай бұрын
Ok, usually the videos here do not deserve the channel name, with being actually pretty useful in understanding how things work and all. But this one perfectly fits the channel name :) Do not get me wrong, it is super fun, just different from what I expected.
@NoseborN
@NoseborN 2 ай бұрын
That's a nice idea for a project, coming with the most impractical random number generator.
@PopeGoliath
@PopeGoliath 2 ай бұрын
Reserve a bit in memory. Set it to zero. Continuously read from this bit, counting clock cycles. Wait until a gamma ray flips the bit. Use the parity of the recorded wait time to generate a random 1 or a 0. Repeat until your have enough random bits to create the int or float you need.
@TobiasSample
@TobiasSample 2 ай бұрын
There’s a video by sucker pinch that explains how to make utterly terrible, amazing storage drives lol kzbin.info/www/bejne/gJSthIpth9Wln9Esi=zGMoCvzZhwNWKtC0
@Mr.MasterOfTheMonsters
@Mr.MasterOfTheMonsters 2 ай бұрын
Build a neutrino detector and use the time and coordinates of each detection.
@InfiniteCoder01
@InfiniteCoder01 2 ай бұрын
Did we just get a 3d printing and engineering content on this channel?
@uselessgamedev
@uselessgamedev 2 ай бұрын
Anything can happen as long as it's unexpected. I'm the Cerveza Cristal of game dev
@sky01james28
@sky01james28 2 ай бұрын
Who here remembers Trouble? It’s a board game similar to Sorry with a popping dice contraption in the middle
@nati0598
@nati0598 2 ай бұрын
I think that both the die bot and twitter bot can be improved by performing their action before the game asks for the state. Of course, that would make the result visible before it is used, but the strangers on the internet will definitely help you hide it when you need it most.
@His-Games
@His-Games 2 ай бұрын
This is too good. The enslavement was my favourite part, closely followed by unexpectedly becoming an engineering video
@sempersolus5511
@sempersolus5511 2 ай бұрын
This is the first _actually_ useless game dev video I've seen on this channel. I still learned plenty tho
@jivejunior8753
@jivejunior8753 2 ай бұрын
You can make these practical by having the "impractical" number generators maintain a queue of, say, 6 random numbers. Then you don't have to wait for them! That was the only impractical feature of these generators, right?
@0hellow797
@0hellow797 2 ай бұрын
When working on microcontroller arduino projects, generally a pin that isn’t grounded can give good random number entropy,
@someidiot6359
@someidiot6359 2 ай бұрын
Immediately one of my favorite videos on this channel
@akshatmishra5527
@akshatmishra5527 2 ай бұрын
Lets use lava lamps
@richbuilds_com
@richbuilds_com 2 ай бұрын
This was a lot of fun to watch. Good stuff!
@Troyseph
@Troyseph 2 ай бұрын
Can you do a video on the quality of the random numbers generated by the tamagochis?
@uselessgamedev
@uselessgamedev 2 ай бұрын
Someone suggested this in the discord but tbh I wouldn't know how to evaluate that (and I'm not too keen on spending time learning this haha)
@Troyseph
@Troyseph 2 ай бұрын
@@uselessgamedev I believe as a rough gauge you can use the numbers generated to create an image, and you can visually see the "quality" in the patterns that appear (when there shouldn't be any)
@a52productions
@a52productions Ай бұрын
A simple but important test is to check whether the results mod N are evenly distributed for various N (ie, there are about as many evens as odd, about as many numbers that are 1 mod 3 as 2 or 0 mod 3, etc.) This isnt an exhaustive test by any means, but it's a good starting point as the bare minimum. A lot of applications depend on having numbers evenly distributed mod some other number. For further tests, there's the Diehard and BigCrush suites. These are preimplemented suites of tests to evaluate PRNGs based on the statistical processes of random sequences. You could just run those suites, or pick out some of the easier tests to run yourself.
@AntonCastro44
@AntonCastro44 2 ай бұрын
"Cute Cat Creature Pals, or CCCP for short", I see what you did there...
@PeachCrusher69
@PeachCrusher69 2 ай бұрын
??
@behnamsaeedi
@behnamsaeedi 2 ай бұрын
Love the video, I do recommend increasing the output volume. difficult to hear the audio.
@uselessgamedev
@uselessgamedev 2 ай бұрын
Thanks I'll keep that in mind!
@neorack
@neorack 2 ай бұрын
Hehehe I recognize that music. I wonder if you played Akaburs work. heheheh ^^
@rikarddotzler8424
@rikarddotzler8424 2 ай бұрын
Do more videos of more random number ideas!!
@PaigeVG1995
@PaigeVG1995 Ай бұрын
Hey, you just started showing up in my feed and I've found your videos very interesting and useful. It's good stuff! 👍Which, is why your name rubs me the wrong way... Useless game dev? 🤔 I don't think what we're doing here is useless, why do you?
@Polychronius
@Polychronius 2 ай бұрын
Well, someone has to drop the Von Neumann quote... 🙃"Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin."
@ArthurWolf
@ArthurWolf 2 ай бұрын
Imagine being so impatient you post your April's fools video 10 days in before April 1st....
@NirielWinx
@NirielWinx 2 ай бұрын
Wow. The Doom RNG is pretty much XKCD 221. Also, a few years ago, my gf and I cooked a bunch of dishes from Skyrim for a week. That was fun.
@uselessgamedev
@uselessgamedev 2 ай бұрын
Yeah, guaranteed random
@NirielWinx
@NirielWinx 2 ай бұрын
​@@uselessgamedev> But on a serious note, it's not stupid. True randomness doesn't feel random to people. Look at the number of people who get infuriated when their XCom soldier misses three times in a row, while the enemy gets three critical hits. So, a way to alleviate that is to use a bag. Put all your numbers in it, and pull one at a time, don't put them back in the bag. When it's empty, refill it. You end up with a much more homogeneous distribution with fewer clusters. If you pull a lot of bad numbers, the bag will have only good numbers in it so you are guaranteed to draw good numbers now. It's not true randomness, but it feels more random/fair to silly humans who don't understand stats. Or you can go the Final Fantasy way, and just lie. People think 80% chance of hitting means "pretty much always", so the game writes 80% on the UI, but internally it's like 95%. But because some games use the bag method, or just lie, when players encounter an honest game, they complain about the RNG. Anyway, look at that old Tom Scott video entitled "The Lava Lamps That Help Keep The Internet Secure". It's a very cute implementation and quite similar to your tamagochis.
@kio2811
@kio2811 2 ай бұрын
Feels like when you type a random Minecraft seed
@TankorSmash
@TankorSmash 2 ай бұрын
I appreciate you blurring out your username in the terminal but leaving it visible in the window title
@uselessgamedev
@uselessgamedev 2 ай бұрын
Ah rookie mistake
@TankorSmash
@TankorSmash 2 ай бұрын
I think we've all been there!@@uselessgamedev
@ScriptCoded
@ScriptCoded 2 ай бұрын
​@@TankorSmash I for one have not had any reason to have that issue 😅
@TankorSmash
@TankorSmash 2 ай бұрын
Screencasting is a risky sport!@@ScriptCoded
@ariorick
@ariorick 2 ай бұрын
- Show me your idea - Well look, you move on arrows and jump on... - Sorry I meant Id
@ariorick
@ariorick 2 ай бұрын
Sorry I'm high so no judgment
@aidanmason3493
@aidanmason3493 2 ай бұрын
nice
@RasmusKristofferPedersen
@RasmusKristofferPedersen 2 ай бұрын
The dice'o'matic used by gamesbyemail might interest you: kzbin.info/www/bejne/bZ-bfYGufMeNmNU Huge machine rolling loads of dice, in order to have real dice-results for use in online boardgames!
@mr.fraiche8635
@mr.fraiche8635 2 ай бұрын
Idk why you didn’t just use a funnel and escalator like system
@uselessgamedev
@uselessgamedev 2 ай бұрын
Yes that was one of the "easy" methods (could also have mounted the whole box on a motor and rotated that) but I tried to go for "spectacle". Should probably have stuck with something that was guaranteed to work
@mr.fraiche8635
@mr.fraiche8635 2 ай бұрын
@@uselessgamedev a very entertaining “spectacle”, I love your videos and hope you keep doing interesting things like this
@LeonardoTx1000
@LeonardoTx1000 2 ай бұрын
Volume is very low :(
@redo1122
@redo1122 2 ай бұрын
your video is kinda similar to a video called harder drives. At least the idea is
@uselessgamedev
@uselessgamedev 2 ай бұрын
Definitely! As stated in the description
@heavygaming6596
@heavygaming6596 2 ай бұрын
algorithm
@cool.guy.
@cool.guy. 2 ай бұрын
it's X now :)
@JanTuts
@JanTuts 2 ай бұрын
1:26 OUR virtual pet
Scene Management in Unity | Code Review
10:16
Useless Game Dev
Рет қаралды 4,8 М.
How to install VMware ESXi 6
10:27
Basic Technology
Рет қаралды
UFC 302 : Махачев VS Порье
02:54
Setanta Sports UFC
Рет қаралды 1,4 МЛН
Эффект Карбонаро и бесконечное пиво
01:00
История одного вокалиста
Рет қаралды 6 МЛН
When Steve And His Dog Don'T Give Away To Each Other 😂️
00:21
BigSchool
Рет қаралды 16 МЛН
Is it Cake or Fake ? 🍰
00:53
A4
Рет қаралды 16 МЛН
Cheating at Countdown | Game Dev's Revenge
9:45
Useless Game Dev
Рет қаралды 21 М.
A Weird VR Musical Instrument | Useless Game Dev
8:43
Useless Game Dev
Рет қаралды 16 М.
MUST KNOW bashrc customizations to boost productivity in Linux
13:38
Moebius-style 3D Rendering | Useless Game Dev
8:12
Useless Game Dev
Рет қаралды 800 М.
NaN Gates and Flip FLOPS
19:08
suckerpinch
Рет қаралды 274 М.
Just Boids | Useless Game Dev
12:10
Useless Game Dev
Рет қаралды 56 М.
Mechanically Challenged - Portals in Unity
b3agz
Рет қаралды 1
I tried to break a World Record and failed miserably | Useless Game Dev
11:21
Озвучка @patrickzeinali  Тюремная еда  Часть 2 @ChefRush
0:52
BigXep. Канал озвучки
Рет қаралды 2,8 МЛН
Based on true events! 😂 #shorts #family #funny y
0:14
Krys & Kareem FAM
Рет қаралды 58 МЛН
Все забыли о его дне рождения 😢
0:19
Фильмы I Сериалы
Рет қаралды 1,5 МЛН
the staff wheeled me out of the store in a cart 🙀🦄💩✨🥴
0:11
iPolina Queen of the Cringe 👑
Рет қаралды 5 МЛН
Based on true events! 😂 #shorts #family #funny y
0:14
Krys & Kareem FAM
Рет қаралды 58 МЛН
ПРОВЕРИЛ НА ПРОЧНОСТЬ (@novayaeracom - Instagram)
0:16