Python Forum
drawing, moving, and collision problems (pygame)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
drawing, moving, and collision problems (pygame)
#27
There are no actual errors but there are errors in what I expect it to do. I have this game and after defeating all of the enemies can touch the side of the canvas. It resets everything to the next level and puts them on the opposite side of the map to give them the idea of a new area. The problems are as follows below -

problem 1 - the player is not placed on the opposite of the canvas after defeating the enemy and touching the edge of the canvas

problem 2 - When they are in the town, they have to go to the Cabin and Shop before anything happens when touching the edge. When they touch the left and top, nothing happens, if they touch the right or bottom, it doesn't end the town func but it places them on the other side of the canvas.

The code and where it can be downloaded is here - https://github.com/Sheepposu/Destination

I'll post some lines to look at that are responsible for this

problem 1 - line 919
problem 2 - 976

The player class starts at line 129
The move func inside the player class starts on line 312

If you do download it you'll need to know that you press "p" to pause and see/upgrade all your stats. The sword deals damage on touch.

He that can have patience can have what he will
- Benjamin Franklin
Reply


Messages In This Thread
RE: Drawing player and enemy (pygame) - by Windspar - Apr-14-2019, 10:25 AM
pygame problems - by SheeppOSU - Apr-18-2019, 11:27 PM
pygame problems - by SheeppOSU - Apr-19-2019, 11:59 PM
changing position errors - by SheeppOSU - Apr-22-2019, 03:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [PyGame] Problem with collision of player and enemy Nekotrooper 1 686 Dec-08-2023, 03:29 PM
Last Post: deanhystad
  pygame installation problems Gheryk 5 8,629 Nov-29-2023, 08:49 PM
Last Post: E_Mohamed
  can't get collision detection to work in platform game chairmanme0wme0w 10 3,819 Aug-19-2022, 03:51 PM
Last Post: deanhystad
  [PyGame] Problems with jump code in pygame Joningstone 4 5,378 Aug-23-2021, 08:23 PM
Last Post: deanhystad
  [PyGame] drawing images onto pygame window djwilson0495 1 3,490 Feb-22-2021, 05:39 PM
Last Post: nilamo
  [PyGame] Collision in not happening onizuka 3 3,416 Sep-07-2020, 11:30 AM
Last Post: metulburr
  [PyGame] No collision detection onizuka 6 3,669 Aug-18-2020, 01:29 PM
Last Post: onizuka
  [PyGame] pygame, help with making a function to detect collision between player and enemy. Kris1996 3 3,342 Mar-07-2020, 12:32 PM
Last Post: Kris1996
  Problem with collision detection... michael1789 4 3,275 Nov-12-2019, 07:49 PM
Last Post: michael1789
  Pygame sprite not moving michael1789 1 2,842 Nov-10-2019, 03:54 AM
Last Post: michael1789

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020