Issues with 2D Unity training

HI, new to coding and unity, only been working on it for a couple weeks in my free time. i have made it through most of the beginner classes that unity provides. Currently I am attempting the top down 2D game and hitting a lot of funky small errors here and there. So far the code is showing nothing but I’ve had to do a lot of searching for ways to fix it. Like my sprite spinning on its own, not moving at all despite no errors, found reloading the scripts cleared that up. Then adding a simple wall made my game unplayable. each time I go to test I just get a blank screen. I have restarted from the beginning (not many steps in) and still unable to test my game even without and major additions or changes.

Any tips to help a newbie out?

First, some Unity tutorials DO have bugs. But let’s assume that the ones you’re doing are okay.

Either way, bugs or not, you want to move very intentionally and in small steps, like this guy:

Imphenzia: How Did I Learn To Make Games:

Two steps to tutorials and / or example code:

  1. do them perfectly, to the letter (zero typos, including punctuation and capitalization)
  2. stop and understand each step to understand what is going on.

If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.

Step #2 is particularly critical when learning.

If you are unwilling or unable to do Step #2, just ask someone else to do the whole game for you.

I will definitely follow this, I’ve had pretty good success and take it nice and slow, this one for some reason is vexing and fighting me on just about every step. Now I’m struggling at even starting over. When I do the black screen/unplayable portion kicks in the moment I begin, where as before I could have limited control and view of the space.

I will say though, the energy of “if you’re unwilling or unable do do step 2, ask someone to make the game for you” is really unneeded. Every ones new at this at one point or another.

Apologies… it’s my copy/paste for folks failing to use tutorials properly.

This sentence may not be warranted in your case, but I still think it captures the necessity of actually stopping to think about what you’re doing as you go through the tutorial.

You’d be surprised how many folks don’t do that. :slight_smile:

I get that you can’t stop at every single word or line and grasp what is going on, but overall the more you tease out of something, even if it is on a second or third sitting and review, the better you’ll be.

All that said, I urge you to lean into it because the more you pour into it effort-wise, the more gamedev will reward you with joy, at least in my experience.

There are all sorts of approaches to development that people suggest/follow but let me suggest mine. If you have a game project consider that one as the container of “tested and reasonably good solutions” and create another with a similar name but with Test on the end.

That one is where you test theories and experiment with doing the same thing 5 different ways until you settle on the one that a) works and b) makes sense and possibly c) fits within your common development framework.

Isolating your sprite code (for instance) would give you sense of the requirements (i.e. libraries, etc.) needed for you to use it in your game before you incorporate it into your game. You can blow away a test project and/or create multiples any time you want. Your actual game remains relatively clean and contains code you know works or at least is only a few adjustments away from working. You can tweak in your actual game but incorporating a new tweening library you have no familiarity with might not be a good idea.

Trying out a new system for sound effects? Spin up or adjust your test project until you know settle upon a solution.