Guard and Parry - How to Make a 2D Game in Java #49

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

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

  • @kevcopo
    @kevcopo 2 года назад +5

    Dude you’re literally insane I will for sure come back and start your tutorial thank you for being so clear and having detailed conversation explanations

  • @laurenzfitzner
    @laurenzfitzner 2 года назад +3

    Oh wow, I didn't expected your combed to be that interesting! Very impressive I must admit!

  • @carbal9663
    @carbal9663 2 года назад +8

    Hi Ryi, I just want to say you are the best! and one day I will finish your game.

  • @awaririawa4238
    @awaririawa4238 2 года назад

    Thank you!

    • @RyiSnow
      @RyiSnow  2 года назад +1

      Thanks again for your kind support! ありがとう!

  • @Langostaz
    @Langostaz 2 года назад

    wooo I enjoy coming to find new videos! great stuff like always!

  • @tsupi7056
    @tsupi7056 2 года назад +2

    Thanks for uploading Ryi

  • @saschapolaschek4347
    @saschapolaschek4347 2 года назад +2

    Ryi, perfect as always.

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

    Hello! Ryi whe do the stand counter appear and what for does it need? I follow your viddeos from the beggining and there was any word about it...

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

      The stand counter was added in this extra video: ruclips.net/video/WmGiQV2tHIg/видео.html
      It sets the player in the standing position when you don't press any key for a while. The game works without it though.

    • @alwaystaken61900
      @alwaystaken61900 2 месяца назад

      Thanks for asking this. I was wondering the same thing and didn't see the extra video in the playlist.

  • @termite1737
    @termite1737 2 года назад +8

    Ryi, are you a game developer, working in Japan? Your content is beyond my imagination :)))

    • @RyiSnow
      @RyiSnow  2 года назад +9

      I'm just a hobby programmer :)

  • @istand4myself
    @istand4myself 2 года назад +2

    Excellent video! One question. Are you planning on implementing multithreading in this game? If no, please, could you briefly explain how one would do this considering your existing code base (currently it's all about gamepanel where the game loop is). Any suggestions on where the multithreading can be used? (Maybe some complex in-game events, weather implementation). Also it would be very convenient if you started new series on LWJGL in Java. Anyway, thx for guides, keep up the good work!

  • @OneLatteComingRightUp
    @OneLatteComingRightUp 7 месяцев назад

    My player still gets hurt when the orc isn't attacking. Any fixes?

  • @FerodriEste
    @FerodriEste 2 года назад

    Excelenty Ryi like always!!
    I found that the player can only open a door if he is above it, if it is to his right, left or above he cannot.. even if he has keys.
    Tnks!!!

    • @RyiSnow
      @RyiSnow  2 года назад +1

      Just checked the issue and although I could open the door from all directions, also noticed there are situations where the key doesn't work. I realized the calculation col = nextWorldX/gp.tileSize doesn't round the result value (for example 13.997 is still counted as 13) so sometimes you get a col number that is not where the door is.
      Here's the fix:
      (getDetected)
      switch(user.direction) {
      case "up": nextWorldY = user.getTopY()-user.speed; break; // change 1 to user.speed
      case "down": nextWorldY = user.getBottomY()+user.speed; break; // change 1 to user.speed
      case "left": nextWorldX = user.getLeftX()-user.speed; break; // change 1 to user.speed
      case "right": nextWorldX = user.getRightX()+user.speed; break; // change 1 to user.speed
      This fixed my issue. I tested 15 - 20 times from all directions and every time I could open the door.

    • @FerodriEste
      @FerodriEste 2 года назад

      @@RyiSnow tnks Ryi, woks perfect!!

  • @spicybean8
    @spicybean8 2 года назад

    The orc knock back me on tree tiles somehow and I can not move

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

    Hey great video, I was just wondering why would one of my sprites not be switching properly when in just one direction because my code is pretty much the exact same as yours and the direction performs the right functions but the guard sprite isn’t showing up, I tried using several instances of the sprite but nothing seems to work

  • @Glaxsy-ej3oq
    @Glaxsy-ej3oq 2 года назад

    Great work, keep it up

  • @jewishbanana7055
    @jewishbanana7055 2 года назад

    Hey man, so I am making a game and basically I checked up on your tutorial on making a game full screen and I applied the same logic. Creating a buffered image and drawing it to the rescaled window. It works, however, just this one change alone to draw a buffered image to my window kills my performance, I get almost 20 times worse framerate (from 1000 to 60). Nobody on any java forums have been able to help so I am wondering if you would know the solution? How to up performance because drawing a single buffered image should not be this performance heavy, and this is the only change I made.

  • @darkpaladin.
    @darkpaladin. 2 года назад +2

    How can I donate ?

    • @RyiSnow
      @RyiSnow  2 года назад

      I have a Ko-fi page :)
      ko-fi.com/ryisnow

    • @darkpaladin.
      @darkpaladin. 2 года назад

      @@RyiSnow thank you so much man

  • @Feroov
    @Feroov 2 года назад

    Suggestion, will there be ever main menu etc overhaul?

  • @Nienawidzoncy
    @Nienawidzoncy 2 года назад

    Another great video!
    How can I stop the knockback effect on player when he died because when you press retry player gets knockbacked immidietly?

    • @RyiSnow
      @RyiSnow  2 года назад

      You can stop that by setting the player's knockback false. I'll clean up those game-over things in the next video.

  • @hugodoquoc1262
    @hugodoquoc1262 2 года назад

    Hi great video, I just noticed that if you died while the orc knockbacked you and then retry, you respawned with the knockback effect . How would you fix that?

    • @RyiSnow
      @RyiSnow  2 года назад +1

      Yup, I'll address the game over stuff in the next video since we've added some new things since we created the game over screen.
      You can disable the knockback effect by setting the player's knockback false.

    • @deepseatrip
      @deepseatrip 2 года назад

      @@RyiSnow ​ I also noticed after dying and retrying about 10-15 times that it nearly doubled the amount of memory usage on my computer. this very well could be something i have done, but curious if yours goes up significantly too after dying and retrying alot

    • @RyiSnow
      @RyiSnow  2 года назад

      Hmm, I just tested it and didn't see any changes in performance. I died 30 times and retried the game but the game looked the same. No lagging or anything.

    • @deepseatrip
      @deepseatrip 2 года назад

      @@RyiSnow Thank you for testing on yours. I figured it out , I had created another timer that I had forgotten about, was planning on using it to tell the in game time. (then you released the Day Dusk Night video) and I forgot to remove the old timer i was working on. It was eating up so much memory lol
      I also had commented out the lines in the TileManager that only draws world in the camera view. I had forget i was messing around with drawing things not in camera view.

  • @mightymeet
    @mightymeet 2 года назад +1

    Very Good

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

    Cool video!

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

    Ryi, it would be great to add idle animation to everyone)But actually your game looks very cool)

  • @MrLoser-ks2xn
    @MrLoser-ks2xn 2 года назад

    Thanks!

  • @luciuscouto4592
    @luciuscouto4592 2 года назад +1

    It would be nice to be able to implement a mechanism that can freely resize the screen like most applications and games we find out there!

  • @pulkstenis1
    @pulkstenis1 2 года назад

    Great content as always Ryi!
    I've followed these series since the beginning and cant wait to implement this.
    Do you have any plans to implement game save/load functionality? I was trying to implement this on my own but i cant decide whether to do it with Serializable interface for each npc and object or simply a properties file..

    • @RyiSnow
      @RyiSnow  2 года назад

      The next video will be about save/load. Adding the interface on each object felt a bit of pain so I created a data class that contains whatever I want to save then serialized it so we only need to write/read one object. Saving the information about the objects on the map was much trickier than I thought though!

    • @pulkstenis1
      @pulkstenis1 2 года назад

      @@RyiSnow that sounds interesting, looking forward to your next video.
      The major problems that I encountered while trying to implement this was to not spawn a monster/npc on top of the player and to equip the correct equipments from inventory after loading it

    • @RyiSnow
      @RyiSnow  2 года назад

      I'm not sure about your monster/npc issue since in this program their spawn locations are fixed. Restoring the equipment info is a little bit tricky but you can handle it by saving the slot numbers of the items that you have equipped. It will be covered in the next video.

    • @pulkstenis1
      @pulkstenis1 2 года назад

      Ah sorry.. I had this issue because I made it so that the monsters respawn after some time. If the player was standing at the spot where the monster would spawn then once it spawned it would automatically kill the player. I somehow fixed this in the end though by using the collision checker.

  • @jogosProgramEletronica
    @jogosProgramEletronica 2 года назад

    nice system.

  • @alixjaugey3243
    @alixjaugey3243 2 года назад

    Hi Ryi,
    I love your tutorial and thanks to you I am creating a 2d game for me and my friends but I want to make it multiplayer, with player interactions like you did with mobs etc. Is it possible for you to make an additional episode explaining how to implement this? Because I can't necessarily find things I want in other people's tutorial, so... Anyway, thanks for all the knowledge you share with everyone, because it means a lot to people like me who "learn by themselves" things via RUclips etc.
    Hope you the best for the future
    Thanks

    • @RyiSnow
      @RyiSnow  2 года назад +1

      Glad you liked the tutorial. Sorry but this is a single-player game so no plan for adding multiplayer.

  • @MrLoser-ks2xn
    @MrLoser-ks2xn Год назад

    🥰🥰🥰

  • @volkeraIbrecht3915
    @volkeraIbrecht3915 2 года назад

    Cool

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

    Hi RyiSow! I must say you are awesome :) Now I have solved the problem with fullScreenMap and MiniMap. So now it's working :) The problem was I had the old Tiles on placeholder. I took away the placeholder and now it's working :) Finally! I am happy you guys wanted to help me :) and I'm very happy about it. Now I have another strange problem. I can't open the doors with the keys. It just says in the game "What are you doing?". I have tried to solve this problem but I can' find it. please help me somebody.

  • @BinaryDuo
    @BinaryDuo 2 года назад

    Can you make like a bike or a scooter in the next part? So that you can drive faster!

  • @danielleanas9401
    @danielleanas9401 2 года назад

    if i get my salary i will donate ive been watching your video since u started!!

  • @dominiktworek6455
    @dominiktworek6455 2 года назад

    whoaaa! that tutorial is amazing, I just discover it and straight after i finish my course with Tim Buchalka on udemy - where i can lern basics i will jump to this amazing tutorial! good luck guys and have fun!