Literally the best java game programming tutorials right now!
@angelos98002 жыл бұрын
fr
@swansongg2 жыл бұрын
Yes yes yes!
@jay_codes2 жыл бұрын
definately
@paaulsens60862 жыл бұрын
i agree
@holmdev2 жыл бұрын
I agree
@nakanomiku84702 жыл бұрын
I was totally at beginner level when I started this series, and so far in just 5 days of watching this and practicing, I can tell that I improve a lot and understand the basic concepts of game logic and how to construct a proper code, I really love your vids, and I'm excitedly waiting for the next episode. Thank your for this awesome tutorial
@paul74082 жыл бұрын
Just found this series a few days ago and binged it really hard. All caught up! This is best tutorial ive ever found on youtube. you do such a good job with pace, explanations and not skipping over fixes.
@Mypremiumacct15 күн бұрын
Cant believe im almost halfway through. This tutorial has been fantastic.
@sorcerian_bootleg71122 жыл бұрын
I love how the series is taking shape little by little. Keep it up!
@paaulsens60862 жыл бұрын
I am eagerly waiting for episode 29! This is some extremely good content you're putting out, keep it up!
@flkr4153 Жыл бұрын
I dont know if you implemented this later, but I also added a canUseConsumable boolean to consumables so that if your health is full, it displays a message that your health is already full. Then for keys and similar items, you can just make them true.
@erkangxia84242 жыл бұрын
This series helped me a lot, cant wait to see the next episode!!!
@FerodriEste2 жыл бұрын
And the oscar goes to... RiySnow for the best java game programming !!! 👏👏👏
@somethingaboutmoron2 жыл бұрын
Wow, found your videos today, I cannot stop watching them! You can explain things so fluently it's honestly insane!
@FriskTheFallen10 ай бұрын
I went ahead and setup a default description that appears if you select any of the blank spaces, that way instead of nothing it says something sarcastic about the lack of things.
@paulringrose57792 жыл бұрын
Been watching and following along with this series, really is an amazing in depth series, thanks for all your hard work, please do more vids!! cant wait for the next one :D also please do a full screen option, thanks again :D
@kikismine2 жыл бұрын
OMG! A new tutorial from RyiSnow
@ganbarimasu94462 жыл бұрын
You and your videos are as great as ever. Thanks for the effort you put in making this videos :)
@woodswoody55532 жыл бұрын
Cant wait for the next video I did all 28 and the extras in 3 weeks (a video a day) absolutely love this tutorial
@ilyesskhayati35322 жыл бұрын
This saved my game project!! Thank you so much for these videos! wondering if there's the possibility to add a different level with a different map and objects. It will be really helpful! looking forward to new videos!!
@nguyentranangminh2669Ай бұрын
I LOVE THIS SERIES
@holmdev2 жыл бұрын
nice work RyiSnow , i hope comes more episode soon :)
@UnderArea512 жыл бұрын
QUESTION: How do you change (customize the image,) the compiled Java game app icon image on the desktop? (the clickable icon to start application at the end of your Notepad tutorial?) -Thank you :)
@RyiSnow2 жыл бұрын
Unfortunately you cannot change jar file icon because it is platform dependent. You need to export it as an exe file for that.
@EnchikO2 жыл бұрын
Hello Mistr RyiSnow, i would like to ask you, is there any way to implement shader to this game ?
@nikolasdemetriou1262 жыл бұрын
The inventory is great! , but a way to drop the items on the floor would be very useful for inventory space management(gameplaywise)
@RyiSnow2 жыл бұрын
That is true. I think I will add the option later!
@josemarioespinoza6652 Жыл бұрын
Amazing one man, thank you for your work
@RyiSnow Жыл бұрын
Muchas Arigatos 😄🙏
@AppleTwentyFour2 жыл бұрын
I've been quietly following your tutorials and I think it's incredible how much I learnt in such a short time, thanks for that! One thing I've been wondering about is how could I make it so that the player can swing his weapon while he is moving instead of stopping every time? I think that would make for a much smoother gameplay! Thank you!
@dave231452 жыл бұрын
Hi Ryi, there is something that I've been trying to do for a while now in this project, but I just can't get it to work. So I would like to display a message every time that player touches an NPC. And that message would be something like "Press Enter to talk to the NPC". I think something like that would be quite useful for someone who hasn't played the game yet and doesn't know the controls. Would be awesome if you could help me out :).
@sullythedon61552 жыл бұрын
Hi, is it alright that you could make these into individual written tutorials, and make into into documentation as it would be easier to access individual things, just and idea. love the tutorials
@nickolasthompson4312 жыл бұрын
This series is my absolute favorite! I'm only on part 9, but I have a question. This has piqued my interest in pixel art. Is there a way that we can go from 16x16 sprites to more detailed ones?
@ganbarimasu94462 жыл бұрын
Yes, you can. Like you can use 48x48 pixel sprite. It will be fine if you change the integer we use to scale the 16 pixel from 3 to 1
@LORF02 жыл бұрын
You are the best at explaining. I was wondering about how would you handle jumps? And particle system
@RyiSnow2 жыл бұрын
It's a bit complicated to explain everything in a comment. But basically you calculate gravity for jumps. Like adding upward gravity until the player hits the highest point then start adding downward gravity until the player hits the ground. Particles are also entity. You can set their lives and the directions etc.
@LORF02 жыл бұрын
But visually would you make like a circly shadow appear at the pervious y cord after pressing the jump key so the player would appear above the ground?
@RyiSnow2 жыл бұрын
That's doable but I think adding shadows to jump sprites is easier.
@CJDaBomb69 Жыл бұрын
If I wanted to display armour over top of the player's texture when they equip armour, how would I do that?
@BracamonteLАй бұрын
add new sprites?
@Nefarious_Production2 жыл бұрын
when is the next ep coming?
@EuropaM64 Жыл бұрын
Hey RyiSnow! I have to thank you so much for this tutorial, it has helped me a lot! I do have a question, that I hope you wouldn't mind helping me with. Basically, I want the player sprite to look different depending on the class that the player has chosen. I tried to do it by having an int value set depending on the choice that the player made, and then set the player images depending on what the value of the int was. But, this didn't seem to work. Would you, or anyone else, know of a good way to do this?
@RyiSnow Жыл бұрын
Hi, your method sounds totally fine to me. As we did in this video for switching weapons, you just need to set different images based on whatever condition you'd like to use (int, boolean, String, etc.). So I think the problem is not your theory but probably how you implemented it. Try adding a line like "System.out.println("The Character B images are set")" in the method where you set new images and see if the text gets printed out on the console. If you cannot see the text, the method is not getting called for some reason so you can check why it's not.
@EuropaM64 Жыл бұрын
@@RyiSnow Thank you so much!
@LirDev32 жыл бұрын
God dam you upload the next part thx god!!! i like this so much!
@kevincolgan66512 жыл бұрын
Very good as always
@bencegarami85822 жыл бұрын
Amaizing series! How would you implement that the monsters start coming towards you from a given distance and attack when next to you (maybe with an attack animation)?
@ganbarimasu94462 жыл бұрын
Hi, I copied my comment from the 24th video to answer your request. Ask me if it's not clear. Code: . . Here is the basic AI code I said I was gonna share. With this AI, monsters go towards the player if he is closer than 4 tiles. !!!!!! Before making any changes to your code, make sure to save it somewhere safe first. Since it would be pretty bad if your code got ruined while trying to make some changes on it !!!!!! To apply this change in code, first create 4 new counter in entity class: public int changeDirection1 = 0; public int changeDirection2 = 0; public int changeDirection3 = 0; public int changeDirection4 = 0; Then, in your MON_GreenSlime class, comment out your setAction Class (Don't delete it in case this code does not work in your java project) and replace it with the code below. public void setAction() { int xDistance; int yDistance; int Distance; for(int i = 0; i < gp.monster.length; i++) { if(gp.monster[i] != null) { xDistance = Math.abs(gp.player.worldX - gp.monster[i].worldX); yDistance = Math.abs(gp.player.worldY - gp.monster[i].worldY); Distance = Math.max(xDistance, yDistance); if(gp.monster[i].alive == true && gp.monster[i].dying ==false) { if(Distance < 4*gp.tileSize) { if(gp.player.worldX > gp.monster[i].worldX && gp.player.worldY > gp.monster[i].worldY) { if(changeDirection1 < 30) { gp.monster[i].direction = "right"; } else if(changeDirection1 >=45 && changeDirection1 < 90) { gp.monster[i].direction = "down"; } else if(changeDirection1 > 90){ changeDirection1 = 0; } changeDirection1++; } else if(gp.player.worldX > gp.monster[i].worldX && gp.player.worldY < gp.monster[i].worldY) { if(changeDirection2 < 45) { gp.monster[i].direction = "right"; } else if(changeDirection2 >=45 && changeDirection2 < 90) { gp.monster[i].direction = "up"; } else if(changeDirection2 > 90){ changeDirection2 = 0; } changeDirection2++; } else if(gp.player.worldX < gp.monster[i].worldX && gp.player.worldY > gp.monster[i].worldY) { if(changeDirection3 < 45) { gp.monster[i].direction = "left"; } else if(changeDirection3 >=45 && changeDirection3 < 90) { gp.monster[i].direction = "down"; } else if(changeDirection3 > 90){ changeDirection3 = 0; } changeDirection3++; } else if(gp.player.worldX < gp.monster[i].worldX && gp.player.worldY < gp.monster[i].worldY) { if(changeDirection4 < 45) { gp.monster[i].direction = "left"; } else if(changeDirection4 >=45 && changeDirection4 < 90) { gp.monster[i].direction = "up"; } else if(changeDirection4 > 90){ changeDirection4 = 0; } changeDirection4++; } else if(gp.player.worldX == gp.monster[i].worldX && gp.player.worldY < gp.monster[i].worldY) { gp.monster[i].direction = "up"; } else if(gp.player.worldX == gp.monster[i].worldX && gp.player.worldY > gp.monster[i].worldY) { gp.monster[i].direction = "down"; } else if(gp.player.worldX < gp.monster[i].worldX && gp.player.worldY == gp.monster[i].worldY) { gp.monster[i].direction = "left"; } else if(gp.player.worldX > gp.monster[i].worldX && gp.player.worldY == gp.monster[i].worldY) { gp.monster[i].direction = "right"; } } else { actionLockCounter++; if(actionLockCounter == 600) { Random random = new Random(); int a = random.nextInt(100)+1; //picks up a number from 1 to 100 if(a 25 && a 50 && a 75 && a
@bencegarami85822 жыл бұрын
@@ganbarimasu9446 Wow amaizing! Thank you so much, this really helped me a lot!
@bastien280211 ай бұрын
At 4:06, I have an error with gp.obj[i].name = null; error says Exception in thread "Thread-0" java.lang.NullPointerException: Cannot read field "name" because "this.gp.obj[i]" is null. Can anyone help ?
@WoodsGeorgeJr2 жыл бұрын
could you make a full screen function ?
@luciuscouto45922 жыл бұрын
It would be nice if you could implement a function that changes the position of items, in case the player wants to organize the inventory.
@vampsz15922 жыл бұрын
How can I remove a specific item from the inventory? I want to open a door and then remove the key from the inventory. everything works except this part:/
@woodswoody55532 жыл бұрын
Im stuck here as well
@vampsz15922 жыл бұрын
@@woodswoody5553 you can assign a key in the keyhandler to do it. Then call a method which looks like this. int itemIndex = gp.ui.getItemIndexForSlot(); inventory.remove(itemIndex); Maybe you need to change the variables but that should do it. It delets the item selected. Maybe ask for confirmation bc this will just delete it and nothing more.
@woodswoody55532 жыл бұрын
@@vampsz1592 yeah i figured it out and set it up so i can open doors with keys in the inventory. inventory.remove(currentKey); made a similar structure as the sword and sheild where keys open doors if selected in inventory and then are removed after use
@darktimes5742 жыл бұрын
@@woodswoody5553 if possible could you share how you did this as I have been trying and failing 😅
@woodswoody55532 жыл бұрын
@@darktimes574 Yeah later tonight I'll explain got exams tomorrow RIP
@praneetw2 жыл бұрын
Hey bro u r doing great job can u suggest how we r going to deploy this game
@an1l4922 жыл бұрын
Hi, when will the next part come out?
@woodswoody55532 жыл бұрын
Hey I have an idea! What about making the water move (simple 2 or 3 tile animation)? Thank you so much and your knowlege in java is way beyond me. Also a question: How would I make it so that when I choose new game and pick a class it also changes the main character avatar according to each class.
@flkr4153 Жыл бұрын
I have a question that i dont know if youll be able to help me with, the problem im having is that if i have multiple weapons of the same type, if i switch any any other single weapon of the same type, all of the weapons of that type highlight except the first one. I already got to the day and night cycle video, but ive tried to fix the bug since this video and cant figure it out. Thanks
@RyiSnow Жыл бұрын
Yes, that was a bug and I fixed it in a later video. Sorry about that! Please check this bug fix video (the inventory bug fix starts at 3:30 of the video): kzbin.info/www/bejne/e2WmhJSHfd1sg7M
@berkayw57812 жыл бұрын
Hi Ryi, I have an issue. When i swing sword or interact something(like taking potion, axe, key etc.) first time after the game starts, my game freezes for 0.5 - 1 seconds. Then everything goes normal. There is a bug or something i missed. I couldn't find out why it happens. Could you help me please?
@RyiSnow2 жыл бұрын
There is a little delay when you read a sound file for the first time. Play the field music when you press Start then there's no delay after that. You can also play a blank audio file if you don't want to play music.
@berkayw57812 жыл бұрын
@@RyiSnow Thank you so much! Love the tutorials..!
@solarcubing75042 жыл бұрын
How would you make a door tile that when the user walks into it it changes the map to something else i.e. a cave
@woodswoody55532 жыл бұрын
Make it so that when the player comes in contact with a door the loadmap function is called
@solarcubing75042 жыл бұрын
@@woodswoody5553 I tried this but it just places the map ontop of world map
@woodswoody55532 жыл бұрын
@@solarcubing7504 Yeah I just realized that after attempting it myself
@zmandyce2 жыл бұрын
@4:08 Hi, just wondering how may I prevent, "Inventory is full"? From spamming the side/interaction messages? Also, I moved gamePanel.objects[i] = null; to inside of the if statement. So that when inventory is full the item is not null and thus not removed from the heap. So later when inventory is not full it is still available to be picked up. Please help I've tried checking the messages array containing String "inventory is full" and removing but it disappears too quickly.
@RyiSnow2 жыл бұрын
Hm ok, I think you can avoid that by using a counter. You just need a way to stop adding the message to the array in every frame. Here's an example: boolean pickCounterOn; int pickCounter; (pickupObject method) if(i != 999) { String text; if(inventory.size() != inventorySize) { // if inventory is not full inventory.add(gp.obj[i]); text = "Got a " + gp.obj[i].name+ "!"; gp.playSE(1); gp.obj[i] = null; gp.ui.addMessage(text); } else { text = "You cannot carry anymore!"; if(pickCounterOn == false) { // only add the message when the boolean is false gp.ui.addMessage(text); pickCounterOn = true; // turn it true after adding the message } } } (at the end of the update method) if(pickCounterOn) { pickCounter++; if(pickCounter == 180) { // set the boolean false after 3 seconds (180 frames) pickCounter = 0; pickCounterOn = false; } }
@PatrikM2 жыл бұрын
Amazing series! Could we perhaps use instanceOf instead of manually creating a "type" integer? I used instanceOf MON_GreenSlime for the damage/collision and it worked fine :)
@PatrikM2 жыл бұрын
I tried it and it works, looks something like this: public void equipItem() { int itemIndex = getGamePanel().getUi().getItemIndexFromSlot(); if (itemIndex < inventory.size()) { Entity selectedItem = inventory.get(itemIndex); if (selectedItem instanceof OBJ_Sword_Normal || selectedItem instanceof OBJ_Axe) { setCurrentWeapon(selectedItem); setAttackPower(getAttack()); setPlayerAttackArea(); } if (selectedItem instanceof OBJ_Shield_Wood || selectedItem instanceof OBJ_Shield_Blue) { setCurrentShield(selectedItem); setDefensePower(getDefense()); } } }
@abikyoukan2 Жыл бұрын
so I made custom pixel arts where the character is holding an axe (not attack animation, just holding it normally). How would I go about implementing this to the normal walking images? So that when he changes to the axe, he will be actually holding it. I tried moving the " if(currentWeapon.type == type_axe)" condition to the "public void getPlayerImage()" method but with no luck.
@michajurkiewicz54712 жыл бұрын
if you lived in Poland I would buy you pizzas: D Thank you for the next part :)
@RyiSnow2 жыл бұрын
Haha that would have been great. Anyway I'm glad you are enjoying the videos ;)
@FerodriEste2 жыл бұрын
@@RyiSnow If you ever travel to Argentina, I will take you to eat the best meat in the world!!
@RyiSnow2 жыл бұрын
@Fernando Rodriguez I'd love that :D
@failah7411 Жыл бұрын
Hi RyiSnow! I have a problem, i managed to scale the animation attack images as you did using your same exact setup method, but that doesnt work for object images and im trying figure out why; for example, im trying to display a circus tent made in 48x32 pixels, so: down1 = setup("/structures/circus_tent_1", gp.tileSize * 3, gp.tileSize * 2); but it is always drawn in a tileSize on the map. Same thing with any other images i tryed, for example for a monster 2 tilesize tall, but didnt managed to. How should i do this?
@michajurkiewicz54712 жыл бұрын
I also have a question, will the game finally be full screen?
@RyiSnow2 жыл бұрын
I haven't decided it yet but maybe I'll implement that at around the end of this series.
@vipmember33152 жыл бұрын
Hey I built the engine but my code broke, care tt help fix it? :) Thanks.
@johnsussy84692 жыл бұрын
hi! I'm having an issue with the item pick up. When I try to walk over the key to pick it up, nothing happens. I've checked everything and I don't see where I went wrong. Could you help?
@Mypremiumacct15 күн бұрын
its something in collision detection or your player class. I have used chat gpt to take lines of code to fix it and adding peramiters to make sure it doesnt add or change too much besides fix what may be wrong. Hope you figured it out, chatgpt has helped the headache of sittig down rereading and watching to see what went wrong and getting to it before i can find the problem
@holmdev2 жыл бұрын
I'm adding mana, I want you to have a certain mana when you fight, then you have to add it to be able to fight on .. Am almost there to make it work :)
@Melvin-142 жыл бұрын
he is adding that already
@holmdev2 жыл бұрын
@@Melvin-14 when i write that , he hade not done it yet. :) now he has done it :)
@santanabarman79462 жыл бұрын
Please help me I have an error I can not able to find it When I draw the object on the map after follow previous video the object are flickering
@RyiSnow2 жыл бұрын
You mean the inventory video?
@santanabarman79462 жыл бұрын
From video 1 to inventory video I follow but I can't find the bug
@RyiSnow2 жыл бұрын
@@santanabarman7946 That's a pretty wide scope. Try finding out when (which video or what process made) the issue started otherwise it's difficult to know the cause.
@christianfryksten8524 Жыл бұрын
Hey! You never showed how to display the x and y coordinates when playing
@knightking5735 Жыл бұрын
I created one, here is it, just replace it // DEBUG long drawStart = 0; int countWorldX = player.worldX; int countWorldY = player.worldY; int countCol = player.worldX; int countRow = player.worldY; if (countCol < 0) { countCol = 0; countRow++; } if (keyH.checkDrawTime == true) { long drawEnd = System.nanoTime(); long passed = drawEnd - drawStart; g2.setColor(Color.white); g2.drawString("Draw Time: " + passed, 10, 400); g2.drawString("Col: " + (int) Math.round((double) countCol / tileSize), 10, 320); g2.drawString("Row: " + (int) Math.round((double) countRow / tileSize), 10, 360); g2.drawString("WorldX: " + (int) Math.round((double) countWorldX), 10, 280); g2.drawString("WorldY: " + (int) Math.round((double) countWorldY), 10, 240); } I re-update it today, i made it count worldX and worldY
@Mypremiumacct15 күн бұрын
it was in the 7 min bugfix vid a few vids before the one on this playlist. hope you figured it out
@MrLoser-ks2xn2 жыл бұрын
Thanks!
@k0vier2 жыл бұрын
Hey, I commented on your "#12 - Character Creation Screen - Dungeon Crawler RPG Development in Java" video can you please answer there because I think KZbin didn't send notifications like before when we talked in the comments on your first dungeon crawler video😅
@RyiSnow2 жыл бұрын
I'm receiving notifications. It's just a bit hard for me to reply everything. I hope you understand.
@GutekLive2 жыл бұрын
more pls
@Clipaholick2 жыл бұрын
thanks ryi
@nguyentony96352 жыл бұрын
thank you
@matisgeretti-uyanik562 жыл бұрын
Are you using JavaFX?
@RyiSnow2 жыл бұрын
No
@edward2652 жыл бұрын
That looks like Java Swing.
@MrLoser-ks2xn Жыл бұрын
🥰🥰🥰
@oguzhantopaloglu94422 жыл бұрын
You should really learn about enums and naming conventions in Java
@havardelgsaas2603 Жыл бұрын
When I pick up an object(item), the text shows: "You got a Green Slime". Does anyone know how to fix this problem? I wrote: text = "Got a " + gp.obj[i].name + "!"; in the Player class.
@knightking5735 Жыл бұрын
make sure u wrote it in the correct method or check the OBJ_ItemName because u must've changed it or accidentally wrote it in the name variable
@hawkale1402 жыл бұрын
I am a bit late, but you could simply add to the different sprites the name of the weapon for example "sword _attack_left" or "axe_attack_left" and instead of doing a different if statement for each weapon you use player.currentWeapon.name +"_attack_left" to get the proper animation. so that you don't have to add an if statement when you add a new weapon. (this is usefull only if you have many weapons and don't want them to have shared animations)