r/C_Programming • u/SUUUUUUUNNNNNNNN • Jul 07 '26
Project corbit - My first c project
Corbit is a TUI simulation of robits made in about a week. I was inspired by solcl, and i decided to make one with even more customization.
The project is still unfinished and i plan to add more features such as real time and a screensaver mode. I'm also not happy with the looks of it as of right now and I'll be working on improving them.
Looking forward to getting some feedback :D
12
Upvotes
•
u/AutoModerator Jul 07 '26
Hi /u/SUUUUUUUNNNNNNNN,
Your submission in r/C_Programming was filtered because it links to a git project.
You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.
While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
4
u/skeeto Jul 07 '26
Looks neat! Though it crashed on me immediately because the parser assumes the configuration is null terminated. I'm surprised your ASan doesn't catch it:
Though even with that fixed it's still nasty quadratic time parsing:
Recommendation: drop null termination and track the buffer size throughout all parsing instead.
2
u/mykesx Jul 07 '26
Not related to C or your code. My advice is to use feature branches and the issue boards.
2
u/mivanchev Jul 08 '26 edited Jul 08 '26
The code is not bad at all and properly sanitized! You could add fortification and a stack checker to that for extra security :) Otherwise I'd use type interference because you declare/initialize a lot and it's not necessary to specify all those types.
This removes the burden of matching types in many places in the program.
You pass a lot by value but it's not really necessary, use a
const Camera cam[static 1],const Point center[static 1].Your
RenderScenefunction has a memory leak. Funny that the sanitizer is missing that.depthBufis never freed.1
u/Key_River7180 Jul 07 '26
cool!
0
u/yug_jain29 Jul 08 '26
totally a beginner in c can u tell me what is it related to?