Coding Challenge #72: Frogger - Part 3

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

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

  • @MrMagic1163
    @MrMagic1163 7 лет назад +18

    I paused your first part and started to make my own frogger, I did mine in canvas and coffeescript. Was fun to see we had similar approaches and struggles here and there.

  • @640kiboughttobeenough
    @640kiboughttobeenough 7 лет назад +1

    The right is if (frog.y < height-grid*5 && frog.y > grid) else the eighth row of logs will dont work. Frog will not attach and think that is safety zone.

  • @TheMusicKing0906
    @TheMusicKing0906 7 лет назад

    hands down best coding channel on yt

  • @MrMyhz
    @MrMyhz 7 лет назад

    @The Coding Train At 20:00 If you move to a log, stay on it for a bit and then step back to the safety lane the frog's position may no longer be evenly divisible by 50 as it's position is no longer being multiplied by the grid length, but is instead altered relative to the speed of the log it's currently attached to.
    Essentially this makes it possible for part of the frog to go off the screen, an issue which you originally fixed in an earlier video. Not sure if it matters, just found it a bit interesting. Well, one possible issue off the top of my head is that may need to be "on the grid" to hit the lillypads depending on how you calculate the intersection there.
    Great work as always though, absolutely love your videos.

  • @montetribal
    @montetribal 7 лет назад

    Just noticed that, the bell, while a nice inclusion for the watchers to focus for a sec, is also a nice little trick for video editing, making it easier for him to find the parts to edit too. Nice

  • @smntms
    @smntms 6 лет назад +4

    Really liked It.
    I stuck at 1:52 because my cars did't came back. I was searching for 15 minutes, than at 7:20 you saw it too.
    The frog is not moving with the log in the top row

    • @aaronh4944
      @aaronh4944 5 лет назад

      On the line: if (frog.y < height-grid*5 && frog.y > grid*2) { you remove the *2 I believe it fixes some issues.

  • @abhishektripathi2028
    @abhishektripathi2028 7 лет назад

    best coding channel on RUclips.

  • @tedjammers
    @tedjammers 7 лет назад

    What an enjoyable time. Thanks for these videos.

  • @Tutterzoid
    @Tutterzoid 4 года назад

    Thanks for making this video Super Clear .. Even easy to read in 360p :)

  • @black_squall
    @black_squall 7 лет назад

    Great job, thanks for all your hard work!

  • @imahater9978
    @imahater9978 7 лет назад +7

    You know... Im just 11 years old and learn coding! That is all because you, other you tubers are boring in this kind of videos! But you... You are funny smart, informercial and so "NOT BORING" (: You can code something very fast, faster than other people. Please never stop with youtube! You are funnier than comedy you-tuber but you are a developer and funny that is sooo cool! Be glad that your 275k fans are all cool guys!!!!!!! (-: Have a nice day!

  • @Wewannaplay
    @Wewannaplay 7 лет назад

    You are amazing man! great work!

  • @YarianZy
    @YarianZy 7 лет назад

    Daniel, you used "frog." in your update function in class Frog (19:13). Intentional or accidental?

  • @Nixomia
    @Nixomia 7 лет назад +9

    Yes I am the first, thanks for the amazing videos
    , And I hope God bless you and give you everything you wish, thank you again

  • @KerryMeXx
    @KerryMeXx 3 года назад

    Hi, I'm having an issue with my program. I haven't followed yours word for word , but I've done the logs the same way, but instead of moving with the log, my player moves slightly too fast and gets pushed off the front of the log, any idea why this might be happening?

  • @user-oj3gb8nh2q
    @user-oj3gb8nh2q 7 лет назад

    Hello,
    do you think about the videos before you start filming? your decisions look pretty well thought

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад

      Usually not (with a few exceptions). With this one I didn't plan it out in advance!

    • @user-oj3gb8nh2q
      @user-oj3gb8nh2q 7 лет назад

      pretty nice then man. I don't assume you care, but you are a role model for many CS students, including myself. Keep up the good work please :)

  • @Sanjay-el6kp
    @Sanjay-el6kp 7 лет назад

    Hey i have been watching some of your videos and i was wonder what text editor you use and is it better that sublime 3
    sincerely Questioning watcher

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад

      I'm using the Atom editor. Some workflow videos:
      sublime text: ruclips.net/video/UCHzlUiDD10/видео.html
      atom editor: ruclips.net/video/d3OcFexe9Ik/видео.html
      brackets: ruclips.net/video/nmZbhManVcY/видео.html
      codepen: ruclips.net/video/5gfUgNpS6kY/видео.html

    • @ShaunHusain
      @ShaunHusain 7 лет назад

      Sanjay Nielsen-Betts better is subjective and depends on the goal or the problem. Although text editing seems basic for coding certain things certain editors have features that are more or less helpful depending on what your coding, good to try a few out (give them each a week or so as your main editor) then decide which one you like best or fits your work (and can see what some of the features are built into each one so why you might use one of er the other, nuanced differences but things like speed to start, syntax highlighting support/intellisense style completion etc.)

  • @MCSteve_
    @MCSteve_ 7 лет назад +6

    The Frog should snap back on to grid once it touches the safe zones since the logs dont move in grid speed.

  • @tomburris8380
    @tomburris8380 7 лет назад

    Great video Dan! Next time you do a coding challenge, could you make a video focused on how to refactor code and the process you go through to accomplish it? Thanks :)

  • @qcdiamond8292
    @qcdiamond8292 7 лет назад +14

    Please optimise it! Show us how to make it as tidy as possible :)

  • @nguyentranthao458
    @nguyentranthao458 7 лет назад

    I love your channel!!!!!!

  • @staticvoidsolutions4998
    @staticvoidsolutions4998 5 лет назад

    to make the frog move with the log you set frog.x += attached.speed. I can't figure out why making the frogs x position equal the log speed (in this case 2.3) makes the frog move with the log --- and yet it works. ????

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад

      Would you mind asking at discourse.processing.org/! It's a better platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.

  • @MAXYANKEE5
    @MAXYANKEE5 7 лет назад

    NEED HELP!!!
    Im using eclipse and slick 2D, i'm not experienced in making games, but I want to know how I could make falling images come down from the top of the screen that spawn in random locations. Any help would be great!

    • @TheFireBrozTFB
      @TheFireBrozTFB 7 лет назад +1

      use the buffered image util to get a texture, after that, draw that image in your render method. for randomness, you can use Math.random() which gives a random value between 0 and 1, then you can multiply it by width for example, to get a value between 0 and width. after getting this value, set the images X / Y at this value. to make a falling object, you have to store that x & y value, and increment the Y value each frame

    • @MAXYANKEE5
      @MAXYANKEE5 7 лет назад

      Thank you, I just tried it and it worked, but i can only do it with one image at a time. To do it with multiple would i need an array?

    • @TheFireBrozTFB
      @TheFireBrozTFB 7 лет назад

      yes you do

  • @up4life108
    @up4life108 7 лет назад +1

    I really enjoy these videos ! Also I'd appreciate if u could remake even more games :^]

  • @ryanskolnick1274
    @ryanskolnick1274 7 лет назад

    the final code you have at the end breaks if you die before you get to the top. Refuses to move after

  • @tanveersingh7278
    @tanveersingh7278 7 лет назад

    Can you please tell me what should i do next if i have knowledge of html5 and css3, but zero knowledge about javascript ,php and other stuff.
    where should i approach next?? after completing basic languages like html5 and css3!!

    • @TheFireBrozTFB
      @TheFireBrozTFB 7 лет назад +1

      javascript is an easy programming language, i suggest you learn it. Start by learning its basic functionality and operators, then go into making games

    • @tanveersingh7278
      @tanveersingh7278 7 лет назад

      TheFireBroz // TFB
      Cool!
      Thanx a lot

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +1

      Try this playlist to start from scratch!
      ruclips.net/user/shiffmanplaylists?view=50&shelf_id=14&sort=dd

  • @user-dg8iq6zy6h
    @user-dg8iq6zy6h 6 лет назад

    Getting a 404 page when clicking on the source code link, pls is there another way u could share the source code?

    • @TheCodingTrain
      @TheCodingTrain  6 лет назад

      Fixed! github.com/CodingTrain/website/tree/master/CodingChallenges/CC_072_Frogger

  • @johnappleseed8839
    @johnappleseed8839 7 лет назад +4

    In methods comparing with another thing, instead of calling it "other", you should call it "that" :P

  • @64MbUsbStick
    @64MbUsbStick 7 лет назад

    Hi, im using Processing 3 and i want to upload my Program in an HTML file. How can i do this? PS: Great work, you make me happy :)

    • @ShaunHusain
      @ShaunHusain 7 лет назад +1

      UsbStick you'll want to port the code to use p5.js browsers and oses have come to not trust the Java plugin because it's had lots of missed security issues in the browser plugin. Java is still fairly popular server side but not a good choice for the browser as a target.

  • @staticvoidsolutions4998
    @staticvoidsolutions4998 5 лет назад

    Please make more games!

  • @MondSemmel
    @MondSemmel 7 лет назад

    FYI, the link to the source code doesn't work (any longer?); I think the following link would be correct: github.com/CodingTrain/Frogger

  • @jasworth5122
    @jasworth5122 7 лет назад

    mine have wierd lines that appear.

  • @shubhamkulkarni2906
    @shubhamkulkarni2906 7 лет назад

    Sir can you tell me your education.... Please 😊

  • @megatrollsplit1282
    @megatrollsplit1282 7 лет назад

    You are coding in Java ?

    • @Calz20Videos
      @Calz20Videos 7 лет назад

      He is using processing. It is, believe, a simplified version with a different library.

  • @TheFireBrozTFB
    @TheFireBrozTFB 7 лет назад

    Make a challenge and code in the default Java way using no libraries whatsoever..
    I believe creating your own game loop, and rendering the frames by the default would be much more challenging than using a simple library.

    • @ShaunHusain
      @ShaunHusain 7 лет назад

      TheFireBroz // TFB you think calling a function on a timer is going to be an interesting challenge... I beg to differ on this one if anything I'd go the opposite way use tensor flow or angular and ts don't reinvent the wheel and do things in a way that is more time efficient human life is limited no need to waste it running over the same ground.

    • @TheFireBrozTFB
      @TheFireBrozTFB 7 лет назад

      Many environments where made with java, as OpenGl, processing, etc.. But those libraries used the default java functions to make our lives easier, why not try and use the main java functions ourselves? Maybe its not time efficient, but its fun

    • @ShaunHusain
      @ShaunHusain 7 лет назад

      Yeah I could see the for fun angle, but I would just rather see Dan use higher level stuff and show some use cases for all the machine learning stuff he's been doing recently, sure it will eventually get worked on too just always too much on the back burner.

    • @ShaunHusain
      @ShaunHusain 7 лет назад +1

      Also I did a particle.io IoT version of this using the AdaFruit gfx library and particle.io runtime, but even there they have a built in setup and loop (think these all built off of concepts from wiring). Just fixed the link in my comment on this vid to be clickable). It's a port of the JS code to C++ (conversion from Java to JS was done by one of Dan's people but figured it might have some fixes so I started with that and ported to C++), but yeah still just using the drawing functions in the Adafruit library (I read them and get what they do but no reason to rewrite them).

    • @TheFireBrozTFB
      @TheFireBrozTFB 7 лет назад +1

      I agree, but making a game loop is basically understanding how it works, which is nice to know

  • @MongeDosGames
    @MongeDosGames 7 лет назад

    I made one cool frogger project program on processing in my Programming class at school... It is actually pretty cool if u wanna see it... I can email you or send the code

  • @tech6406
    @tech6406 7 лет назад

    is it just me or does java look much more complex than javascript?

  • @jambocj1127
    @jambocj1127 7 лет назад

    I think I might of been his 300,000 sub not sure

  • @personman1132
    @personman1132 7 лет назад

    Anyone else see the highlighters at the bottom of the screen? ;)

  • @likemeplease5831
    @likemeplease5831 7 лет назад

    My brother coded Frogger in about 2 days :)

  • @Ikpoppy
    @Ikpoppy 7 лет назад

    AaAaAa-AaAaAa

  • @euzeo
    @euzeo 7 лет назад

    I really enjoy your video, but honestly I think your code is totally unmaintenable, and this make me sad. Why not teach also how to write clean code? It will certainly help a lot of people.