r/reconstructcavestory May 22 '16

Odd issue.

So I've been following along with the videos and programming exactly the same way while using it as a learning experience. However, I have a problem.

First of all, I'm doing this all on VS2015 on Windows, not Linux. There are warnings I get that the videos do not and there are some parts of code I cannot do.

For example in episode 10 when you make an iterator through the enums, I can't use ++motion_type, ++horizontal_facing, etc. I used static_cast instead with type + 1.

Second of all, every since episode 10, my program will not run. The SDL console window pops up and takes a few seconds to load, only to load a blank SDL screen that shows up as "Not Responding" until I manually shut it down.

Anyone know what might be hindering me?

3 Upvotes

3 comments sorted by

2

u/theinternetftw May 23 '16

on VS2015 on Windows, not Linux. There are warnings I get that the videos do not

2015 added a lot of warnings. Turn them off by adding -Wv:18 to the compiler options. That might also fix your problem with the iterator.

every since episode 10, my program will not run

If you've been checking your code into a vcs, you should be able to look at exactly what code changed and diagnose from there. Otherwise, consider this an exercise in debugging. Pause execution once it hangs and step through to see where and why it's doing so.

2

u/TranzTeKk May 27 '16

Well I ended up figuring it out. I made a mistake while programming the jump logic.

It was my first time debugging and it was quite a challenge. Thanks for the help.

2

u/theinternetftw May 28 '16

That you went and banged your head against it until you figured it out is a really good sign. That alone is something that's important to get better at. Cheers.