Search found 154 matches

by adabo
January 27th, 2017, 6:46 pm
Forum: Everything
Topic: Which of these examples is better?
Replies: 8
Views: 3211

Re: Which of these examples is better?

This is what I love about this forum. The perfect place to get multiple opinions and points of view on any given subject. @albinopapa, that is a very clever idea. It's definitely going to be part of a future project. @chili, perfect example of not jumping to conclusions and having another brain in t...
by adabo
January 27th, 2017, 5:58 am
Forum: Everything
Topic: Which of these examples is better?
Replies: 8
Views: 3211

Re: Which of these examples is better?

You have incredible mental visualization skills. It's a little scary. I started losing track by the 2nd bullet point :shock: All we need to do now is to have you put these ideas of yours out on paper, graph, flowchart whatever. This way all us mortals can comprehend what you're telling us :lol: *Edi...
by adabo
January 27th, 2017, 1:07 am
Forum: Everything
Topic: Which of these examples is better?
Replies: 8
Views: 3211

Re: Which of these examples is better?

I think efficiency comes first, like you said, MrGodin. I think I'm torn because I want my code to be easy to read and maintain. I want it to flow in a logical order and to be predictable to the reader. Maybe what I could do inside the loop that checks the collision is to call a different function f...
by adabo
January 26th, 2017, 11:22 pm
Forum: Everything
Topic: Programming in C...yep, trying it out.
Replies: 24
Views: 7611

Re: Programming in C...yep, trying it out.

Well I figured it out. The condition that I wrote turned out to be for checking if a box was inside another box. Which is useful if I wanted that lol I might just use this, actually.
by adabo
January 26th, 2017, 10:04 pm
Forum: Everything
Topic: Programming in C...yep, trying it out.
Replies: 24
Views: 7611

Re: Programming in C...yep, trying it out.

I think there is a typo in your collision code: return A.position.y > B.position.x && A.position.x + A.width < B.position.x + B.width && A.position.y > B.position.y && A.position.y + A.height < B.position.y + B.height; Also, perhaps even a logic error. I think you need to have: return // Right side...
by adabo
January 26th, 2017, 9:56 pm
Forum: Everything
Topic: Which of these examples is better?
Replies: 8
Views: 3211

Which of these examples is better?

which is better? It seems that this question arises over and over again in my head. It involves handling the collision of entities. I can think of two ways for handling it. Option 1: First function to flag colliding entities. Second function to update their stats accordingly Option 2: One function t...
by adabo
January 26th, 2017, 6:53 pm
Forum: Everything
Topic: Programming in C...yep, trying it out.
Replies: 24
Views: 7611

Re: Programming in C...yep, trying it out.

The love for C really just stems from the anger towards C++. The anger towards C++ stems from the hatred towards the C++ community. The hatred towards the C++ community stems from the suffering inflicted by OOP that the community pushes for. If you want to listen to a talk on why OOP is bad, here's...
by adabo
January 22nd, 2017, 12:01 am
Forum: Everything
Topic: Need help with compile errors
Replies: 8
Views: 3110

Re: Need help with compile errors

@MrGodin I'll take that advice. Though, admittedly I don't understand the majority of what you're explaining, I'm sure looking over the code and practicing will make it easier to make sense of it in the future. @albinopapa Again, the circular dependencies and forward declaring. I just don't have a h...
by adabo
January 21st, 2017, 10:17 pm
Forum: Everything
Topic: Need help with compile errors
Replies: 8
Views: 3110

Re: Need help with compile errors

Pushed new changes.

Added the default constructors to all my classes. This build has 104 errors now. Digging myself a hole now lol

As for initializing the objects that have memebers that are & references, yes, it's all taken care of.
by adabo
January 21st, 2017, 9:56 pm
Forum: Everything
Topic: Need help with compile errors
Replies: 8
Views: 3110

Re: Need help with compile errors

Very good, I'll start with the simplest and work my way uphill :) Thank you.