A word of advice for all the brand new C++ homies out there

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
binary_ironclad
Posts: 13
Joined: October 19th, 2018, 9:34 pm

A word of advice for all the brand new C++ homies out there

Post by binary_ironclad » November 24th, 2018, 4:52 pm

Lots of experience being in various forms of code, primarily for business intelligence/office-y stuff, and SQL.

Never before got serious about C++. Then ole' Uncle Chili visited me in my dreams and dropped that dank logic. Hooked now.

I stopped the beginner tuts at lesson 18 or 19 (I forget) to try and push what I've learned, coupled with past experience, into developing a homage to a game called Dungeons of Daggorath. I've got the 3D environment build and largely functional...

but...

I recently opted to get ahead of myself and try to re-write/"optimize" (if you can even call it that) the code I've written (which wasn't 100%) to make it more readable, etc. Not a bad idea, in-and-of itself, but...

The initial code, while cumbersome and clunky, works, for the amount that I have completed. It just isn't 'pretty' per se. The NEW stuff I wrote, however, set me back since I ended up making brand new mistakes that I didn't think about before, leading me down different rabbit holes, chasing new things that didn't really need to be chased.

If you're new like me, and your shit is almost 100% gtg (good to go) but not quite there and not super sexy, it doesn't need to be. Not yet. My lesson from this is get my almost 100% shit working fully BEFORE trying to skim through everything and tighten the screws up. It was seriously deflating when I thought I knew more than I did and wound up with all new bullshit to deal with.

Take it slow, my dudes. Unless you're advanced and can rip through shit like whoa, take it slow and even if it's not perfect, it's a hell of a lot better for the confidence and motivation to have something that works, can be demonstrated, built upon, etc., than to have a bunch of errors pop up that didn't even need to happen in the first place.

My $.02. YMMV.

I welcome any other advice from the ninjas on this board.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: A word of advice for all the brand new C++ homies out th

Post by albinopapa » November 24th, 2018, 5:39 pm

No, you pretty much landed it. If you can focus on getting the shit done, you'll get pretty far.

One of the biggest hurdles in my coding life is being hung up on clean, well performing code instead of game play. This causes me to make decision that make my life more miserable than need be. I end up painting myself into a corner and give up, because I'm not sure how far back I need to go in order for things to start working the way I intended them to.

So yeah, to put it another way, I try to be clever and it usually never works out.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

binary_ironclad
Posts: 13
Joined: October 19th, 2018, 9:34 pm

Re: A word of advice for all the brand new C++ homies out th

Post by binary_ironclad » November 24th, 2018, 6:25 pm

I'm feeling the same way. Some of the nifty dizzles I think I can drop are quickly beaten to death by VS, much to my chagrin. I enjoy trying new ideas, but it's also really grating to consistently hit failures.

Admittedly, this project is probably *very* beefy for someone who is new to this, and not to pat myself on the back too hard, I'm pretty happy that I've been able to build a 3D dungeon that I can successfully move around in (for the most part), plus a map that displays the level and key locations for things, etc. The player can look down corridors independent of movement, too. Once I can iron this crapola out and fix the few remaining PITAs I can look at things like player health, enemies, enemy AI, and so forth.

Easily this is the most infuriating, challenging, brain-melting, humbling, yet rewarding thing I've done relative to code in any form.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: A word of advice for all the brand new C++ homies out th

Post by albinopapa » November 25th, 2018, 10:39 pm

Nice, 3D comes with it's own challenges aside from just the language of choice.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

binary_ironclad
Posts: 13
Joined: October 19th, 2018, 9:34 pm

Re: A word of advice for all the brand new C++ homies out th

Post by binary_ironclad » November 25th, 2018, 11:20 pm

You're telling me. Just getting the hang of the logic to look without moving in the grid was blasting my nuts off. Holy smokes.

But, I think the hardest part is done. So far, I can now maneuver in the dungeon successfully, but a few visual elements need to be cleaned up.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: A word of advice for all the brand new C++ homies out th

Post by chili » December 2nd, 2018, 11:49 am

There's a lot to be said for just gettin' 'er done.
Chili

binary_ironclad
Posts: 13
Joined: October 19th, 2018, 9:34 pm

Re: A word of advice for all the brand new C++ homies out th

Post by binary_ironclad » December 3rd, 2018, 9:26 pm

chili wrote:There's a lot to be said for just gettin' 'er done.

Yeah, it's getting done. It'll be interesting to look at the code in a year or two (or more) when I've garnered more experience. I'm sure I'll cringe. But whatever, I'm having a blast.

Post Reply