Advertisement

how do I get my sprite to move up and down once

Started by October 02, 2019 04:52 PM
75 comments, last by Tom Sloper 4 years, 11 months ago

There is no progress, Phil. You haven't paid attention to anything people have suggested. Why is that?



 

21 minutes ago, Prototype said:

There is no progress, Phil. You haven't paid attention to anything people have suggested. Why is that?

He needs Glut specific help for delta times. I'm beginning to wonder about the people trying to help. Do any of you know Glut?

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

Advertisement
57 minutes ago, fleabay said:

He needs Glut specific help for delta times. I'm beginning to wonder about the people trying to help. Do any of you know Glut?

Way back I went over how to do this using GLUT.

All you need to be able to do is get the elapsed time in order to have a working time step. 'glutGet(GLUT_ELAPSED_TIME);'

GLUT is not the proper tool here and isn't good for anyone requiring accuracy which is why it is never recommended in our day and age. Phil has been told countless times to dump GLUT as there are better options out there... ie. GLFW, SDL2, SFML

You're free to type out the answer in code or any other method for Phil to explain it better.

Programmer and 3D Artist

1 hour ago, fleabay said:

He needs Glut specific help for delta times. I'm beginning to wonder about the people trying to help. Do any of you know Glut?

The problem is not delta times, it's the lack of basic understanding how his program works. It's useless helping someone patch a square wheel. People have taken plenty of opportunity to tell him what's wrong with it, and also that glut - being an event-based framework - inherently sucks for game development. Nothing of that ever gets reflected. Not succumbing to ones stubbornness is something different than not wanting to help.

4 minutes ago, Prototype said:

It's useless helping someone patch a square wheel.

And yet there is a constant steady stream of nice guys ready to take up the cause.

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

... yeah

Phil, although two people posted two working solutions you would only need to copy (IIRC Prototype and me), you 'fall back' to using an anlytical closed form approach to calculate jump trajectory.

As said earlier, such approach will fail if other objects collide with the player while jumping for example, because the closed form math has no konwledge of the changes caused by such unexpected events. Believe me, closed form is a dead end here.

Closed form analytics are good to do things like predicting where the jumping player will land most likely, or to calculate launch angle for a catapult to hit a target. Any kind of control problems. But not here.

For game physics simulation you want to use integration as you did before already. It deals with collisions, moving platforms, unecpected events etc. in a simple, doable way.

(The reason your character jumps only once seems you do not set time to zero when starting the next jump. The closed form formula assumes zero as the starting time of the jump.)

 

Advertisement

----

Proposal: Please do Pong or Pacman first. Here physics are very simple, and it sould be much easier to figure out what problems are caused by logic / math bugs on your side, or unecpected timing issues coming from GLUT. It seems actually there is too much uncertainty to progress and learn. With Pong working, you can come back to the jump'n'run game and continue.

5 hours ago, JoeJ said:

Closed form analytics are good to do things like predicting where the jumping player will land most likely, or to calculate launch angle for a catapult to hit a target. Any kind of control problems. But not here.

A 'helpful' video was posted by a nice guy and the damage is done.

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

5 minutes ago, fleabay said:

A 'helpful' video was posted by a nice guy and the damage is done.

Yes, I posted the video as you already know so put on your grown up pants and address it. I already asked you prior when you were complaining about the video and you didn't respond. So by all means don't hold back because the "nice guy" is awaiting your response.

What Phil does or anyone else does with that information is fully up to them. I personally like the video and if you or anyone else doesn't feel the same way that is perfectly fine... Make your points, provide alternative information and be done with it. I doubt that's possible as I've seen most of your posts on these forums and they're mostly negative comments with no constructive feedback.

Instead of providing absolutely zero value to any conversation by posting snide remarks you're free to provide alternative answers instead and become a "nice guy" yourself.

Good luck!

Programmer and 3D Artist

49 minutes ago, Rutin said:

Instead of providing absolutely zero value to any conversation by posting snide remarks you're free to provide alternative answers instead and become a "nice guy" yourself.

Last night I spent a couple of hours understanding how Glut works. If I decide to be a nice guy it won't be to put up some advanced GDC video that no beginner should ever be exposed to because I want to look like I'm doing my part. Did you even watch the video? Freaking ridiculous. And then after I point out the video is bad for a beginner you have the gall to ask, 'what's the problem with it, why so negative?' Get outta here with that bush league crap.

If I find the time I will post beginners help on how to actually get Glut to do what he needs it to do and I won't post the bare minimum "hints" that everyone seems to think are helpful or even worse some video that I did a quick search for without bothering to know what it's about.

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

This topic is closed to new replies.

Advertisement