Rewriting Raylib in JavaScript

  Рет қаралды 25,792

Tsoding Daily

Tsoding Daily

3 ай бұрын

Previous Episodes: • Raylib.js
References:
- Tsoding - raylib.js - github.com/tsoding/raylib.js
- surma.dev/things/c-to-webasse...
- github.com/quick-lint/quick-l...

Пікірлер: 81
@blackhaze3856
@blackhaze3856 3 ай бұрын
Next project: Use raylib with React.
@soniablanche5672
@soniablanche5672 3 ай бұрын
next project: rewrite raylib.js in React
@null-calx
@null-calx 3 ай бұрын
wait until he rewrites React in raylib
@exosdel
@exosdel 3 ай бұрын
Raylib with scratch
@kaiserzico
@kaiserzico 3 ай бұрын
rewrite in rust
@marciocarvalho5849
@marciocarvalho5849 3 ай бұрын
man, your videos give me hope that being a dev/swe can be fun in spite of all the work bs, thanks from brasil
@NoBrainCode
@NoBrainCode 3 ай бұрын
very big thanks from brazil, no matter what language or project i am always excited to see what he is programming
@prof.dr.davidbuzatto
@prof.dr.davidbuzatto 3 ай бұрын
Totally agree! Take a look in my channel, I'm doing some recreational programming too.
@unknown_error101
@unknown_error101 3 ай бұрын
"And unfortunately, I do care" felt
@dickpiano1802
@dickpiano1802 3 ай бұрын
This is quickly becoming the best channel on KZbin
@sanjaux
@sanjaux 3 ай бұрын
Always been
@mycode0
@mycode0 3 ай бұрын
Always has been
@PeterJepson123
@PeterJepson123 3 ай бұрын
Loved the intro about simplicity and completely agree. Simplicity is way more interesting than complexity. Even complicated systems should be built from simple components.
@satchelfrost6531
@satchelfrost6531 3 ай бұрын
A while back I had wanted to try out raylib and nob to make a point cloud renderer. I actually made my nob.c file support web via emscripten. I was thinking maybe I should make a pull request for musializer to do the same, now I'm glad I didn't do that. On a separate note, I've been working on a project which uses nob, and sort of copies the raylib API, but instead uses Vulkan as a backend. It's been a fun experiment, but I'm not sure how far it will go. Anyway, thanks for all you do, you are an inspiration.
@janhorak5363
@janhorak5363 3 ай бұрын
I really love watching this. I love the way you think about problems and explain it out loud..
@kaltwarraith5172
@kaltwarraith5172 3 ай бұрын
Your reaction to the tbl import is exactly my reaction to a lot of modern design choices
@blastygamez
@blastygamez 3 ай бұрын
Idk but ur videos are always so great!! The stuff u do is amazing and we should be thankful 👍
@mattshu
@mattshu 3 ай бұрын
11:23 perfect curb your trombone ever
@Mozartenhimer
@Mozartenhimer 3 ай бұрын
These streams got me to try out Raylib now I ❤ Raylib.
@christianbouwense4702
@christianbouwense4702 3 ай бұрын
Same, Raylib is easily the best tech I've ever used, so glad I found it
@delusionalaar4031
@delusionalaar4031 3 ай бұрын
Love your videos so much. They remind me swe can be fun. Just wish I could watch more.
@XORfun
@XORfun 3 ай бұрын
Omg thank you for this work!
@1Thor61storm8
@1Thor61storm8 3 ай бұрын
About simplicity and using libraries, I would add this to the discussion: I think is not only about going to market faster, it is also a way of externalising the cost of maintaining a production ready piece of code. This allows companies to be lighter, improving margins.
@user-qu7nq3uo3w
@user-qu7nq3uo3w 3 ай бұрын
you fixed lua, now you fixed raylib
@labsendeyshent
@labsendeyshent 3 ай бұрын
And now he will fix Go
@glowiak3430
@glowiak3430 3 ай бұрын
Will you check out Beef? It's like Java or C#, but with manual memory management, and compiled. And it has a raylib binding.
@oumardicko5593
@oumardicko5593 3 ай бұрын
the more i watch your videos the more i feel stupid xD. keep the good work
@valcron-1000
@valcron-1000 3 ай бұрын
The font rendering will not look the same by default due to the usage of AA. I think you can fix it with a mix of CSS + textRendering = "geometricPrecision"
@MikAlexander
@MikAlexander 3 ай бұрын
DO IT. We were discussing raylib js performance earlier today on discord.
@lolcat69
@lolcat69 3 ай бұрын
I wasted to make a web lang for a long time, should I make a compiler for one of my programming languages to Wasm? I already tried compiling my Brainfuck VM to wasm and it was really simple to implement, so I might check that :)
@bladman9700
@bladman9700 3 ай бұрын
next rewrite linux kernel in JS
@alurma
@alurma 3 ай бұрын
Google Linux JS
@liketheninja8658
@liketheninja8658 3 ай бұрын
@@alurma Holy emulator
@11WicToR11
@11WicToR11 3 ай бұрын
is there some other way to implement graphics in browser? Maybe some gpu ? Is anything else possible? Maybe you could write less js and more shaders or sth like that
@christianbouwense4702
@christianbouwense4702 3 ай бұрын
Yeah there are a couple APIs (not sure if API is the correct word), WebGL and WebGPU come to mind. They can be used directly, or you can use libraries that use them like three.js or babylon.js
@gogo-pj2lm
@gogo-pj2lm 3 ай бұрын
41:39 i think it makes sense to use the visibility attribute feature. Build script can then be modified less frequently, making it more stable and "production-ready" 😂
@testeTestandomuitosTestes
@testeTestandomuitosTestes 3 ай бұрын
I don't know if you read the comments, but it would be possible one day to make a video about Glib who created the GObect library that is used in Gnome. Thank you in advance for your videos, despite having a lot of difficulty following them, I never stop watching them. thanks!!! \o/
@anonymousanon4822
@anonymousanon4822 3 ай бұрын
I love these videos but I have a minor complaint. KZbin seems to compress the hell out of these. More than I notice on any other coding videos. I think it might have to do with how dark it is (which I obviously don't expect you to change). But I heard some time ago that uploading Videos in 4k leads to KZbin using a better compression algorithm for all the versions, so even the 1080p ends up looking a lot better. Just hearsay, maybe shit changed. And also I get if 4k is entirely impractical for you due to file size or whatever. Just some feedback, do with that what you will. I will watch and enjoy anyways :)
@roberthickman4092
@roberthickman4092 3 ай бұрын
Doesn't the C version already support multiple backends? Can't you work with that without reimplementing everything in JS? Identify what parts of the CRT are being used, replace those, and write a backend that targets webgl directly via the FFI.
@dixztube
@dixztube 2 ай бұрын
lol what’s that folder on the bottom
@victordvickie
@victordvickie 3 ай бұрын
Implementing musializer in raylib.js?
@TsodingDaily
@TsodingDaily 3 ай бұрын
I'm actually low key planning it. But I don't know for sure yet. We will see. :)
@sancobtw
@sancobtw 3 ай бұрын
⁠​⁠@@TsodingDailyI believe implementing the music visualization can be easy by just using the WebAudio API and more but I think that you would port Miniaudio for JS to avoid rewriting the audio support for musializer, anyways I would love to see musializer for web, amazing videos man!
@DevlogBill
@DevlogBill 3 ай бұрын
Is the developer experience better with C and Raylib? Or if you choose a programming language like Python with Raylib is the developer experience better? Or worse? I am guessing since Raylib was designed with C. Making games with C and Raylib would be easier compared to making games with Python with Raylib since the library was created with C? When making 2D games with either C or Python is the experience the same? Or are there challenges when using a different programming language?
@edhahaz
@edhahaz 3 ай бұрын
How does emscripten even work ?
@TsodingDaily
@TsodingDaily 3 ай бұрын
I have no idea!
@edhahaz
@edhahaz 3 ай бұрын
What about performance, surely the browser isn't performant enough with just using the canvas API to port raylib.
@TsodingDaily
@TsodingDaily 3 ай бұрын
From my personal experience Canvas API is pretty fast. I'm pretty sure browsers use hardware acceleration to implement it. Here is my Game implemented entirely using Canvas API tsoding.github.io/snake-c-wasm/
@reidond
@reidond 3 ай бұрын
it directly uses your gpu api with common gl-like api
@Alguem387
@Alguem387 3 ай бұрын
what is the sound name wen he goes: turum turum turum turum plimb?
@abdelhakimakodadi3073
@abdelhakimakodadi3073 3 ай бұрын
"Why is it important to be able to modify your dependency? Because you're taking control of them" I agree with that but only in the context of open source. In an enterprise context that doesn't translate very well. Because the dependencies are constantly changing (bug fixes, security patches...), and if you do even the slightest modification to a dependency now you have to become a maintainer of a fork of the dependency. Which is not scalable when you have tons of dependencies.
@RicardoValero95
@RicardoValero95 3 ай бұрын
Tsoding strager crossover 51:00
@yehbruh667
@yehbruh667 3 ай бұрын
theo mentioned, less go
@julienc.8562
@julienc.8562 3 ай бұрын
Didn’t watch, but i already love the title
@regfinley7111
@regfinley7111 3 ай бұрын
@11:15.😆😄🤣
@twenty-fifth420
@twenty-fifth420 3 ай бұрын
My imposter syndrome is tingling rn….. 😂
@sarmadajmal3602
@sarmadajmal3602 3 ай бұрын
Study content: 58.2 GB woa!!!
@dixztube
@dixztube 2 ай бұрын
Lmaoooooooooo
@wasile
@wasile 3 ай бұрын
I wonder why is wasm active by default on all browsers and you don't have any option from settings to disable it, you have to run the browser with a parameter to disable it. Let's say Chromium is open source, but Chrome, Firefox and Edge are released by big corporations. For me, it looks like a security issue made on purpose, like the DNS standard let's say.
@anon_y_mousse
@anon_y_mousse 3 ай бұрын
Firefox is open source, and you can configure it to not use wasm from the about:config page.
@Tigregalis
@Tigregalis 3 ай бұрын
wasm is sandboxed and so it's more secure, though? i must not be understanding your angle, what do you mean?
@wasile
@wasile 3 ай бұрын
@@anon_y_mousse ok. Maybe firefox has this option, but edge or chrome doesn't. I'll search the flag in ff.
@wasile
@wasile 3 ай бұрын
@@Tigregalis wasm has a long list of vulnerabilities, and the list contains only a part of them, some of them will never be published. PS: there are a lot of sandboxed environments that give access to the host machine because of some intentional "bugs". Even images metadata are not safe when loading into browsers, so why to give acces to a "sandboxed" environment from my machine to a powerfull thing like wasm? We don't need it anyway...
@anon_y_mousse
@anon_y_mousse 3 ай бұрын
@@wasile And here I was thinking you just didn't like the convoluted garbage in wasm. I'll have to look into this for sure, but it annoys me that if I disable it certain sites don't even load. The fact that it uses binary blobs would ordinarily be a selling point for speed's sake, but I don't believe that a slow startup time on a game is a true stumbling block if we have encapsulation of the runtime environment and proper caching. Outside of games, I see no reason to use it, and even then it's a bit tenuous if the VM were done correctly. All goes along with what I've been saying about wiping the web clean and starting from scratch.
@user-fr1no2ir3r
@user-fr1no2ir3r 3 ай бұрын
Rarenpo stack, Raylib + React + Node + Postgres
@angelcaru
@angelcaru 2 ай бұрын
Ravapy: Raylib + vanilla JS + python -m SimpleHTTPServer
@Dimkar3000
@Dimkar3000 3 ай бұрын
maybe it's not pixels. Maybe it's another size unit of css.
@khuntasaurus88
@khuntasaurus88 3 ай бұрын
I thought the title was a shitpost
@colonthree
@colonthree 3 ай бұрын
JS literally never gives up unless it is a syntax error. ;w;
@soniablanche5672
@soniablanche5672 3 ай бұрын
that's because everything in javascript is an object (aka dictionary/hashmap/etc) except null and undefined. Even primitive are objects because they get automatically packed into their object version every time you access a property on them. So the errors are generally accessing a member of undefined or null lol
@jan_in_youtube
@jan_in_youtube 3 ай бұрын
There are things that should never be made. You have ruined my trust in you. XD
@pratikbhujel
@pratikbhujel 3 ай бұрын
Raylib with Livewire and Laravel
@Froggie92
@Froggie92 3 ай бұрын
change your chrome dev tools from hamburger to hotdog
@ancentropia3418
@ancentropia3418 3 ай бұрын
WHY
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 111 М.
Weird Parts of C you probably never heard of...
38:06
Tsoding Daily
Рет қаралды 54 М.
Don't eat centipede 🪱😂
00:19
Nadir Sailov
Рет қаралды 23 МЛН
КАХА и Джин 2
00:36
К-Media
Рет қаралды 3,8 МЛН
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 101 МЛН
AI and Generative AI in Cybersecurity
3:41
Aruna Pattam
Рет қаралды 6
Is this the Future of Programming Languages?
2:53:18
Tsoding Daily
Рет қаралды 61 М.
minetest-rust: First Model (Vulkan Backend)
0:52
Jordan4ibanez
Рет қаралды 2 М.
I fixed Lua
2:16:48
Tsoding Daily
Рет қаралды 43 М.
Zig in Depth: Project Setup
21:47
Dude the Builder
Рет қаралды 4,7 М.
Why do C Programmers Always Obfuscate Their Code?
2:01:57
Tsoding Daily
Рет қаралды 36 М.
How I made a world with trillions of gems in C with Raylib
10:09
Lingon Studios
Рет қаралды 10 М.
Newton's Method in C
1:33:17
Tsoding Daily
Рет қаралды 17 М.
Hot Code Reloading in C
2:16:18
Tsoding Daily
Рет қаралды 59 М.
⌨️ Сколько всего у меня клавиатур? #обзор
0:41
Гранатка — про VR и девайсы
Рет қаралды 647 М.
XL-Power Best For Audio Call 📞 Mobile 📱
0:42
Tech Official
Рет қаралды 771 М.
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 1,9 МЛН