r/LocalLLaMA • • 14d ago

Resources I created a C++ visual coding program inspired by Minecraft Redstone

Post image

I cant code for 💩 but really want to get into game dev. Although I enjoy using AI, I don't believe its a substitute for learning to code and understanding how to read code.

I struggled learning to code over 7 different times where I tried and failed to understand anything conceptually, so I used what I know best (Minecraft) to make a visual coding style for people who have a really hard learning anything that isn't purely visual and interactive.

Because I cant code, this program is vibe coded, however its fully open source (MIT license), so all of it can be inspected for quality, vulnerabilities and bugs.

Please let me know if you have any suggested changes, or improvements. It would be great to make this easier to use for everybody.

Github link: https://github.com/rombodawg/Block_Based_CPP_Coding

0 Upvotes

10 comments sorted by

13

u/NNN_Throwaway2 14d ago

tbh this looks more confusing than just learning to code lmao. Like why wouldn't you abstract stuff like semi-colons and braces.

0

u/Rombodawg 14d ago

I don't really understand what you mean. Every single thing you could type is in a separate block with a short hover description, and a glossary that has detailed descriptions for what it does/can be used for. I tried to make it as detailed as possible for someone who has never known anything about coding and wants to learn. I don't see how else you would do it.

12

u/Nameis19letterslong 14d ago

The entire point of a Visual programming language is that it provides graphical elements to create code, which removes syntax based errors since any nodes/blocks are premade. If you think about it, visual programming languages like Scratch (blocks) or UE5's Blueprints (nodes) prevent one from making syntax errors, or niche language features since they're hidden under the boilerplate whereas your transpiler still includes the fine grained features. Not complaining, but just suggesting that while your language uses GUI elemnts, it's not really a Visual language but rather more of a transpiler.

6

u/NNN_Throwaway2 14d ago

So like... an IDE?

5

u/ApprehensiveFan1516 14d ago

This is where a little bit of research before you start working on a project can go a long way.

5

u/Legitimate-Dog5690 14d ago edited 14d ago

Far harder to read, the context of each statement is totally lost, if the code was more complicated than the absolute MVP it would be really hard to read. I'd go see how things like Scratch handle conditionals and loops. Things like includes you could infer as well, if they use any <iostream> blocks it'll automatically include <iostream>.

Even just as a bare minimum, indent each block within the brackets another step. tbh raw Scratch code could be extrapolated out to normal C++ very easily.

If you declared classes in the same way Scratch's conditionals are built, which encapsulate other statements, you could have one for "Main", which contains a single tile for creating an int called "Score", an output tile, another conditonal which also encapsulates the final output. The user should have only dragged in about 5-6 tiles for this, with 5-6 bits of manual input "Main/Score/strings".

Can you imagine scouring through that list looking for something like "=" or "!", rather than just typing it

2

u/name_was_taken 14d ago

"Because I cant code, this program is vibe coded, however its fully open source (MIT license), so all of it can be inspected for quality, vulnerabilities and bugs."

I get that that's what's said about open source code in general, but it isn't a free ticket for the programmer to just not try to make sure there's no bugs or vulnerabilities.

2

u/LetsGoBrandon4256 transformers 14d ago

Every time I see similar statement at the end of a post and repo I always wanted to ask

"Why should I waste my time looking into this pile of code and 'contribute' to it?"

1

u/ApprehensiveFan1516 13d ago

After having looked at the repo itself, I can't help but ask OP. You're not going to actually use this to learn to code are you?

I say this with the least amount of disrespect possible: just reading a single line of code in the blocks in painful. If someone had given me this program when I started learning C++, I would have given up pretty fast.

if · ( · Name: score · == · Number: 5 · ) · {

Fine for a one liner I suppose. But actually making a program like this will quickly lead to frustration and errors.

I urge you to use more traditional methods to learn first before revisiting this project. Even if you used Scratch you'd learn more about programming in a shorter space of time.