Inventory - How to Make a 2D Game in Java #27

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

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

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

    Every new video of yours is like a new chapter of game of thrones!!!

  • @EnderGamer-b7f
    @EnderGamer-b7f День назад +1

    great videos, they help a lot

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

    Hey Dude! Nothing I love more than seeing an upload from you, thank you once again for providing such a great tutorial!

  • @MorrowHopeMusic
    @MorrowHopeMusic 2 года назад +4

    When the cursor moved, I immediately thought, "Oooo, I should make a Frogger game!" haha This is one of my fav vids, so far, in this series! Keep up the great work! :)

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

      Yes, if you apply some of these mechanics it won't be so hard to create games such as Flogger or Sokoban :)

  • @garciajushua724
    @garciajushua724 Месяц назад

    your are a freaking GEM to me bro, I hope you are doing good! thanks for this tutorial

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

    Dude you work so much keep it up! Thanks for the upload

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

    Thanks for the frequent video uploads🤗

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

    great tutorial series, i am so thankful.

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

    always look forward to your videos!

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

    nice work RyoSnow , this is a good guide. I´m gone work with this soon.. Just now i´m working with some project with Ruby on Rails

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

      Hey Christer, it's nice that you are working with Ruby on Rails. That's a pretty popular framework, especially in Japan. You can come back to Java any time. For now, good luck on your Rails project!

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

    Great video again! THX!

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

    went good without a hitch, thanks!

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

    Hey, Ryi thanks for your dedication as always!
    I noticed something weird at 18:22, while you were changing the item's size. Look at the old man sprite while changing sizes. I'm not sure if it changes its size or its y position, but the changes in the inventory also affects him.
    Also i was wondering how to stack items on a single inventory slot (up to a certain quantity). For example, you can have up to 3 keys in the same slot because they're small.
    Hope you're doing well! Take care! :D

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

      About the old man, it's just his y position is different. I used two game windows (the previously opened program and the current one) for comparison. The Window's bottom bar is hidden in the video so it might look a bit confusing but I was switching between two windows to see the difference :P
      For stacking items, you can add "amount" variable to the Entity. So when you pick up an item that you already have, you can add 1 to the amount instead of using another slot.

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

    Hi RyiSnow, great video as always! I was wondering, how would you make it so that the description subwindow disappears if the cursor is hovering over a blank slot (meaning there is no item in that slot). Thank you!

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

      Put drawSubWindow(dFrameX,dFrameY,dFrameWidth,dFrameHeight) in the itemIndex if statement then the window only shows up when you are selecting an item. Actually this is a neat idea so I will update my code as well. Thank you for the question.

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

      @@RyiSnow thank you so much!

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

    i realy like your channel you need to get 100k subscribes!!!

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

    Hey! I'm on the 12th video (tileset), did everything exactly as you did and when I run my program, I can't move, music's not starting, counting not starting etc. Any help? Thanks

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

      Most likely something is wrong in the getTileIMage method since that's the only thing we changed in that video so that's where you need to check. Also, if you have a question regarding a specific video, could you post a comment on that video? It would be easier for me to track the issue and the thread can be a useful reference for future viewers. Usually I don't respond to questions that are unrelated to the video so I hope you understand. And please don't post the same comment multiple times. You can get flagged as a potential spammer by RUclips and it's possible that your future messages will be filtered.

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

    Thank you very much! Arigato!

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

    Did you ever add in a video how to show the coordinates of the player? it seems like when you press T you can see player x,y, col and row. I never saw where you did that code

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

    nice i wait for this video!!

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

    Nice tutorial each, you anwsered almost all my questions, but I have two questions about inventories..
    1-
    If in my game the character can increase it's bag size, the easiest way would create a different inventory window, with different size, for each of the bag's sizes?
    2-
    How do I do when the itens hold more than one slot, like in the Diablo games, where a dagger hold 2 slots verticaly and a sword could hold 3 slots verticaly, in order for the inventory manege the slots correctly?

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

      1: If I were you I think I would create tabs so you can get extra slots. If you want to create a resizable frame, arrange the program so the frame size and the max slot num change based on your item capacity.
      2: That will be pretty tricky. I've never tried it but I guess you'll need to set a slot size on each item such as (col x 1), (row x 2). And create a way (boolean etc.) to check each slot's vacancy state. Then let your inventory program knows which slots are currently occupied so it cannot place an item on already occupied slot. I can imagine it requires a lot of work (and probably a little algorithm) to optimize the placement!

  • @MohitVerma-uu8hw
    @MohitVerma-uu8hw 2 года назад +1

    Hey!! , would you please make a video on how to make JAR file for javaFX project, I made one but it's not running it says "no main manifest attribute", although I've already added my 'Main-Class' in Manifest.mf. Also, thank you very much, you clarified most of my doubts through this playlist.

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

    Thanks!

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

    Hi! Thanks for your awesome video! It really helps me in my project to build a game within a month from scratch with 0 experience! However, may I know if I were to add on an explosion class in which touching a 'bomb' that spreads across the tiles will cause health damages, which video should i rewatch to grasp a better understanding?

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

      I think Part 22 is the one you want to check. Bombs are like monsters that don't move.

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

    very good

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

    Do you plan to add multiplayer support to this game in the future?

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

      Not really. This is a single player game tutorial.

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

    Hi, I realy like your videos, so can you make a video in which you make some kind of launcher for the game, so the person who downloads the game can play it without any code editor. Thank you one again for the content you are making.

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

      You can export your code as a Jar file or an exe. I've made tutorials for both method so check those if you are interested.

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

    Tell me, in this tutorial, will you also do building climbing on a separate map? Besides, thank you for another brilliant video :)

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

      What do you mean by building climbing?

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

      @@RyiSnow
      I meant the interior of a building that you can enter. The interior of the building is the "second" map

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

      I'm not planning to implement that but you can do that in the same way of handling dungeon (dungeon is another structure drawn in a different map file)

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

      @@RyiSnow
      I'll try to do it. I have one more question, what will this game be like in the end? Will it be something like a movie for the new year?

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

    can you do extra part so you explain how can we do attack and click on the main menu on new game and more with the mouse and not keyboard?

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

      The game system of this is purely based on keyboard control so I think I won't do that in this series (it will be too much reconstruction). If you want to implement mouse, try checking mouse listener tutorial.

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

    🥰🥰🥰

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

    Hi RyiSnow! You always post such amazing content, I was wondering if you had a patreon or other place where I could donate. Thank you!

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

      I don't have patreon but I am accepting donation via Ko-fi which is kind of similar to patreon.
      ko-fi.com/ryisnow
      Glad you liked my video!

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

    Is this minicraft tutorials?

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

    When can I play your game?

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

      I'll upload the Jar when this tutorial is done.

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

      @@RyiSnow awesome :)

  • @МастерОтступник
    @МастерОтступник 2 года назад

    How to alive trees.

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

      I've already answered that in your previous thread

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

    Hello Ryi! I have watched all your videos on "How to Make a 2D Game in Java" as I am also currently doing it for a project in school.
    Can you show us how to get the user's string input? For example, if the game ask for a username and the user have to type in their username.
    Once again, thank you for the videos that you have provided us!

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

      Hi, I might make a video about it in the future but I'm a bit overwhelmed by tasks right now so I'll give you a summary.
      If I were you I would implement the function like this:
      1. Create a game state for the name input.
      2. Create a input box by using drawRect etc.
      3. Create a String (name).
      4. Get a character from the key event. Like this: e.getKeyChar()
      5. Append the received character to the string (Example: name += e.getKeyChar()) and draw it in the box.
      6. Confirm the name by pressing a key (Enter etc.) and use the string as player's name.
      Hope this helps!

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

      @@RyiSnow Yes, this helps! Thank you for the advice! Will continue to watch your videos and stay healthy!