r/PinoyProgrammer • • Jun 13 '26

programming I'M BEGINNING TO BELIEVE (made a basic game in C++)

I've been putting off learning C++ for a while since coming from Java/Kotlin, the syntax looked like sh*t (sorry)

But I keep seeing it being recommended "if you wanna learn memory management" and a bunch of other fundamental stuff. Wala ako masyado fundamentals since I shifted into tech lang.

I know how to "drive the car" but dunno how it works internally so to speak.

It also seemed like a difficult language to learn according to a lot of people, and I unfortunately chase difficult things.

So here am I making a terminal snake game with very minimal AI assistance (mostly used for understanding C++ concepts/syntax and why stuff won't work).

44 Upvotes

7 comments sorted by

5

u/rupertavery64 Jun 13 '26

Did you come up with the logic and structure yourself? That looks good for someone who shifted into tech, or have you been programming for a long time?

7

u/AffectionateBack7222 Jun 13 '26

Been programming for a year and a half so I do know my way around kahit papano.

And yep, logic and structure are mine. It's OOP since I can't make sense of functional programming just yet.

The guy I happen to watch on YT that makes cpp games trash on OOP for some reason.

7

u/Puzzled-Landscape-44 Jun 14 '26

You can really only see the evils of OOP in large codebases, ironically. Mostly due to deep inheritance hierarchies.

0

u/[deleted] Jun 16 '26

[deleted] — view deleted comment

2

u/AffectionateBack7222 Jun 16 '26

Ah no haha

The channel is Low Level Game Dev

He's quite the hardcore "I'll make my own game engine in Cpp" type of dude lol

Tho right now I'm working on a cpp Tetris game by following a step by step tutorial from another channel, this time using OOP.

I need to see how Cpp Devs actually structure their code and use libraries like raylib before I move forward.

2

u/objektOriented Jun 18 '26

nice work, OP! would you mind sharing the resources you used for making the game or learning C++?

2

u/AffectionateBack7222 Jun 18 '26

For this game specifically, I asked AI to teach me some basic Cpp syntax, how to make a terminal canvass, and read inputs.

Afterwards, I just used what I already knew from programming in general to build the game logic.

I've moved on since. Right now, I'm just following along step-by-step videos to help me understand how Cpp devs structure their code:

Tetris Game

LearnCpp

1

u/objektOriented Jun 18 '26

thanks a lot! could i see your code for the game as well?