Advertisement

collision

Started by January 07, 2017 11:51 PM
77 comments, last by jpetrie 7 years, 8 months ago

can you recommend an image hosting site?

http://imgur.com/

Hello to all my stalkers.

here is my image

http://imgur.com/a/npzkN

Advertisement

Are you saying that the left part works as it should, but the right part does not?

Or in other words: collision works against the lowest blocks, but not against any other blocks?

...or is the problem something else?

Hello to all my stalkers.

exactly that the right part is what I am trying to accomplish, the collision works on the lowest bricks but not on the next level of bricks, I have stubbed out some code in order to understand the problem better, this really helps me to figure out my problems, please don't give me any code because as of yet because I want to code it myself, I just want to understand my problem better, I know I can figure out this problem.

Well, try to think about what doesn't work. Does the ball collide with bricks that you tried to remove earlier? Does the ball not collide/go through the next set of bricks? Is the ball colliding, but the brick not disappearing?

You don't have to reply with your answer, just think carefully about what's going wrong.

Then, try to figure out what would make the error you see happen. The game is doing exactly what you're telling it, so at some point there's miscommunication between what you want, and what the code is actually saying.

What could be the reason for the error you're seeing?

Now, try looking to see if that's what going on. If it is, you know where you need to fix something.

If everything looks ok so far, keep trying to think of reasons, and keep looking.

Learning how to use a debugger, setting breakpoints and inspecting the various variables runtime is a huge help when trying to track down problems, but a lot of problems can also be solved by tracing through the code in your head or on a piece of paper.

Hello to all my stalkers.

thanks for all the advice, I am working with my stubbed out code. any more advice would be appreciated.

Advertisement

well I have figured out my stubbed out code using only c++, now I have to integrate this code into my game program

why did get penalized 3 points?

why did get penalized 3 points?

Somebody voted one or more of your posts down.

why did get penalized 3 points?

Somebody voted one or more of your posts down.
I think he may be after a reason why they voted down.

As for that reason only the person who voted down could say why. That of course is not mandatory and entirely up to that person...

Note: back in days of old on gamedev.net, discussing reasons for negative votes would cause yet more negative votes. I've not seen that happen for a long time, but perhaps best not to tempt fate?

This topic is closed to new replies.

Advertisement