CDcodes
CDcodes
  • 17
  • 416 576
Beginner Python Project From Scratch: Web Scraping Switch Game Sales and Review Scores
In this video, I'll be walking you through a real-world web scraping scenario to gather as much information as we can about the sales and review scores of Nintendo Switch games. We'll be starting from absolute scratch, and build a data set from the ground-up.
Links:
Personal Channel - www.youtube.com/@ur_homedawg
Wikipedia Table for Best-Selling Switch Games - en.wikipedia.org/wiki/List_of_best-selling_Nintendo_Switch_video_games
Full Code Repository - github.com/ChristianD37/UA-camTutorials/tree/master/Switch%20Sales%20and%20Reviews%20Scrape
Jupyter Notebook Beginner's Guide: www.dataquest.io/blog/jupyter-notebook-tutorial/
Timestamps:
Introduction: 0:00
Setup and Package Installation: 0:45
Scraping Wikipedia for the Best-Selling Switch Games: 3:00
Cleaning the Best Selling Games Table: 9:17
Scraping Metacritic Review Scores: 19:12
Creating the Metacritic Scraper (Obtaining Reviews for all Games): 31:35
Creating the Metacritic Scraper (Obtaining Reviews for all Games): 39:28
Joining the Sales and Reviews Tables: 40:51
Validation and Exporting the Table: 41:57
Final Result and Outro: 44:35
This video does not aim to be a super rigorous scraping/statistcal exercise, but rather present a learning opportunity for someone to view the process of how they can gather their own data in a real-world context.
Disclaimer: Web scrape responsibly. I am not responsible for any repercussions you may experience. Please be nice to any websites when scraping them. Provide a generous delay when scraping and consider avoiding sites that explicitly don't want to be scraped. Using a VPN is also highly recommended. I take no responsibility if you get IP banned.
Переглядів: 1 163

Відео

