“Create a game“ tutorial reacting badly to different variable names

Go through the “Create a game“ tutorial; rename the following variables to:

“position“ -> “wallScrollSpeed“

“i“ -> “wallLength“

“hero_y“ -> “playerY“

“hero_vy“ -> “playerJumpAndGravity“

Then when you finish step 3/5 of “Jumping and gravity“, write “//test” at the very bottom of the coding section. Then run the program. What’s happening in this modified version of the game is the player is spawning on the floor, but not being able to jump; when you start deleting code while the program is running, the player will then respawn in the air being able to jump as normal. Using the “//test“ comment for this should mean that it can’t be a logic error.

When I followed this tutorial last month — then using the variable names suggested by the tutorial — this problem did not arise.

There are so many things that could go wrong, might be just a small typo.
So even if someone would take the time trying to replicate your steps the result might be different.

The best way would be if you could show what you have done so far. Publish the project and post the link here, BUT please use the Unlisted option since it is not a finished game.


*and make sure to post the link here so we can see it

I’m back. Two things:

  1. I Was busy with other things for a few days, hence the delayed response.

  2. Before I made the original post, I think I had exited the project before it could auto-save; losing half the project I had at that point, so I had to retype it. Also hence the delayed response.

I’ve since retyped the lost progress and now it works. But I would still like to post the unlisted. Do I just leave “List my project in the Explore section“ unchecked? Either way, the link: https://microstudio.dev/i/Trondei/tutorialcreateagame/

Maybe keep an eye on this space as well; I’m hoping to make an annotated version of Skate Run, with the code comments being turned into full-on documentation for beginners.

I’m hoping to make an annotated version of Skate Run

Looking forward to it! It would be awesome to have that.

Post a reply



Validate your e-mail address to participate in the community