I want to learn how to write C++ for work.

I want to learn how to write C++ for work.

Nice to meet you. It’s been 10 years since I first started working with C++, but since I haven’t been able to land a job, my experience is limited to hobby projects. How can I write good code?

I suppose, unlike code written for work, hobby code is only meant to be understandable to the person who wrote it. How is that different from professional work?

I enjoy using libraries like raylib, dxlib, and SDL3.

I’d like to learn the techniques for preventing code from becoming a “spaghetti mess” in a professional setting.

I’ve looked up a lot of this on Gemini, but I’d like to hear some human opinions.

Translated with DeepL.com (free version)

u/amagi77 — 4 days ago
▲ 12 r/love2d

My first scripting language my code is a Spaghetti !!!

Background

I’ve been studying C++ for a long time,

but after discovering love2d, I decided to start learning a scripting language.

This is my first scripting language, and I have no prior experience with JavaScript.

The repository contains a card game I’m developing.

It’s a poker game using numbers up to 7.

Problem

I’m confused because the syntax is completely different from C++, and there’s no concept of “tables” or “types.” I don’t know

how to write the code.

While concepts like C++ classes and functions make sense to me,

I’m confused because everything is a table.

I’d like to use this language to develop quickly without worrying about types, in a way that feels like Lua.

What I Want to Know

I want to know what I should keep in mind.

I often hear that

You can write code in any format.

I kept this in mind and built it like C++, but it somehow lacks that fast, free-form feel of a scripting language where tables are central.

As it stands, it feels like I’ve just ported C++ to Lua—it doesn’t feel like Lua at all.

GitHub: https://github.com/amagi-dev/card

reddit.com
u/amagi77 — 12 days ago

The editor interface built with ImGui is complete!

Lately, I’ve been getting bogged down in the details and haven’t made any progress at all. But I’ve finally made it this far!

All that’s left is to add a new object from the menu,

display it in the scene, use Box3D for collision detection, and move that object!

What do you all think?

u/amagi77 — 15 days ago

How do I create a project that moves forward?

I’ve been working on a game engine using the SDL3 GPU for a few weeks now.

It quickly turned into a mess, and I couldn’t make any progress—it’s become a cycle of “think → time to sleep.”

Even if I force myself to keep going despite the mess, it inevitably falls apart.

Keep going even though it’s a mess → It falls apart

Try to figure out how to avoid the mess → Time to sleep—no progress

How do you all keep your projects moving forward?

reddit.com
u/amagi77 — 18 days ago

Gizmoを入れたらやっとエンジンらしいエディターなった来た!

https://preview.redd.it/8sj7wmgn2nqh1.png?width=2610&format=png&auto=webp&s=fd94afda9c98da7f6db73ed2220df4ca4f5dd42c

ただのモチベ記録スレッドだけど。ImGuizmoというImGuiの拡張ライブライを入れたらようやく

ゲームエンジンらしくなってきた。まだ完成まで道のりは長いけど完成させたい。

最近わかったことは。細かいことはいいからまず。手を動かしてみることと、最適化は後回しでとりあえず動くコードを作っってからの方がどんな情報や処理が必要かわかるから。そっちの方が効率高い。

取り得ずほしいエンジン機能は

アニメーションとパーティクルはぜひつけたいと思ってる。

.hlslシェーダーもLLMのおかげもあって結構作れる。

Github: https://github.com/cedricguillemet/imguizmo

reddit.com
u/amagi77 — 25 days ago

SDL3 GPUでゲームエンジンの開発を始めたけど。スパゲッティ化しそう

SDL3 GPUで.hlslシェーダーも使えるゲームエンジンを作ってるけどコードがスパゲッティ化してそうでモチベが続かない。みんなどうしてるのか?僕は独学だし業務経験がないのでさっぱりわからない。

みんなどうしてる?コメントで教えて

使ってるライブラリはSDL3 GPU Box3D glm くらいかな

u/amagi77 — 26 days ago