Awesome Intermediate Python Project: Building an Aim Trainer…

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 36

  • @TechWithTim
    @TechWithTim  11 месяцев назад +1

    Code in this video: github.com/techwithtim/Python-Aim-Trainer

  • @1hoodpharm
    @1hoodpharm Год назад +25

    i see tim , i click… simple

  • @cr370
    @cr370 Год назад +4

    Thanks for what you do. I'd like to get the feel of the jobs offered out there. Can you go through what is requested in a job that you've done, from the beginning, what you have to interface with, to the end. This may be a good series for your channel. Thanks

  • @averagegamer9513
    @averagegamer9513 Год назад +3

    At 29:13, I don’t see why you couldn’t swap the values inside the squaring operation. At least mathematically, it wouldn’t change anything. Does this have to do with implementation of math in Python, or was it simply to ensure readability/clarity?

  • @paulthomas1052
    @paulthomas1052 Год назад +1

    Great code and useful logic. Thanks.

  • @Beardedmane901
    @Beardedmane901 Год назад +1

    Tim content be 🔥🔥🔥🔥

  • @python703
    @python703 Год назад

    Thnx Tim. Good job

  • @takisbezaitis7741
    @takisbezaitis7741 Год назад +6

    Great content! I would like to ask you if pygame is still popular or arcade library (or another library) will take its place.
    Thanks!

  • @blackestbill7454
    @blackestbill7454 Год назад

    amazing, thanks so much!

  • @manosmakris8308
    @manosmakris8308 Год назад +14

    There is an error in this code. If the user doesn't click at all and let its lives go to zero there is a ZeroDivisionError at the end_screen() when we try to calculate the user's accuracy. If someone wants to make the end_screen() more bulletproof try this:
    def end_screen(win, analytics):
    win.fill(BG_COLOR)
    time_label = LABEL_FONT.render(f"Time: {format_time(analytics.elapsed_time)}", 1, "white")
    speed = round(analytics.targets_pressed/analytics.elapsed_time, 1)
    speed_label = LABEL_FONT.render(f"Speed: {speed} t/sec", 1, "white")
    hits_label = LABEL_FONT.render(f"Hits: {analytics.targets_pressed}", 1, "white")
    # This is the changed part
    # ------------------------------------------------------------------------------------------------------------------------ #
    try:
    accuracy = round(analytics.targets_pressed / analytics.clicks * 100, 1)
    except ZeroDivisionError as e:
    accuracy = 0.0
    # ------------------------------------------------------------------------------------------------------------------------ #
    accuracy_label = LABEL_FONT.render(f"Accuracy: {accuracy}%", 1, "white")
    exit_label = LABEL_FONT.render("Press any key to exit...", 1, "white")
    win.blit(time_label, (center_label(time_label), 50))
    win.blit(speed_label, (center_label(speed_label), 150))
    win.blit(hits_label, (center_label(hits_label), 250))
    win.blit(accuracy_label, (center_label(accuracy_label), 350))
    win.blit(exit_label, (center_label(exit_label), 450))
    pygame.display.update()
    while True:
    for event in pygame.event.get():
    if (event.type == pygame.QUIT or
    event.type == pygame.KEYDOWN):
    quit()

  • @Andrew-Tsegaye
    @Andrew-Tsegaye Год назад +2

    Please please 🙏 Tim, can you add an AI feature or pinch industry grade algorithms to go a little bit deeper?

  • @researchchannel1767
    @researchchannel1767 Год назад +4

    Next video: "I train an ai to play valorant and becomes pro in it using python"
    (i hope you make it, any games will do) btw first third comment

    • @remot1
      @remot1 Год назад

      I really hope he does

  • @sungod595
    @sungod595 Год назад +3

    Hey Tim, Can you please point me yo the video where you listed all python topics graded as Begineer ,Intermediate etc. I checked the playlist several times but i could not find the List ,
    Your content is awesome.
    Thanks

    • @LotOFfactories
      @LotOFfactories Год назад

      👾👾👾👾👾👾👾👾👽👽👽👽👽👽👽🤖🤖🤖🤖🤖🤖🤖🤖👿👿👿👿👿💀☠☠☠☠☠💀☠☠☠💀💀💀☠☠☠💀☠

  • @johnbett-bv6zi
    @johnbett-bv6zi Год назад +2

    hello there..john from Africa

  • @proparamyt
    @proparamyt Год назад

    Nice!!

  • @andrewanastasiades6819
    @andrewanastasiades6819 Год назад +1

    Hey Tim! Love the PyGame tutorials. Do you have advice for building web-deployable game applications? Is there a solution that’s optimal for those of us who are stronger backend OOP programmers? Maybe a video creating the same game in a different language/framework would be cool

  • @Vilnius_Chillinus
    @Vilnius_Chillinus Год назад +1

    I literally made this a few weeks ago haha

  • @Nordlys0
    @Nordlys0 Год назад

    Nice..

  • @kejingladison
    @kejingladison Год назад

    Cool

  • @buzzprime93
    @buzzprime93 Год назад

    Can you do some Deep learning projects ? Plz

  • @palashjyotiborah9888
    @palashjyotiborah9888 Год назад +2

    Ask ChatGPT:
    Write me an aim trainer game in python 😂 which Tech with Tim showed on 25th June 2023

  • @Ieudnosidnew
    @Ieudnosidnew Год назад

    How many years have you been studying coding?

  • @muhammaddarab7474
    @muhammaddarab7474 Год назад

    Please continue Rust Course. Thank You

  • @teodora382
    @teodora382 Год назад

    Can you post the code on github , 'cause I have an error and I can't find out what the problem is ?

  • @festus6045
    @festus6045 Год назад

    Cn you explaiun "GROWTH_RATE", i am not clear

  • @Hamza.m195
    @Hamza.m195 Год назад +2

    First

  • @Rorzilla_racing
    @Rorzilla_racing Год назад

    could someone show me some code for a play again button

    • @ahhapyahhapy2950
      @ahhapyahhapy2950 Год назад +2

      import math
      import random
      import time
      import pygame
      pygame.init()
      WIDTH, HEIGHT = 800, 600
      WIN = pygame.display.set_mode((WIDTH, HEIGHT))
      pygame.display.set_caption("Adam's Aim Trainer")
      TARGET_INCREMENT = 400
      TARGET_EVENT = pygame.USEREVENT
      TARGET_PADDING = 30
      BG_COLOR = (0, 25, 40)
      LIVES = 3
      TOP_BAR_HEIGHT = 50
      LABEL_FONT = pygame.font.SysFont("comicsans", 24)
      class Target:
      MAX_SIZE = 30
      GROWTH_RATE = 0.2
      COLOR = "red"
      SECOND_COLOR = "white"
      def __init__(self, x, y):
      self.x = x
      self.y = y
      self.size = 0
      self.grow = True
      def update(self):
      if self.size + self.GROWTH_RATE >= self.MAX_SIZE:
      self.grow = False
      if self.grow:
      self.size += self.GROWTH_RATE
      else:
      self.size -= self.GROWTH_RATE
      def draw(self, win):
      pygame.draw.circle(win, self.COLOR, (self.x, self.y), self.size)
      pygame.draw.circle(win, self.SECOND_COLOR, (self.x, self.y), self.size * 0.8)
      pygame.draw.circle(win, self.COLOR, (self.x, self.y), self.size * 0.6)
      pygame.draw.circle(win, self.SECOND_COLOR, (self.x, self.y), self.size * 0.4)
      def collide(self, x, y):
      dis = math.sqrt((self.x - x)**2 + (self.y - y)**2)
      return dis

  • @SSJwalker
    @SSJwalker Год назад

    Tim can build aimlabs

  • @coding_ac6601
    @coding_ac6601 Год назад +1

    Aim Training 😂

  • @tcgvsocg1458
    @tcgvsocg1458 Год назад

    and by the way THX A LOT for not showing your face when you coding! (your not uggly but we don t need to see your face when coding

  • @GRSG_tech
    @GRSG_tech Год назад +1

    me be like;
    roses are red violet's are blue; your code is my property :)
    TIM BTW, i am sending dm in your discord please respond man i am waiting for months