Computer Science Canada 2D platformer |
Author: | rsarvar1a [ Mon Oct 12, 2015 5:03 pm ] | ||||
Post subject: | 2D platformer | ||||
What is it you are trying to achieve? A friend and I are writing a simple (ha!) 2D platformer. What is the problem you are having? So far, we've written the code for scrolling the background, but when we try to add sprites, it just goes catastrophic. Screen starts flashing. Alone, the scrolling code is fine, as well as the basic code for our sprites. There are no conflicting variables. Describe what you have tried to solve this problem We tested both pieces of code individually. They worked fine. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using 4.1.1. EDIT: Forgot to mention, this version doesn't include the full code for the sprites. All that consisted of was- Instead of:
|
Author: | Insectoid [ Mon Oct 12, 2015 7:16 pm ] | ||
Post subject: | RE:2D platformer | ||
You shouldn't need to include Sprite.Show more than once in your code except in special circumstances. Also, you have a lot of code that does nothing.
A good chunk of that code makes no sense at all. It might work, but it's really, really bad. There shouldn't be if statements that never fail and there shouldn't be lines that do literally nothing. |