Knockback - How to Make a 2D Game in Java #41
In this video, we implement additional combat mechanics so we can destroy monsters' projectiles and also knock them back.
Guidelines for using Blue Boy Adventure's code and assets:
docs.google.com/document/d/1q...
Timestamps:
0:00 Introduction
0:51 Cutting down monsters' projectiles
6:24 RESULT
7:50 Adding knockback effect
14:05 Adding knockback power to weapons
16:59 FINAL RESULT
#javagamedevelopment #javagametutorial
Пікірлер: 31
These videos are absolutely amazing, hope you do a turn based battle system in the future...like Final Fantasy or Pokemon. Looking forward to all your future content.
Finished up the A* videos today. Really took my time with both of them, but will definitely rewatch them multiple times in the future to solidify the concept and logic. Everything is working great so far. Looking forward to implementing knockback tomorrow! Thanks RyiSnow!
I really like the knock back system Thought about this for a wile, so it's nice to see you working on it
If only these series would last forever :)
Glad to see the latest episode of the video so soon
Nice new video from RyiSnow
Wow! i'm at the 6# episode and i watch this one to know the end, and it looks amazing! And will it ever end?
Great video! I think it's a good idea to create a discord for us to implement new mechanics to the game and help each other. (sry for my english)
hey, rysnow, do you know how to make the mobs play attack animations? i really need this, when i tried to do it they would just keep playing the animation and would play it really fast
Thanks!
Excellent video Ryi. For later it would be great that when you kill all the slimes, somehow they spawn again but stronger (more hp, attack, defense, speed)... I don't know, it seems like a good idea to give it a story without end!! hehe.
Great video! Will there be a video on crafting system?
@RyiSnow
2 жыл бұрын
What kind of stuff do you want to make with the system?
@LORF0
2 жыл бұрын
Stuff like tools for example. But looking at the current state of the game adding a crafting system is a bit early since there isn't any sort of materials to be collected like wood or things from caves(which is a whole different system by it self to be added). Probably be best for the next new game series or at the final stages of this current game. Thanks for the reply tho!
Hi Ryisnow, I was wondering if you could make the player take knockback from monster projectiles?
Hey, i was wondering how could you easily implement an option for multiple languages in game. I thought about using dictionaries, but the way i wanna do it just seems way too complicated. Do you have any tips for that? Thank you :D
@RyiSnow
2 жыл бұрын
Sorry, I don't really understand your question Do you mean you already have translated texts and wondering how to implement them?
@michael_hraje
2 жыл бұрын
@@RyiSnow i havent translated the texts yet, but i want to try implementing the translation as another option and i am wondering how to do that the best way possible
@Merkuse
Жыл бұрын
@@michael_hraje Add a variable that is responsible for the language. Then put "if condition" in each place where the program writes the text. Something like "if (lang == "eng") {// write English text} and so on
THank you!!!!!!!!!!!!!!!!!!!!!!
And also, i got a suggestion wich is pretty hard or idk but, it's to make the game multiplayer (LAN) but I think it's waaaay too much for now
💪
This one was very interesting! the only problem is that if i shoot a fireball and then change direction, the monster will be pushed in the new direction and not in the right one. For example: o x "o" is me and "x" is monster. if I shoot and then run to the left before the fireball hits the monster, the game reads that my direction is left so the monster is "dragged" towards me and not pushed away. I tried adding the direction of the hit when calling the method damageMonster but it doesn't seem to fix the problem...
@RyiSnow
Жыл бұрын
You're right. That is a bug. If you want to add knockback power to projectiles and avoid the issue, here's a quick fix: public void damageMonster(int i, int attack, int knockBackPower, String direction) // receive direction parameter damageMonster(monsterIndex, attack, currentWeapon.knockBackPower, direction); // pass direction parameter knockBack(gp.monster[gp.currentMap][i], knockBackPower, direction); // pass direction parameter public void knockBack(Entity entity, int knockBackPower, String direction) // receive direction parameter gp.player.damageMonster(monsterIndex, attack, knockBackPower, direction); // pass projectile direction else if(collisionOn == false) { switch(gp.direction) // change from player direction to entity direction This way the knockback direction should be handled properly.
@hawkale140
Жыл бұрын
@@RyiSnow thank you, I really appreciate you always answer my doubts
🥰🥰🥰
Upon attacking, my character freezes
Hi ryi. My comment got deleted because it had a link in it I think. There is someone on tiktok that took credit for some of your work and I thought you should know.
@RyiSnow
2 жыл бұрын
Really? Can you tell me a search keyword that leads to the video?
@RyiSnow Hey, I am wondering could you create a lot of bouncing balls in the box ?
@RyiSnow
2 жыл бұрын
What?