Bug Fix: I've 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
My dialogue when Blue Boi consumes a "Key" "Are you trying to eat the Key?! You donkey!" Just a slight play with words (eating is a derivative of consuming)
@ryiSnow I am so excited!!!!! I have learned so much from you! I took what we did with the merchant npc and made a storage chest out of that code! It took me all day to work out the problems I kept facing but I succeeded! Thank you!
Thank you, RyiSnow! It's amazing video! Please, could you explain how to do critical damage for weapons, if you have the time and desire. I tried to do this, but it turned out that the weapon just got a random attack value for the whole game. Thanks again
You can set a percentage for critical hits (and a critical damage too if you want) on each weapon like this: [Entity] public int criticalRate; [Weapon] criticalRate = 8; Then when you give damage to a monster, use the Random class and get a number between 1 to 100. If the number is within the current weapon's criticalRate (1 to 8), double the damage or add an extra number.
Hi RyiSnow! I noticed in later videos that in the OBJ_Chest class, you have a method written called setLoot, in which video did you write this method because I've looked at the later videos and couldn't find where exactly it was written. I'd like to know where we call this method and how to pass the loot through the method. Thanks!
can you make a tutorial on how to make lighting (for example from a lightbulb: A small lightened area)? And also, about how to make the game's lighting darker in general, like in a horror game. Or just at night - How to make the screen go dark xD. Cause I wanna implement a lantern item in a ruin, and I need to know how lighting works
There is a bug in this one. If you place some coins, or pick them up when you kill a monster, you get an error. It is because under player/pickUpObject, it is nulling out type_pickupOnly items BEFORE it then looks to see if its an obstacle or inventory. Need to add an if loop around the code after the pickup to check if the gp.obj[gp.currentMap][i] != null to avoid it. Hopefully he fixed it later.
IDEA: Who is be possible to add a bit of code to give our player's hero a NPC who follows with him around? - Perhaps a pet wolf or hawk. It would be great if the wolf could attack monsters - automatically when they get near the hero.
Check the Part 40. We implemented an NPC who follows the player and monsters who attack the player when they detected him. Combined with them you can create an NPC who follows the player and attacks monsters nearby.
Hi, i have an issue. If I add boots and it speeds up my character and then try to open the door, it just cannot be done because the col or row does not match. Currently default speed is 4 and with the boot is 5.Do you know how to fix it?
Hey @RyiSnow! At this point I just noticed my generate particle doesn't work anymore for cutting down trees and I had to try to make it work when we changed the list to [][] array for the projectileList.add(p1) ... projectileList.add(p4) etc ... I made it work for the destroying of the enemies rocks but the trees do not get damaged anymore ... can you or someone else Please post the code for Entity's generateParticle(Entity generator, Entity target) Up to this point in the series so I can see the fix for that method when everything was changed to double array [][] (This method you must of fixed on own as it was not shown in the video at the time nor since) Appreciate it greatly if you could post that! Thanks! And as always LOVE the tutorials!! :)
But you changed ArrayListprojectileList to Entity[][] projectile .. Now in that generateParticle method in Entity we have to change it otherwise there would of been errors? It used to be gp.projectileList.add(p1)… to .add(p4) Can you double check your Entity generateParticle() to see
I changed the projectile list to two-dimensional but kept particleList one-dimensional since particles just disappear and we don't need to keep them on the map. Maybe you changed the particleList to two-dimensional by mistake? And yes, I double-checked my latest generateParticle method and the method I showed in the particle video and they were identical.
@@RyiSnow it doesn’t appear like it? The particle list is not two dimensional.. I’m not sure what happened but I guess it doesn’t matter. I’ll redo your tutorial for further experience after I do the rest of your you tube tutorials on Java as you are very good. Having a GitHub account would help matters greatly but I understand this world is full of thieves who steal and release as their own. I hope you continue to make RUclips tutorials- I’ll definitely be watching!! 🙂
Bug Fix:
I've 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
My dialogue when Blue Boi consumes a "Key"
"Are you trying to eat the Key?!
You donkey!"
Just a slight play with words (eating is a derivative of consuming)
Awesome! thanks for releasing great content!
@ryiSnow I am so excited!!!!! I have learned so much from you! I took what we did with the merchant npc and made a storage chest out of that code! It took me all day to work out the problems I kept facing but I succeeded! Thank you!
Thank you, RyiSnow! It's amazing video! Please, could you explain how to do critical damage for weapons, if you have the time and desire. I tried to do this, but it turned out that the weapon just got a random attack value for the whole game. Thanks again
You can set a percentage for critical hits (and a critical damage too if you want) on each weapon like this:
[Entity]
public int criticalRate;
[Weapon]
criticalRate = 8;
Then when you give damage to a monster, use the Random class and get a number between 1 to 100. If the number is within the current weapon's criticalRate (1 to 8), double the damage or add an extra number.
Hi RyiSnow! I noticed in later videos that in the OBJ_Chest class, you have a method written called setLoot, in which video did you write this method because I've looked at the later videos and couldn't find where exactly it was written. I'd like to know where we call this method and how to pass the loot through the method. Thanks!
I did it when I implemented the save and load system!
can you make a tutorial on how to make lighting (for example from a lightbulb: A small lightened area)? And also, about how to make the game's lighting darker in general, like in a horror game. Or just at night - How to make the screen go dark xD. Cause I wanna implement a lantern item in a ruin, and I need to know how lighting works
how long have you been programming games?
I wrote my first Hello World program about 6 years ago.
@@RyiSnow thank you very much for the reply, hugs from Brazil
There is a bug in this one. If you place some coins, or pick them up when you kill a monster, you get an error. It is because under player/pickUpObject, it is nulling out type_pickupOnly items BEFORE it then looks to see if its an obstacle or inventory. Need to add an if loop around the code after the pickup to check if the gp.obj[gp.currentMap][i] != null to avoid it. Hopefully he fixed it later.
nice tutorial bro, but where you have this knowledge?
IDEA: Who is be possible to add a bit of code to give our player's hero a NPC who follows with him around? - Perhaps a pet wolf or hawk. It would be great if the wolf could attack monsters - automatically when they get near the hero.
Check the Part 40. We implemented an NPC who follows the player and monsters who attack the player when they detected him. Combined with them you can create an NPC who follows the player and attacks monsters nearby.
Hi RyiSnow, if possible could you give me a thought on how to implement infinite world generation? I really want to implement this in my game.
Hi, i have an issue. If I add boots and it speeds up my character and then try to open the door, it just cannot be done because the col or row does not match. Currently default speed is 4 and with the boot is 5.Do you know how to fix it?
Thanks!
Hey @RyiSnow! At this point I just noticed my generate particle doesn't work anymore for cutting down trees and I had to try to make it work when we changed the list to [][] array for the projectileList.add(p1) ... projectileList.add(p4) etc ... I made it work for the destroying of the enemies rocks but the trees do not get damaged anymore ... can you or someone else Please post the code for Entity's generateParticle(Entity generator, Entity target) Up to this point in the series so I can see the fix for that method when everything was changed to double array [][] (This method you must of fixed on own as it was not shown in the video at the time nor since)
Appreciate it greatly if you could post that! Thanks! And as always LOVE the tutorials!! :)
Hi, I didn't change the generateParticle method. It's the same as I showed in the particle video.
But you changed ArrayListprojectileList to Entity[][] projectile ..
Now in that generateParticle method in Entity we have to change it otherwise there would of been errors?
It used to be
gp.projectileList.add(p1)… to .add(p4)
Can you double check your Entity generateParticle() to see
I changed the projectile list to two-dimensional but kept particleList one-dimensional since particles just disappear and we don't need to keep them on the map. Maybe you changed the particleList to two-dimensional by mistake?
And yes, I double-checked my latest generateParticle method and the method I showed in the particle video and they were identical.
@@RyiSnow it doesn’t appear like it? The particle list is not two dimensional.. I’m not sure what happened but I guess it doesn’t matter. I’ll redo your tutorial for further experience after I do the rest of your you tube tutorials on Java as you are very good.
Having a GitHub account would help matters greatly but I understand this world is full of thieves who steal and release as their own.
I hope you continue to make RUclips tutorials- I’ll definitely be watching!! 🙂
Nice!
🥰🥰🥰
Nice
Do you have a discord?