Identify the problem (a.k.a "complete and minimal code")At this point you're about to write your post. Many people will read it and try to help, but none of them have hours to spend on your problem. So it is a very bad idea to copy-paste pieces of your original code, or even worse, the whole thing.
Why is it a bad idea? Because:
- your code contains 95% of code which is irrelevant to the problem
- people just give up reading when they see too much code
- people can't test it themselves
- everybody loses precious time because the problem is lost in tens or hundreds of lines of code
So, let's say you have a problem when displaying a sprite. Nobody cares about how you check collisions, how you play sounds, how you export your game files, etc... It would just be a waste of time to read this code. So what you must do is to extract the relevant lines of code from your application and write a new piece of code that contains only them. We don't care if the new code doesn't do exactly what your original application does, all it has to do is to reproduce the problem.
It is important that:
- the code is complete, so people can test it
- the code is as simple as possible, the best is one main() with all the code inside -- people don't want to setup a complex project just to test your code
- the code reproduces the initial problem
- the application doesn't depend on external resource files (unless it's related to the problem)
While reducing the code, chances are that you solve the problem yourself: things are clearer and more obvious with less code. And if you can't find anything, we will most likely give you an answer very quickly because the code to examine is very small.