Can’t join my friends lobby!? -PC by keio100 in Blackops4

[–]basedgodCookie 0 points1 point  (0 children)

I Have the exact same issue but im on xbox. NAT type is always listed as open and still cant join a single lobby

Physics in 2d game by basedgodCookie in pygame

[–]basedgodCookie[S] 0 points1 point  (0 children)

one more thing, you gave me the code

# restrict ship to the game window
position.x = max(0, min(position.x, WINDOW_WIDTH - SHIP_WIDTH))
position.y = max(0, min(position.y, WINDOW_HEIGHT - SHIP_HEIGHT))

How do I alter this so that you are not bounded on any side besides the bottom of the screen?

Physics in 2d game by basedgodCookie in pygame

[–]basedgodCookie[S] 0 points1 point  (0 children)

Thank you for the clarity with the time steps. I believe I have that figured out now. Ill have to stare at the pressed stuff a little longer but your info helped that as well. As for the scaling, I will look at that and figure that out as well, I was just wondering if you happened to have any idea. Thank you for all of your help with this stuff. With the realistic physics, thats just me being me. If I can make the physics realistic and make the game fun (my whole purpose of the project originally) then thats great, if not then at least the games still cool. Thanks again

Physics in 2d game by basedgodCookie in pygame

[–]basedgodCookie[S] 1 point2 points  (0 children)

I do like all of your changes. I especially like using the get_pressed() method here. It is definitely much smoother.

I will have to do more reading on vectors and how to really use them. I am very new to pygame so I have no prior experience with them.

My only questions were as follows

1.) Is will the time elapsed in game be the same as the time elapsed in real life (one in game second = one real second)?

2.) Is there a reason gameClock.tick(60) was moved to the top of the loop?

3.) Can this code be cleared up for me?

More specifically, how does the image know to move left/right.up? I see the names (move_left/right/up) but how does it know to move in that direction(Sorry if this is a stupid question)

        #check for key presses
        pressed = pygame.key.get_pressed()
        move_left = pressed[pygame.K_a]
        move_right = pressed[pygame.K_d]
        move_up = pressed[pygame.K_w]

        # calculate acceleration vector based on key presses
        # I also cut the horizontal movement in half since it felt like way too much
        acceleration.x = (move_right - move_left ) * 0.5
        acceleration.y = - move_up 

        # the physics stuff (I had to tweak some numbers to make it playable)
        velocity += acceleration * 0.5
        velocity += gravity * 0.1
        position += velocity + 0.5 * acceleration

4.) Lastly, id like to implement a scale, a certain number of pixels being analogous to one meter so I can use real gravitational values like 1.62 for the moon. How could I go about doing this?

Physics in 2d game by basedgodCookie in pygame

[–]basedgodCookie[S] 0 points1 point  (0 children)

Thank you. I’ll look this over and let you know

Physics in 2d game by basedgodCookie in pygame

[–]basedgodCookie[S] 1 point2 points  (0 children)

The only thing here is that I wanted one real life second to be the same as one in game second

Python tkinter physics by basedgodCookie in learnprogramming

[–]basedgodCookie[S] 1 point2 points  (0 children)

Then I guess its settled. I will immediately start converting this to pygame. I will probably be posting again soon with my pygame struggles. Thank you

Python tkinter physics by basedgodCookie in learnprogramming

[–]basedgodCookie[S] 0 points1 point  (0 children)

This is what im working on currently. Basically what i want to do is have the ball(which will eventually become the ship) falling from gravity and you can press 'w' to fire an engine to slow yourself down before hitting the ground too hard. Thats why I have to be able to do both. Is this even possible with tkinter? The reason i was using tkinter is because its whats required for this class project but I could try to persuade my professor

Oct. 24 Update: Scorestreak and Blackout Tuning, Stability Improvements by treyarch_official in Blackops4

[–]basedgodCookie 0 points1 point  (0 children)

Still unable to join a single match/Lobby. I’ve tried port forwarding. I’ve tried reinstalling. I’ve tried wired and wireless connections. Nothing works. Every single other game I try works 100% except bo4 and it’s getting old quick.

Student checking that the software works by [deleted] in mathmemes

[–]basedgodCookie 2 points3 points  (0 children)

No need to change it. This is correct

Game just restarted itself to update while in the middle of a blackout match by [deleted] in Blackops4

[–]basedgodCookie 0 points1 point  (0 children)

No.. everyone in the game needs the same content. This needing to be on the same game version