
Coding a Starfield Animation in C
✘ Get Access to Source Code and Unpublished Videos on Patreon:
https://www.patreon.com/c/HirschDaniel
✘ How I Study:
How I Learned Vim: https://amzn.to/3ONVG5R
How I Learned C Programming: https://amzn.to/41pvkhU
Coding a starfield animation in C using SDL and very little C knowledge. Hope you enjoy it!
Views:1892
Taqs:動画,ビデオ,共有,カメラ付き携帯電話,動画機能付き携帯電話,無料,アップロード,チャンネル,コミュニティ,YouTube,ユーチューブ
コメント
コメント (23)
トラックバックは利用できません。
Boost your creativity, level up your coding, and support my work — all at once.
Get full access to all source code from my videos, plus 🧪 bonus content, on my Patreon:
👉 patreon.com/HirschDaniel
Following your video I got it working with SDL3 and c++ 🙂
So glad to see you have returned ! Hope you’re doing well in your life ! Always amazing videos, I absolutely love it because I can picture myself as you !
The issue you encountered at 1:13:18 is because, in C, compound literals can only be used for initialization during declaration. Using them in an assignment statement will cause an error. (If I remember correctly, this kind of syntax is actually allowed in C++.)
Your solution works just fine, but you already came across a more general approach in your search results—assigning each member individually. In your program, for example, that would look like stars[i].x = x;.
I really enjoy your videos—watching you build a program from start to finish is a pleasure!
next time you can use just
SDL_FillRect(psurface, NULL, COLOR_BLACK);
no need to create another rect, this does that what you want to erase the whole scene
What color theme are you using?
Love your videos so much man keep up the amazing work
I really like watching your thought process in action. It helps me to understand the why and how of getting my own codes to work
Thanks for making these videos.
Why dont use SDL3? It has better documentation and it’s better than SDL2.
Btw i’m gonna try this via SDL3. 😊
this is fascinating to watch, especially since I have no clue what’s going on
hi which distro and desktop env. do you using man?
building random stuff just for the sake of programming. I love it!!
Please do you have courses on udemy ?
Missed it
SDL C IS BACK BABY
Hope to see you do sand simulation next time.
Keep it up G.
sheesh, in years, especailly in era of AI, i’ve not seen anyone cookin code in vim with C and doin all from scratch no AI and making beatutiful animations, love that man, honestly you are cracked programmer of this century, I want to have the code to this repo if possible Thanks
Really love the way you’re thinking, and challenging the tasks. This is so natural and inspiring. Maybe it’s because you’re not trying to pose as superprogrammer, but do it in a simple human friendly way. Thanks 🎉
Let’s gooooooo he did it! 🥳I asked for C last video and you already made one W Video btw I’m gonna make this animation as well, Loved the process so far I’m quarter way done with the video
SDL3 in my opinion has a slightly better API, and it’s a bit easier to setup with CMake than in SDL2. you’re right that its not a big deal though
39:49 “Zed” would be correct since you’re in Europe and most english speakers (including the British) say it that way. U.S. speakers say it like “Zee”
I love your C video its very relaxing to watch with your voice and great personality, pls keep up ! (and finish the login system in python)
I just finished building an encryption method in C using the instructions from your video, crazy coincidence you just dropped a new one! Keep it up, man. I have to get professional with C.
Hi mannn I really missed u. I love ur videos