You make great and inspiring videos, Tim. I love them a lot for new inspiration. However, I stopped at this one 39:04 and thought a bit. I probably missed the purpose of this game - dont know it. But the code is defenetely something I don't want to see in a huge project: The function get_random_pos. 1) Minor... the first two lines are of absolutely of no use (in python) 2) using a key which seems strange (unless I read all the code) into an iterable that I dont know about. 3) Worst. This function could run forever
Reality is realising that you will forever be disappointed in yourself if you compare yourself to others. Many people don't get that that statement really means. It means the someone will always be better than you at something because they have more experience and sometimes an experience you will never truly match unless you put your heart to it.
Love watching your videos I do have a question about the logic for determining tile colors though at 24:50. Obviously there’s no “right” answer but wondering why not just have the colors be a dict with the possible tile values as the keys and you could simply just get the color tuple from using the tile value as an index. Just curious for any specific reasoning or just simply the reason of just done in another way 🙂
tim always dropping very easy to follow guides and i was wondering if someone had coded this i tried to on my own then found this video on got my version working after some tweeks!
Hey Tim! I was wondering if sometime you could make a video on how to make a web application with sign-ins (maybe using Choreo or something) to which I can just add pygame applications and play them so I can share them with friends?
Very nice! Been playing it a bit on a 8x8 grid. I noticed some unwanted behaviour in certain conditions though. Sometimes three 4's f.e. merge in one 8... I think when all 4's are. moving. Haven't figured it out yet. Thought you should know. Tnx for your channel. It really helps me a lot as a hobbiist "programmer". I try to motivate the son (12yo) of my girlfriend to use his laptop not only for Fortnite, and he likes your teaching style as well. Keep it up!
Hey Tim, I was wondering if it is possible to make a scoring system in the game. I've coded the entire program and just wanna add some final touch ups!
Hey bro I just wanted to say props to u for how good u did in that interview 4 years ago with Clement Mihailesco, I just watched the whole video again and tried to solve the same problem as you but in c++ it's a cool way to kind of get a feel for what you could expect in a real interview and I hope to get one soon enough. Btw any advice on how to land an internship at some of the sligtly bigger companies and also i'm not from the US so an in person internship isn't a possibility. Appreciate you 💜
So I decided to rest from this video for now, because I am getting too much info overload on the movement functionality. But I'll get back to it soon. HOWEVER, if there are anyone here, Android devs, wondering how to do this but with touch screen controls instead of keyboard, I made something that is admittedly not perfect, but a simple way to detect swiping. Here is how I detect if the user swiped up or down (go code the right and left, as well as a way to tell if the user meant to go on the y or x axis.): def main(window): clock = pygame.time.Clock() run = True tiles = generate_tiles() track_finger_x = [] track_finger_y = [] while run: clock.tick(FPS) for event in pygame.event.get(): if event.type == pygame.QUIT: run = False break elif event.type == pygame.FINGERMOTION: print("Triggered Down") track_finger_x.append(event.x) track_finger_y.append(event.y) elif event.type == pygame.FINGERUP: print("Triggered Up") if len(track_finger_y) == 0: continue elif len(track_finger_y) > 0: if track_finger_y[0] > track_finger_y[len(track_finger_y) - 1]: print("Moved up") elif track_finger_y[0] < track_finger_y[len(track_finger_y) - 1]: print("Moved down") track_finger_y.clear()
I also forgot to remove the print, but I used those for debug during the coding process. I couldn't find a lot of tutorials online about Pygame swipe, and the FINGERMOTION.dy object is only measuring too short distances to be of any use.
It would be nice, if the game gave users some kind of final score. score = sum([tile.value for tile in tiles.values()]) print(f"Your score - {score}") And not only in konsole, but in actual game board. Thanks for the tutorial. Learning.
I am following the tutorial and its really good everything is worker except for my boundary_check in the if statement is saying that boundary_check is not a thing even though i have boundary_check = lambda tile: tile.col == 0. Please help
To learn programming and Python - Check out Datacamp!
Learn Python: datacamp.pxf.io/ba4zym
Learn Programming: datacamp.pxf.io/3e6xOy
you're the only person who still walks us through how to use pip 😅
keep it up!
You are the only one person who teached me Socket programming correctly in 2021. 3 years passed
This is really an excellent channel on Python like "techie talkee"
You make great and inspiring videos, Tim. I love them a lot for new inspiration. However, I stopped at this one 39:04 and thought a bit. I probably missed the purpose of this game - dont know it. But the code is defenetely something I don't want to see in a huge project: The function get_random_pos. 1) Minor... the first two lines are of absolutely of no use (in python) 2) using a key which seems strange (unless I read all the code) into an iterable that I dont know about. 3) Worst. This function could run forever
I was thinking these days about how would I make grids in my python games. Then this tutorial came out.
I am sold that Tim is a fcking mind reader.
Wtf bro you made better frontend in python than me in HTML😢
reality is often disappointing
Reality is realising that you will forever be disappointed in yourself if you compare yourself to others. Many people don't get that that statement really means. It means the someone will always be better than you at something because they have more experience and sometimes an experience you will never truly match unless you put your heart to it.
Hahah yeah trio
Awesome Tim!
Great content, clear explanation! Keep it up!
Whoa sweet 🤘🏽🔥
bro perfect tutorial keep it up | now im going to edit it by changing the colors a bit
Love watching your videos I do have a question about the logic for determining tile colors though at 24:50.
Obviously there’s no “right” answer but wondering why not just have the colors be a dict with the possible tile values as the keys and you could simply just get the color tuple from using the tile value as an index.
Just curious for any specific reasoning or just simply the reason of just done in another way 🙂
tim always dropping very easy to follow guides and i was wondering if someone had coded this i tried to on my own then found this video on got my version working after some tweeks!
Great content and so clear explanation thanks Tim😊❤
I'd rather see an enhanced/updated version of your high school game of mini-golf or whatever that game was. LOL That looked like simple fun.
Hey Tim! I was wondering if sometime you could make a video on how to make a web application with sign-ins (maybe using Choreo or something) to which I can just add pygame applications and play them so I can share them with friends?
Great video i learn a lot how to use pip and about selecting interpreter thank you
Very nice! Been playing it a bit on a 8x8 grid. I noticed some unwanted behaviour in certain conditions though. Sometimes three 4's f.e. merge in one 8... I think when all 4's are. moving. Haven't figured it out yet. Thought you should know.
Tnx for your channel. It really helps me a lot as a hobbiist "programmer". I try to motivate the son (12yo) of my girlfriend to use his laptop not only for Fortnite, and he likes your teaching style as well. Keep it up!
Hey Tim, I was wondering if it is possible to make a scoring system in the game. I've coded the entire program and just wanna add some final touch ups!
Hey bro I just wanted to say props to u for how good u did in that interview 4 years ago with Clement Mihailesco, I just watched the whole video again and tried to solve the same problem as you but in c++ it's a cool way to kind of get a feel for what you could expect in a real interview and I hope to get one soon enough. Btw any advice on how to land an internship at some of the sligtly bigger companies and also i'm not from the US so an in person internship isn't a possibility. Appreciate you 💜
So I decided to rest from this video for now, because I am getting too much info overload on the movement functionality. But I'll get back to it soon.
HOWEVER, if there are anyone here, Android devs, wondering how to do this but with touch screen controls instead of keyboard, I made something that is admittedly not perfect, but a simple way to detect swiping. Here is how I detect if the user swiped up or down (go code the right and left, as well as a way to tell if the user meant to go on the y or x axis.):
def main(window):
clock = pygame.time.Clock()
run = True
tiles = generate_tiles()
track_finger_x = []
track_finger_y = []
while run:
clock.tick(FPS)
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
break
elif event.type == pygame.FINGERMOTION:
print("Triggered Down")
track_finger_x.append(event.x)
track_finger_y.append(event.y)
elif event.type == pygame.FINGERUP:
print("Triggered Up")
if len(track_finger_y) == 0:
continue
elif len(track_finger_y) > 0:
if track_finger_y[0] > track_finger_y[len(track_finger_y) - 1]:
print("Moved up")
elif track_finger_y[0] < track_finger_y[len(track_finger_y) - 1]:
print("Moved down")
track_finger_y.clear()
I also forgot to remove the print, but I used those for debug during the coding process.
I couldn't find a lot of tutorials online about Pygame swipe, and the FINGERMOTION.dy object is only measuring too short distances to be of any use.
34:29 I get absoluteerror: ‘Tile’ object has no attribute ‘draw’
Best Python Game Developer in Town 🥹
Never in my life I thought you would be able to code one of my fav. game in Python ❤
Can you make a Tutorial about OpenGL in Python ?
amazing!
Hi Tim! Can you please make more videos on web development?
Just to think I am currently hooked on this game at the moment :)
Hello Tim. I am having 3-4 years of experience with python, what do you recommend to do in order to improve my skills? Thank you.
You are the best
What theme do you use. I love your theme
Can you tell me what version of VS Code are you using Tim! Thanks!
It would be nice, if the game gave users some kind of final score.
score = sum([tile.value for tile in tiles.values()])
print(f"Your score - {score}")
And not only in konsole, but in actual game board.
Thanks for the tutorial. Learning.
I noticed at 5:43, you put "RGV" instead of "RGB," I assume that's a typo? Also, later it says PI GAME instead of PYGAME.
Yes it’s a typo
Tim, Love you content and I appreciate it
Can you please make a video on python PANDAS module
Can you make a tutorial in htmx and flask
I am following the tutorial and its really good everything is worker except for my boundary_check in the if statement is saying that boundary_check is not a thing even though i have boundary_check = lambda tile: tile.col == 0. Please help
added game over text , escape key to restart option, now trying to display win message when 2048 is reached.
There is an error to fix, because when there are four 4 in a line, they merge into a 8 and a 4...
bro I copy pasted your code on vscode and it is showing syntax error i did install pygame before but still
In the bottom right corner, there should be a version of python. Click on that and choose another version until it works
This game is from 2048. Far from future
19:14
also a 4 merged into a 16 but never mind🤪
game over kaha hai isme game over likha bhi to ana chaiye game chlta hi jara h
pygame has no attribute init very bad tutorial no one should watch this