Beginner Python Project From Scratch: Rock Paper Scissors
Переглядів 2,5 тис.Рік тому
Follow along with me on replit: replit.com/new/python3 In this tutorial, we'll be creating this simple 1-player Rock-Paper-Scissors game using python. Despite being simple, there's a lot to learn about Python and coding in this small little project. The video assumes you know a bit about some of the basics of coding (variables, if-statements, and while loops). Everything else is explained in mo...
Beginner Python Project From Scratch: Tic Tac Toe
Переглядів 63 тис.2 роки тому
Follow along with me on replit: replit.com/new/python3 In this tutorial, we'll be creating this simple 2-player tic-tac-toe game using python. This was my first assignment when I took Intro to Programming in University, so I thought it be a fun little game for beginners to tackle. Despite being simple, there's a lot to learn about Python and coding in this small little project. The video assume...
Pygame Saving and Loading Tutorial: Creating Customizable Controls
Переглядів 8 тис.3 роки тому
In this tutorial, we're going to see how we can use Saving and Loading to create customizable controls and profiles to enhance a player's options and experience. Download the font: dl.dafont.com/dl/?f=retro_gaming Github repository for this Tutorial: github.com/ChristianD37/UA-camTutorials/tree/master/CustomControls Personal Channel - www.youtube.com/@ur_homedawg Links to other videos: Game Sta...
Pygame Game States Tutorial: Creating an In-game Menu using States
Переглядів 30 тис.3 роки тому
In this video, we are going to create a flexible game state framework that will allow us to create an in-game menu using Pygame. This is an expansion on some of the ideas from the Menu Tutorial, which is my most popular one. Download the assets folder: drive.google.com/drive/folders/19pJEYsdqwJUA53sQtLGf0BPqgl4ZzrKb?usp=sharing Links to other Videos: Framerate Independence - ua-cam.com/video/Xu...
Pygame Framerate Independence Tutorial: Delta Time Movement
Переглядів 18 тис.3 роки тому
In this video, we'll discuss Framerate Independence. We'll learn how we can implement delta time movement and make our games play consistently across different hardware. This was a topic I briefly touched, but wanted to go into more detail. Code can be found on my github: github.com/ChristianD37/UA-camTutorials/tree/master/Framerate Independence Personal Channel - www.youtube.com/@ur_homedawg M...
Pygame Platformer - New Levels and Swimming (Natural Selection Devlog #2)
Переглядів 2,5 тис.3 роки тому
An update on the progress I've made with my 2D Platformer titled "Natural Selection." The game is made using pygame and planned to be released for free when a playable build is ready. All code and assets for Natural Selection can be found on the Github: github.com/ChristianD37/UA-camTutorials Personal Channel - www.youtube.com/@ur_homedawg Like the cover art? Follow junmetry on Instagram: insta...
Pygame Tile Based Game Tutorial: Collisions
Переглядів 14 тис.3 роки тому
In this video, we'll discuss AABB tile collisions. We'll learn how to detect collisions in Pygame and how our player should interact with the collided tiles. Code can be found on my github: github.com/ChristianD37/UA-camTutorials/tree/master/Tile Collisions Personal Channel - www.youtube.com/@ur_homedawg More an AABB collisions: developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_det...
Pygame Tile Based Game Tutorial: Physics and Delta Time
Переглядів 14 тис.3 роки тому
In this video, we'll discuss player physics and framerate independence. We'll learn how we can create a player character that has fluid and fun movement. Code can be found on my github: github.com/ChristianD37/UA-camTutorials/tree/master/Physics Personal Channel - www.youtube.com/@ur_homedawg Download tiled: www.mapeditor.org/ Previous video in the series: ua-cam.com/video/37phHwLtaFg/v-deo.htm...
Pygame Tile Based Game Tutorial: Tilemaps
Переглядів 52 тис.3 роки тому
In this video, we'll discuss tilemaps. We'll learn how we can create them using Tiled, as well as how we can parse them into pygame. Code can be found on my github: github.com/ChristianD37/UA-camTutorials/tree/master/Tilemap Download tiled: www.mapeditor.org/ Personal Channel - www.youtube.com/@ur_homedawg My video on sprite sheets: ua-cam.com/video/ePiMYe7JpJo/v-deo.html Music: Pokemon Gold/Si...
Pygame Tutorial: Add Playstation 4 Controller Support
Переглядів 12 тис.3 роки тому
In this video, I'll be showing how you can use a Playstation 4 Controller with your game or python program using pygame. The PS4 controller can be hooked up to your PC with either a USB cable or bluetooth. The .json file containing the button keys and the test.py file I used can be downloaded here: github.com/ChristianD37/UA-camTutorials/tree/master/PS4 Controller Join my discord: discord.gg/qu...
Pygame Camera Tutorial: How to Make a Side-Scrolling Camera System
Переглядів 22 тис.3 роки тому
In this tutorial, we'll be creating a camera side-scrolling camera system. We'll learn how scrolling works and how we can make our camera as flexible as possible. All code/images can be found on my github: github.com/ChristianD37/UA-camTutorials/tree/master/Camera System Questions? Join the discord: discord.gg/qu8a7DfK2X Timestamps: Intro to cameras in side-scrollers: 0:09 Creating the Camera C...
Pygame Animation Tutorial: How to Animate a Player Character
Переглядів 10 тис.3 роки тому
In this video, we're going to be animating my cat Poppy. You'll learn how Animation works and how you can add animation to your game today! All code/images can be found on my github: github.com/ChristianD37/UA-camTutorials/tree/master/Animation Questions? Join the discord: discord.gg/qu8a7DfK2X Timestamps: What is Animation: 0:19 File Setup (If you wanna follow along): 1:41 Making a simple Play...
Pygame Sprite Sheet Tutorial: How to Load, Parse, and Use Sprite Sheets
Переглядів 51 тис.4 роки тому
In this tutorial, we'll be learning all about sprite sheets. We'll discuss why we use them, and how you can start implementing them into your games immediately. Code and images for this tutorial can be downloaded at: github.com/ChristianD37/UA-camTutorials/tree/master/spritesheet Texture Packer: www.codeandweb.com/texturepacker Personal Channel - www.youtube.com/@ur_homedawg Pokemon Trainer spr...
Pygame Menu System Tutorial Part 2: Building the Menu and States
Переглядів 35 тис.4 роки тому
Pygame Menu System Tutorial Part 2: Building the Menu and States
Pygame Menu System Tutorial Part 1: Game Loops and Structure
Переглядів 78 тис.4 роки тому
Pygame Menu System Tutorial Part 1: Game Loops and Structure

КОМЕНТАРІ

  • @P37rich0r
    @P37rich0r 7 днів тому

    Just learn pixel art properly or pay an artist. The style will never match your project and it just looks flat-out bad. Your original pixel art looks fine but the AI crap should be left out at all costs.

  • @Amateurartist111
    @Amateurartist111 8 днів тому

    Thank you

  • @icefox2638
    @icefox2638 13 днів тому

    Idk man heard that other artists are offended by this

  • @30sec_amv44
    @30sec_amv44 24 дні тому

    Thank you

  • @isaacqadri
    @isaacqadri Місяць тому

    Thank man

  • @robertm.schwab5800
    @robertm.schwab5800 Місяць тому

    Terrific video on an important topic. Very helpful.

  • @wqs12345
    @wqs12345 Місяць тому

    Is it possible to have it create the same portrait with different expressions? The trouble with AI tools for me is that it’s impossible to get them to replicate a result with only the change you wish for.

    • @CDcodes
      @CDcodes Місяць тому

      To my knowledge it's not directly possible with this tool (yet). I've seen some other AI pixel art tools but haven't tried them myself

    • @wqs12345
      @wqs12345 Місяць тому

      @@CDcodesthanks for letting me know! It looks solid enough for what it does so I may have to try it out!

  • @patriciamaher597
    @patriciamaher597 2 місяці тому

    How do I scale

  • @i_teleported_bread7404
    @i_teleported_bread7404 2 місяці тому

    How do I work out what the values should be for my "self.left_border", "self.right_border" and "self.ground_y" variables? Also, in the Github files for this, it references a "self.box" variable, but it doesn't seem to do anything in the code. What is it used for?

  • @justcallmespike5162
    @justcallmespike5162 2 місяці тому

    I can't find the part where you define "player.ground_y", "player.left_border" or "player.right_border".

  • @marmont8005
    @marmont8005 2 місяці тому

    Thank you very much, bro! Excellent and clearly understandable example

    • @CDcodes
      @CDcodes 2 місяці тому

      Happy to help!

  • @W-uq7pc
    @W-uq7pc 2 місяці тому

    yo is that visual code? or smth cuz i see it familiar

    • @CDcodes
      @CDcodes 2 місяці тому

      It is replit link in the description

  • @justcallmespike5162
    @justcallmespike5162 2 місяці тому

    My spritesheet renderer doesn't use the JSON metadata, would it work if instead using the list [myspritesheet.parse_sprite("frame_1.png"),myspritesheet.parse_sprite("frame_2.png")... myspritesheet.parse_sprite("frame_n.png")] I were to instead use the list [myspritesheet.getsprite(x, y, w, h), myspritesheet.getsprite(x2, y2, w2, h2)... myspritesheet.getsprite(xn, yn, wn, hn)]

    • @CDcodes
      @CDcodes 2 місяці тому

      You'd have to modify the function a bit, but it should work

  • @i_teleported_bread7404
    @i_teleported_bread7404 2 місяці тому

    I followed all of the code (up to before the json part), but when I tried with my sprites, it didn't render them, and I can't figure out why.

  • @user-ll2om1kv7y
    @user-ll2om1kv7y 2 місяці тому

    Amazing

  • @lsk21kr
    @lsk21kr 2 місяці тому

    **then velocity change enters the room**

    • @lsk21kr
      @lsk21kr 2 місяці тому

      meaning that you need to find the average value of velocity when acceleration is involved. Adding acc*dt to the velocity and vel*dt to the position does not give you the exact position at that point, but the position between that point and next point. And of course this difference can ruin your physics engine giving different output by varying framerate.

  • @mikaa2557
    @mikaa2557 3 місяці тому

    Hey I love it ❤ I am also in data science and I am wanting to learn to develop game. Can i know how you learnt the physics behind the game tutorial of pygame was it some books or some video. Pls recommend me some if you can

    • @CDcodes
      @CDcodes 2 місяці тому

      Thank you! Lots of trial and error honestly. Looking through different tutorials, github repositories and stack overflow. Chatgpt will also be an awesome tool here!

    • @mikaa2557
      @mikaa2557 2 місяці тому

      @@CDcodes amazing I admire you! can I connect with you on linkedn?

  • @foreducation408
    @foreducation408 3 місяці тому

    such an awesome tutorial.

  • @kayes8174
    @kayes8174 3 місяці тому

    Hi. I have an error saying: TypeError: object.__init__() takes exactly one argument (the instance to initialize)

  • @ByagoonaCOOL
    @ByagoonaCOOL 3 місяці тому

    Hey man I just finished my Cs project this video was a massive help and really boosted my confidence using json files and the concpet of spritesheets. Thank you sm !!!!

    • @CDcodes
      @CDcodes 3 місяці тому

      Right on, happy it helped : )

  • @acrilyce4006
    @acrilyce4006 4 місяці тому

    how would you create collison rect for a slope

  • @JuliaPOWERR
    @JuliaPOWERR 4 місяці тому

    after many videos, this is one of the best for learning sprite sheets as a complete beginner, thank you.

  • @lightcrowd42040
    @lightcrowd42040 4 місяці тому

    I am having difficulties getting this to work, there are also some files I'm noticing are in the program, but that you haven't said anything about. (spritesheet. py and spritesheet.json)

  • @therealbestgage
    @therealbestgage 4 місяці тому

    How can you call yourself an artist if you're using AI? You're a thief, you don't deserve to call yourself an artist. The pixel art that you made is good. You could learn how to make the portrait yourself instead of resorting to the theft of other people's efforts. I hope you understand that you are a disgrace upon artistry.

  • @raindropcomsen
    @raindropcomsen 4 місяці тому

    Deliciously nerdy! Tasty Py!

  • @servantofourlordjesuschris6456
    @servantofourlordjesuschris6456 5 місяців тому

    I have a question. I have like lots of different pictures or tiles that don't have names. What do I do here? in the json file, it doesn't specifically say any names about the tiles. It says something like this: { "columns":18, "image":"..\/..\/..\/..\/Library\/Mobile Documents\/com~apple~CloudDocs\/Pygame Project\/Grounds 1-100\/Block-Land-16x16\/World-Tiles.png", "imageheight":1392, "imagewidth":288, "margin":0, "name":"Mario Tileset", "spacing":0, "tilecount":1566, "tiledversion":"1.10.2", "tileheight":16, "tilewidth":16, "type":"tileset", "version":"1.10" } I just went to the tile set in the tile editor and exported the tile set as a json file. I don't know what to do here. Notice how each tile doesn't have a name. And even if I do have names, should I just cite like 200 of them all? for row in map: x = 0; for tile in row: if tile == '0': self.start_x, self.start_y = x * self.tile_size, y * self.tile_size; elif tile == '1': tiles.append(Tile('Map/World-Tiles.png', x * self.tile_size, y * self.tile_size, self.spritesheet)); elif tile == '2': tiles.append(Tile('Map/World_Tiles.png', x * self.tile_size, y * self.tile_size, self.spritesheet)); I'm confused.

  • @Pygame-nc5be
    @Pygame-nc5be 5 місяців тому

    Thanks a lot man that was incredibly helpful

  • @anomalouschaz
    @anomalouschaz 5 місяців тому

    man I have rewatched this video so many times this weekend, you made me change my whole code this video literally took me out of tutorial hell, 100% recommended I never understood inheritance and how to pass a whole game object into another engine object until now... you made me convert all of my noob code into very concise functions... this is one of the best tutorials and channels I've found so far about pygame, thanks! please keep the videos coming you're an amazing teacher!

    • @CDcodes
      @CDcodes 5 місяців тому

      Love to hear that this video was able to help! Cheers : )

  • @user-pw4cq7cp8v
    @user-pw4cq7cp8v 5 місяців тому

    First, I wanted to write code like this to calculate that stuff, but decided to search on youtube. Thanks, man., you did it for me.)

  • @saigonesepapaya
    @saigonesepapaya 5 місяців тому

    really helpful tutorial!

  • @jovinull4549
    @jovinull4549 6 місяців тому

    Hey friend, how do I create usable items, like potions, in PyGame?

  • @apalladium5k
    @apalladium5k 6 місяців тому

    I guess I'm a little late but this is still informative. Thank! Also, if you havn't used it, enumerate() makes those 'for' loops much prettier.

  • @Forakus
    @Forakus 6 місяців тому

    this json method feels very unnecessary, it's a good tutorial but for a poor implementation that requires a paid program to be efficient... 90% of spritesheets are consistent grids that shouldn't require a json like this

  • @thomasyusuf1366
    @thomasyusuf1366 7 місяців тому

    thank you for an amazing video. However im a little confused about line 19 in main file. How does that check if there is an X or O. The last part isnt even a dictionary. Id appreciate a response thanks :)

    • @CDcodes
      @CDcodes 6 місяців тому

      We start by equaling the previous turn to the current turn (Line 19). Because there's an infinite number of things the player can enter other than a correct board position, the idea is that we assume whatever they give us is invalid input. If they provide invalid input, we don't change the turn. If they actually give us an valid board position, then we increment the turn counter. When the next iteration of the loop occurs, it will check to see if the turn counter when up or not by comparing it to the previous turn. If it didn't, then our assumption that the player would give us something wrong is correct. so we want to print an error message for them.

  • @adityask865
    @adityask865 7 місяців тому

    I am getting the error "pygame: font is not initialised" whenever I run the code, I have copied the tutorial code exactly and got the font required

  • @Simon-on6jv
    @Simon-on6jv 7 місяців тому

    Which application are you using??

    • @CDcodes
      @CDcodes 6 місяців тому

      replit, link is in the description

  • @ImJustSemmothy
    @ImJustSemmothy 8 місяців тому

    Thata actually pretty cool. Got a sub. Remember me.

  • @GodSahil
    @GodSahil 8 місяців тому

    "churn" lol

  • @thenamewhowillknockksidown7333
    @thenamewhowillknockksidown7333 8 місяців тому

    i didnt quite get the file name thing ,

  • @tameemwahab8752
    @tameemwahab8752 8 місяців тому

    its not working, at 2:03 draw_board has a red line underneath it so it isnt working im doing everything the video tells me to

  • @shady5063
    @shady5063 8 місяців тому

    Hi could you do a similiar video, but for moving in any direction and the camera follows you. I think its referred to as "box camera"

  • @SMCwasTaken
    @SMCwasTaken 9 місяців тому

    Hoenn, Sinnoh and Kalos music >>>>>>> Johto Music

  • @LRGEGO
    @LRGEGO 9 місяців тому

    6:00

  • @AaronProgZ
    @AaronProgZ 9 місяців тому

    This is a well put together tutorial video. Thanks for making it!

  • @jamestogher1098
    @jamestogher1098 10 місяців тому

    This is a good tutorial and works well for the tutorial but I'm having trouble transferring it over to a real game. When trying to implement it into my own game with a larger map and where I will need the tiles to scroll/move I don't see exactly how we are suppose to do that with this code. It looks as though all the tiles get drawn once right at the beginning and that's it. Has anyone had a similar problem and solved it? EDIT: I noted around 9:28 you said I would have to store them in a separate list and draw them every frame could you explain this a bit more please?

  • @Bettybarnes42
    @Bettybarnes42 10 місяців тому

    I don't understand how prev_turn == turn results in an invalid entry. Can someone help me understand?

    • @Andrzejkl94
      @Andrzejkl94 9 місяців тому

      is it after an if? if it is, it should be if prev_turn == turn: so if theres no if, you only need to put only one "="; prev_turn = turn "==" checks if two values are equal, "=" is (for example) to assign a value to a variable AND OF COURSE, IM STILL LEARNING TOO, i've started coding 2 weeks ago, i could be completely wrong, but thats what i understood ATM

  • @user-tn9os8qf2y
    @user-tn9os8qf2y 11 місяців тому

    how do you use two controllers, I get how to have a 2nd one detected but that's it.

  • @vmartme
    @vmartme 11 місяців тому

    Awesome info! Thank you so much :)

  • @user-tn9os8qf2y
    @user-tn9os8qf2y 11 місяців тому

    what if I just took the difference between the set fps and the current fps and then in the next line set the fps where you add the difference to the fps for that loop?

  • @dominiknowec9837
    @dominiknowec9837 11 місяців тому

    isn't that troubling that rectangles are in completly diffrent places than their surfaces? This approach looks a little odd to me.