What I'm creating
I guess for context, I'm a software engineer at work; mainly I do react native work. It's mostly product work, where I implement and improve features in an already existing codebase. While I do get to collaborate with designers, and give design feedback, I'm mostly thinking and working on code. The product has a set design, and the brand has an established feel for it.
From my game design days, I really miss being able to blend my creative thinking with code. When you're doing solo-dev work on a small project, code quality can be super jank; you only have future you to worry about. But this can be super freeing, because if either an idea isn't as good, or if code is becoming too complex/spaghetti for a feature, you're in charge. You can just be like 'ya no.'
So I've been taking time to learn some c++ on the side, through a book https://www.packtpub.com/product/sfml-game-development-by-example/9781785287343. I've only gone through the first 3 chapters, but it's let me stumble through creating a toy.
Our family pet is a pigeon
Her name is Masha :)
Masha the Pigeon
A reminder that pseudo-text is king
Something that I struggled for a bit on was getting screenshots of the right thing. Because the screen will be filled with different clothing options, I only wanted to capture the right-hand side - where Masha is. There was a function that made it super easy, however that way is deprecated. So I had to do some transferring between the texture to an image, and that image to another image, and then finally save it.
That process seems convoluted on paper, and my head just couldn't write the code. So I decided to write out the steps I thought I needed. Doing that made it 1000x easier and I solved the issue almost immediately after writing the 2 comments.
Re-inventing the wheel with the double click
Just like the AABB collision that I wrote, there's probably some easy helper functionality built in to detect if a double-click has occurred. However, I want control, and the ability to tweak values. Also just to have the learning experience.
This was also something I had trouble thinking about in my head, so drawing out diagrams on paper helped.
It's all data man; reducing in-code value editing
I found I was adding new items in code itself, and while that works, it makes it 100% harder to read code and understand where an issue could be happening if 70% of the file is just object creation with pixel values defined.
So I learned a bit about file reading, copied some code I more or less understand, and threw my values into a csv file.
The main tricky part was converting strings to floats, because c++ is a lot more strict with values.