please help me with a 2d player controller

so i need help with a 2d player controller script and every tutorial and they are out dated or they don’t work and if i make one my self i keep geting an error that says that there is no animator on top

There are many many ways to make a controller.

It largely depends on the experience you are looking to craft.

But if you want to just jump in people really like Corgi.

I personally have run the gambit of controller assets, but since my interests is in systems design I had to just get my hands dirty and suffer through tons of trial and error to get what I wanted.

1 Like

Very much this. I gave up trying to keep around “the ultimate controller…” every game just needs to be different, plus every time I write something I make it better, less lines of code, better design, etc.

The clincher was I had a small retinue of controllers, but then I’d dig up one, try it, change it a bit, use it a bit, change it a bit more, then realize that I had forgotten it had a huge limitation that it couldn’t do and … ugh.

Start over.

Now I just start afresh with the precise feature set I know I will need.

1 Like

I’m having a lot of success using a collier and rigidbody that shoots a ray down to push it up, and then adding forces countered by drag.

Totally janky code.

Extremely happy with the results.

2 Likes

Try to stick with one (not outdated) tutorial and complete it. If you get stuck, try to fix any issues you have and ask for help if you can’t. Don’t keep jumping to the next tutorial because the previous one didn’t work first time. You learn more by resolving these issues than just typing the tutorial out and having it work first time.

3 Likes

Huge agree with Uncle Bob here ^ ^ ^… in fact this is my screed towards this:

How to do tutorials properly:

Tutorials are a GREAT idea. Tutorials should be used this way:

Step 1. Follow the tutorial and do every single step of the tutorial 100% precisely the way it is shown. Even the slightest deviation generally ends in disaster. That’s how software engineering works. Every single letter must be spelled, capitalized, punctuated and spaced (or not spaced) properly. Fortunately this is the easiest part to get right. Be a robot. Don’t make any mistakes. BE PERFECT IN EVERYTHING YOU DO HERE.

Step 2. Go back and work through every part of the tutorial again, and this time explain it to your doggie. See how I am doing that in my avatar picture? If you have no dog, explain it to your house plant. If you are unable to explain any part of it, STOP. DO NOT PROCEED. Now go learn how that part works. Read the documentation on the functions involved. Go back to the tutorial and try to figure out WHY they did that. This is the part that takes a LOT of time when you are new. It might take days or weeks to work through a single 5-minute tutorial. Stick with it. You will learn.

Step 2 is the part everybody seems to miss. Without Step 2 you are simply a code-typing monkey and outside of the specific tutorial you did, you will be completely lost.

Of course, all this presupposes no errors in the tutorial. For certain tutorial makers (like Unity and Brackeys) this is usually the case. For some other less-well-known content creators, this is less true. Read the comments on the video: did anyone have issues like you did? If there’s an error, you will NEVER be the first guy to find it.

Beyond that, Step 3, 4, 5 and 6 become easy because you already understand!

Finally, when you have errors…

The important parts of an error message are:

  • the description of the error itself (google this; you are NEVER the first one!)
  • the file it occurred in (critical!)
  • the line number and character position (the two numbers in parentheses)

All of that information is in the actual error message and you must pay attention to it. Learn how to identify it instantly so you don’t have to stop your progress and fiddle around with the forum.

3 Likes

Yup, pretty much this.

The dirty truth is that you’ll never ever get exactly what you want from tutorials, but it will get you some navigation.

Do a bunch of them.

See what you want to do differently.

Stumble through it.

Ask for help when you need it (99% of the time you’ll get the answer before hitting post. This is called “rubber ducking”, since a lot of answers will come to you if you try to explain the problem to an inanimate object like a rubber duck.)

Hit that like button and be grateful for any help.

Try and help others since that’s how you really get good at problem solving.

A while ago a guy came on these forums asking tons questions. Was super polite. Got a working beta and posted it. Was unable to get back to it for a while. Came back. Saw that it was getting tons of attention and even got a segment on toonami.

And that’s how Slender hit the scene.

Point is, don’t be afraid to shamelessly ask for help again and again (so long as you take the advice).

The Unity community is truly a tremendous asset and the people here are just fantastic.

It’s why Unreal is all demo reels and no games to market from new developers, but Unity keeps cranking out gems.

1 Like

I appreciate that enthusiasm and all, but this is not true. Not even remotely. :slight_smile: Although Unreal doesn’t have this thriving forum community, but they have other resources and they have considerable number of indie gems to show off. Just take a look at their YouTube channel, they are holding user-appreciation events regularly.

It is really not healthy to form a tribe here, so please don’t. (It’s bad Unreal cool, Unity sucks and equally bad the Unreal sucks, Unity cool too) Check out many engines instead, the more you learn, the more you know, the more knowledge you can use while you’re making your games. And don’t hesitate to switch engine when you think your goals are more achievable in a different engine. These are tools and helpers to make your (our) life easier.

3 Likes

Okay, that’s true.

I should have worded it better.

The Unity community is why there are so many start up developers making it to market.

I should not knock Unreal. They do indeed have many Indy titles and it is a good engine.

2 Likes

thank you but im looking for something more cheap