Boss Health Bar - How to Make a 2D Game in Java #55
In this video, we will display a special large boss health bar (something you see in games like Dark Souls)
If you have any questions, feel free to leave a comment.
Guidelines for using Blue Boy Adventure's code and assets:
docs.google.com/document/d/1q...
Thanks for watching!
Timestamps:
0:00 Introduction
0:53 Fixing the projectiles' damage
1:54 Preparing the special boss health bar
3:37 Drawing the monster health bars in the UI class
6:00 Checking if the monster is in the camera
9:14 Fixing the monster value references
11:03 Differentiating normal monsters and bosses
11:33 Drawing the boss health bar
13:25 Drawing the boss's name
14:25 FINAL RESULT
#javagamedevelopment #javatutorial #gameprogramming
Пікірлер: 49
Thank you for continuing this series. I know how much effort it takes to create so many videos, which is why I appreciate it all the more. I think we're just missing quests and dialogue options to be happy :) And I think I'm not the only one who would be grateful for creating this.
Thank you king you are the one we needed but didnt deserve. This has been an epic journey and i cannot express how grateful i am.
Amazing. Thanks again for your videos!
I love your content!! Thank you so much ♥️🇦🇷
Amazing work bro youre truly amazing and im so hsppy you got your content back from that russian guy
What an amazing job, my friend! Thanks for putting out such cool tutorials. It's pure gold indeed. If possible, could you share sites or books you learn all this from, please 🥺? It would be great to keep learning and go a little deeper into game development. Again, thank you very much. Keep up the good work 👊🏾😎!
@RyiSnow
Жыл бұрын
I've learned a great deal from a website called ZetCode: zetcode.com/all/#java This is an amazing website that covers various topics. Not only Java but other languages too :) As for books, if you'd like to develop this kind of 2D game, I'd recommend you to check out a book called Killer Game Programming. It's kind of an old book and the information is a bit dated but it's very well written.
This guy really deserves more
Was baited to watch all the playlist 🤣 thanks for your content
Thanks!
Hey, I've been watching your tutorials almost since the beginning and they are great! And I have a little question: do you know how to fix GUI "blinking"? if you need more information, just tell me! Thank you.
Thank you very much for your series and your videos, could you bring a video teaching how to make the game screen fullscreen? thanks
Nice!
Do you think you will ever add something to allow using the mouse in the game as well? for example during the option menu or while buying from npcs...
NICE!
very good.
Question: What happens behind the scenes - for instance, if I upload a game to Steam I made etc... I then later make changes / update my game, code.... what happens then? No one explains this... is the user's original game file removed and replace with an entire new update file? This all happens simultaneously - without messing up my games Stardew Valley or Animal Crossing game progress. I have no idea of the magic that is going on behind the scenes.
@RyiSnow
Жыл бұрын
As long as you don't overwrite users' save files and keep the main program compatible with the previously saved files, users should be able to retain their progress!
I started with episode 1 of this series but what java version do you use? I have tried 3 times but at episode 3 it says "String inaccessible here" (here is the switch statement) please respond I was and still am so hyped up about this series, I watched this episode and when I saw the boss battle I was star struck. Please respond I really want to start this series!
@RyiSnow
Жыл бұрын
I'm using Java 8 for this one but the code should be compatible with the later versions!
@postscriptcoding
Жыл бұрын
@@RyiSnowI used correto 16 and 8 but it did not work oh and correto is the aws version of java
@postscriptcoding
Жыл бұрын
I have to like and subscribe at this point I like how you explained it very thouroghly in every episode 😃
@RyiSnow
Жыл бұрын
@@postscriptcoding Hmm I see. I've never used Corretto so I can't say for sure. Amazon says Corretto is compatible with Java SE but maybe not completely. Maybe you can try the standard Java JDK (by Oracle) and see if it works?
@postscriptcoding
Жыл бұрын
@@RyiSnow thanks for the feed back but I can't say for sure it is a problem with the sdk
Nice, sadly I am stuck at part 19. For the life of me I can’t get events to work I got it to work once and now even after redoing the entire part 19 still doesn’t work.s
Yay
I have recently started following your tutorial but I am stuck a part 8. I can move around in game but when I move over the objects nothing happens. I have redone the tutorial 2 times but still nothing happens.
@RyiSnow
Жыл бұрын
Zip your project folder and send it to me then I will take a look.
@dominicsmit8541
Жыл бұрын
@@RyiSnow I have sent you the code. thank you for helping I really am grateful.
@RyiSnow
Жыл бұрын
Thanks for the code. Here's what you wrote wrong: Change this: gp.obj[i].solidArea.x = gp.obj[i].worldY + gp.obj[i].solidArea.y; To: gp.obj[i].solidArea.y = gp.obj[i].worldY + gp.obj[i].solidArea.y; Then it should work!
@dominicsmit8541
Жыл бұрын
@@RyiSnow Thanks for the help, I can't believe that it was such a small problem that made such a big difference.
🥰🥰🥰
Hey. Im creating dialogues in my game, and the code works. But I can't close the dialogue-window when i press enter. I checked my code many times, but I can't find my mistake. Do you know what it could be? Im really frustrated. Thx for your help
@Nxjdjfjfjrjdjd
Жыл бұрын
Hello. Try to debug with breakpoint.
@anitaanonym7307
Жыл бұрын
@@Nxjdjfjfjrjdjd Hello and thank you that you want to help me. I think the mistake is in one of this codes: public void InteractNPC(int i){ if(i != 999){ gp.gameState = gp.dialogueState; gp.npc[i].speak(); } } or here: else if(gp.gameState == gp.dialogueState){ if(code == KeyEvent.VK_ENTER){ gp.gameState = gp.playState; } } or maybe here: public void speak(){ gp.ui.currentDialog = dialogues[dialogueIndex]; dialogueIndex++; } if theres no problem, I can send you pictures on reddit or snap. But i understand if this is too much effort for you. PS: Sorry for my bad english
@RyiSnow
Жыл бұрын
If you could zip your project folder and send it to me, I will take a look.
@anitaanonym7307
Жыл бұрын
@@RyiSnow ah, this would be really great. But how can i send you this ?
Blue boy souls
Why don't you just put if(hpbarOn) rather if(hpbarOn == true) idk that just me less text (removing redundancy)
@RyiSnow
Жыл бұрын
This is a tutorial for beginners (or at least it started that way) so I try not to write it in as abbreviated a form as possible and make the code more readable!
Hi Ryi. Maybe you can consider to add watermark to your videos. So that it will be visible even if somebody download your video from KZread, so that they cannot re-upload your vieo, and it will be more easy to proof that it is yours
@michajurkiewicz5471
Жыл бұрын
This Russian did not copy videos from this channel, but made his own :) This cannot be secured. The exception was the editor he used, which he simply stole.
@RyiSnow
Жыл бұрын
I'm actually adding a watermark to each video! You can see it at the bottom right of the screen (If you cannot see it, I'll check my setting so please let me know). And yeah, as michal says, if they re-type the code the watermark doesn't really protect your content. Still, better than nothing I guess!
@MajorMonogram
Жыл бұрын
@@RyiSnow Hey, check your settings again, I can't see a watermark! :)
@RyiSnow
Жыл бұрын
That's weird. I'm seeing the watermark. Just checked the settings and confirmed the watermark is on.