i did your code for complete, but the map is not proporcional when i run, and when i press the keys, the game have a delay and freeze if i switch from one direction to another one, but the most worst, is when i move the mouse the player move faster and dont delay...
@alexanderfarrelltech3 ай бұрын
Oh I see, I'll see if Pygame can sometimes delay with user input. Would you mind pasting the update function from your player.py file?
@yugrajsingh62373 күн бұрын
Trees aren’t duplicating. It’s frustrating. First code works Then the second import treees doesn’t 😢😢
@mrpotato10439 ай бұрын
I currently have a functioning game but i now want to make specific tiles not accesible for my player. To make him only able to walk on land but not on water? but i cant seem to find anything thats working. Could you help me?
@alexanderfarrelltech9 ай бұрын
Hi, absolutely. In another video, we go over how to implement physics in the game, to make it so players can't walk on water. I'll link to this video here kzbin.info/www/bejne/fHurf4KXrbBpqbM Feel free to watch, or take a look at the source code and use if needed. If you have any other questions feel free to ask!
@anthonydrakefordshadow3 ай бұрын
Hard to believe it’s been 6 months already 😅
@alexanderfarrelltech3 ай бұрын
Oh I hear you. Time has gone by so fast.
@anthonydrakefordshadow10 ай бұрын
I like the way you break things down. I hope you will be making more content. I have been using another series of videos to make my tile map adventure game. If I share the video do you think you can help me scale my player sprite? Right now my player size is confined to within the size of the tiles.
@alexanderfarrelltech10 ай бұрын
Thank you that is very kind. Feel free to link that other video. To scale a player in pygame, we need to set the transform. I may cover this in another video, or work this in. Say you have an image called "image" You load as such: image = pygame.image.load("image.png") Then you can scale it to a certain size by setting it again with the following: image = pygame.transform.scale(image, (150, 150)) It will scale the image up or down to 150x150 pixels, without needing to actually modify the image itself. If you run into any issues with it, please let me know and I'd be happy to help.
@anthonydrakefordshadow10 ай бұрын
@@alexanderfarrelltech I made it through video one but once I include my player sprite with video two he is crammed between the tiles. kzbin.info/aero/PLywhTYI3VhfJCkp_aQXFj_8-Ac496LmUm&si=EtsMzWl3H_2zp70k This is the playlist. I will give the recommendation you provided a spin after work, thank you. Also if you can make your player jump I would just switch over completely. Your tile map is so much more interesting, and I really appreciated the teleport feature!
@Nubbley3 ай бұрын
i copied all the files from github, added them to my game. the only issue i have come across is that there is no dirt/water/grass showing. the trees are laid out but its just the green clear background behind the trees and not the environment drawn out.
@alexanderfarrelltech3 ай бұрын
It could be a couple things: 1. Was a tile map created? 2. Is the draw method of the tilemap being called? Let me know if you have any questions, I’d be happy to help.
@Makspython69oleynik6 ай бұрын
Hello Alex your lessons is very good and informative thanks for it. Could you recommend me some books or lessons to learn python
@alexanderfarrelltech5 ай бұрын
Thank you @Makspython69oleynik! You know a great resource is O’Reilly books. I don’t sponsor them or anything, but you can read lots of technical books such as ones in Python on their website. I believe they may still have a free trial. W3schools is good for getting a quick introduction to Python. W3resource is good if you want lots of practice exercises to do. Once you’re comfortable with the basics of Python, learn about various external modules. Learn how to build web applications with Python using either Django or Flask (or try both). Learn how to build games with PyGame, such as with these videos. Learn Numpy, Pandas and Matplotlib for data science. Build desktop applications with TKinter. Learn how to automate things on web pages with Selenium. The more modules you learn, the more you can do with Python right out of the box. There are a ton of other KZbin channels too that have great content.
@anthonydrakefordshadow10 ай бұрын
I would like to use your videos because the videos I am using are from a few years ago and there is no feedback for questions BUT it is the only videos I have found that teach “jump” from a tile. Can you map a video that includes jump in continuation to this video? Please and thank you 🙏
@alexanderfarrelltech10 ай бұрын
That is very kind. I will see about planning a platformer video in the future. It may be based on the collision detection video as part 4 of this series. Thank you for watching and for the encouragement, I hope these videos are helpful.
@anthonydrakefordshadow10 ай бұрын
@@alexanderfarrelltech I would like my player to perform jump in your current top down view, not a side view platformer if that makes sense? I sent the playlist I found that includes top down jumping, it is in video 10 of the link below. kzbin.info/aero/PLywhTYI3VhfJCkp_aQXFj_8-Ac496LmUm&si=EtsMzWl3H_2zp70k
@alexanderfarrelltech10 ай бұрын
@anthonydrakefordshadow Oh definitely. What you could do is add an altitude field to your sprite class, then when you draw the sprite, subtract the altitude from it. I've included a link to this modified sprite class for making your character jump. Observe lines 16 and 28 which add altitude to the sprite. gist.github.com/AlexanderFarrell/df7cf7b3cfec971574320d67b9ae0973 Then in your player class, you could also keep track of the jump speed. If the player presses space, and the altitude is 0, then set it to 5, and have the player then jump from there. I've included this as well, observe lines 26, and also lines 34 through 40. gist.github.com/AlexanderFarrell/3373572fa82cd7542df120d370b6f27c In addition, you might want to draw a shadow. Maybe create a separate shadow object which follows the player's feet as well. Hope this helps, if you run into issues with it let me know.
@anthonydrakefordshadow10 ай бұрын
@@alexanderfarrelltech You are the MAN!!! 🎉 I gotta go find you some Subs my guy!
@anthonydrakefordshadow10 ай бұрын
@@alexanderfarrelltech where have you been my friend 👋