The First Game Done (UI) - How to Make a 2D Game in Java #10

  Рет қаралды 44,148

RyiSnow

RyiSnow

Күн бұрын

Пікірлер: 137
@RyiSnow
@RyiSnow 2 жыл бұрын
This is the final episode of the first half of this tutorial. Thanks for watching! I hope you enjoyed our journey so far. BUT this is not the end! After this, I will probably make a couple of extra video to answer and apply the requests/questions that I've received throughout this series. I also update the tile images to improve the graphics. Then we move onto the second half and change this to action RPG. If you're interested, please come along!
@holmdev
@holmdev 2 жыл бұрын
Nice work , i think you have made a good job here,
@holmdev
@holmdev 2 жыл бұрын
If I want to add a black panel behind the icons, then I have to add a JPanel, I suspect that is the easiest way.
@RyiSnow
@RyiSnow 2 жыл бұрын
You can draw a rectangle :)
@holmdev
@holmdev 2 жыл бұрын
@@RyiSnow thats was very good. Work fine :)
@abcd-pr6tw
@abcd-pr6tw 2 жыл бұрын
Hello, first thank you for your videos! when are you going to make the part 2?
@DormantLemonGames
@DormantLemonGames 2 жыл бұрын
So glad you went through the effort of making this series! A really good introduction to 2d game development. Thank you so much for sharing!
@RyiSnow
@RyiSnow 2 жыл бұрын
It was my pleasure! It took longer than I thought but I'm glad I made it :D
@jamesconwell2767
@jamesconwell2767 2 жыл бұрын
Best java tutorial on youtube, you need more love.
@Phil1490
@Phil1490 2 жыл бұрын
Dude this series is SOOOOOO GOOD! You're a very good teacher. You explain things very well and appreciate these videos very much.
@MattListor
@MattListor Жыл бұрын
This series is amazing. I’m so glad I put in the time for this one.
@sorcerian_bootleg7112
@sorcerian_bootleg7112 2 жыл бұрын
Always cool to see a new video of this series! I am curious about some details that this game could need. For example, a menu, with an inventory. Or a menu to configure music and sound volume (or to mute them). Or to exit game. There's also more complex elements i'm curious about. One of them is the use save datas to store your progress. Or the use of flags to progress through the story... I suppose all of this is too complex and it would take a lot of time. But i hope you can go through some of this questions some day! :D
@RyiSnow
@RyiSnow 2 жыл бұрын
No worries, everything you just mentioned (menu, inventory, save/load) will be featured in the second half :P The first half was just meant for introducing the basics. It will be a completely different game when everything is done!
@sorcerian_bootleg7112
@sorcerian_bootleg7112 2 жыл бұрын
@@RyiSnow that's cool! Looking forward to it!
2 жыл бұрын
good job, as the tuturial finish, a work game engine is done
@gustavhenriksson867
@gustavhenriksson867 2 жыл бұрын
Love how many hours was spent to make the first half when it took 30 sec to win the game :D Love coding and learning from you Ry! you are the very best!
@silentdisposition
@silentdisposition Жыл бұрын
Just a quick tip when checking boolean variables in if statements instead of saying (if var == true) you can just use if(var) as this will automatically check if the boolean is true and if you want to check for false you use if(!var), slightly saves memory and looks better :)
@sukkarakan_haitang
@sukkarakan_haitang 2 жыл бұрын
I don't know if you did a part where getting an object lets the character walk over solid objects, I just watched till this part 10. But I really wanted a walk on water object. So I added that on my own and IT WORKED. YOU DON'T KNOW HOW HAPPY BEING ABLE TO FIGURE OUT SOMETHING ON MY OWN MAKES ME HERE(probably do though). This series is amazing, honestly I love it to death, this is the only thing reassuring me, that I did not make a wrong decision by taking CSE as my undergrad major which I've been dreading for the past 7 months. And I won't be f-ing up my life thinking I shouldn't have chosen this just because I thought making games would be fun. IF I AM GUIDED PROPERLY IN THE EARLY STAGE I CAN, AND IN SHA ALLAH I'LL BE GREAT AT IT. DAKARA, WATASHI WA ANATA GA SHITE KURERU KOTO NI KOKOROKARA KANSHASHITE IMASU
@RyiSnow
@RyiSnow 2 жыл бұрын
I know that feeling. It feels great when you could figure things out and your own idea comes to fruition. The possibility is infinite and it makes programming so much fun. Great to hear that you experience that and I hope such a moment will keep coming to you. それとあなたの日本語はとても上手ですよ。 Good luck with your CSE study!
@Entity_The_Demon
@Entity_The_Demon 2 жыл бұрын
honestly, making an object that lets you walk on water isn't exactly hard...
@goozjeesh46
@goozjeesh46 Жыл бұрын
@@Entity_The_Demon why you gotta put them down like that? they're probably new to programming and dont know how to do very many things. i also am very happy when i can figure things out on my own
@shopenggu4779
@shopenggu4779 Жыл бұрын
Hey, is it okay if I'd ask how you made this function?
@sukkarakan_haitang
@sukkarakan_haitang Жыл бұрын
@@shopenggu4779 Just add a case where if you get the shoes water tile changes to not an obstacle.
@snarpking
@snarpking 2 жыл бұрын
You are an actual god among men. Thank you for blessing us with your presence on KZbin.
@midostar3463
@midostar3463 Жыл бұрын
Ryi Hello! Thanks for this good tutorial. It helped me to improve myselft and to familiarize with games structure, especially in Java :D I have only one question and will be happy if you answer it. How do you create executeble JAR projects, so it works after you double click with mouse on it? I'm working in intellij idea and there's possibility to press File -> Project Structure -> Artifacts -> Jar from Modules and choose main class. After doing that, you press build ->build artifact and intellij creates JAR in out ->artifacts. The problem is that this JAR isn't executable for usual person (it can be run only in intellij). I tried to run it on my PC by double clicking in the windows explorer, but it hasn't reacted. The packet structure is the same as yours (actually it wasn't the same, but for a test i did it the same as in video). I search whole internet, but still haven't found any solution. Maybe there's another way to create the executable JAR? (I also tried console commands, but it hasn't succsead as well). I'm looking forward to your reaply and thanks in advance!!
@panicuros7301
@panicuros7301 2 жыл бұрын
Thanks man this really helps !
@ReivajGG55
@ReivajGG55 7 ай бұрын
You are a legend. Here i am. Learning how works a game in Java to Present and defend my Programming II Project. Thank you so much for the tutorials. I will keep Learning new things with you.
@spicybean8
@spicybean8 2 жыл бұрын
Much fun to code this game. Thanks a loy
@unknownplayer-c1i
@unknownplayer-c1i 2 жыл бұрын
I'm following your tutorial since 1 month, I started learning Java since 2 months and it's a very nice tutorial for practicing all I've learned. It's so playful ! I'm not fluent in English but with english subtitles I can easily follow your explanations and understand what I'm doing haha. I can't thank you enough for all the work you have done. I will go to the end of this tutorial in honor of your work. Hope this will help me to be a junior developper after all.
@ayushgaming9318
@ayushgaming9318 2 жыл бұрын
Please give source code for the first game🥺🥺🥺🥺🥺🥺
@artisingh5411
@artisingh5411 2 жыл бұрын
Please my code is not working
@Chocc_Ice
@Chocc_Ice 2 жыл бұрын
Your message timer was very useful. I included a bump sound effect when player collides with a wall. Collision happens too rapidly and it sounds horrible though. So the timer solves 2 problems.
@Often_Guy
@Often_Guy Жыл бұрын
0:56 That's weird because I clearly hear both sounds at the same time
@GameInOne
@GameInOne 3 ай бұрын
It might only be in my laptop, I dont know but when I press both up and down the char goes down if up + down goes up and down after i press down if down + up goes down Same with right and left if left + right goes left and right after i press right if right + left goes right Also i just realized the character could move diagonally before if i pressed left/right + up/down but now the character dont move that way
@neemair9008
@neemair9008 12 күн бұрын
Theres one thing that i thik would be nice to do: when you bump into a door and you have no key for that, the soundeffect "blocked" will play a lot of times. I fixed that by creating a "playedRecently" integer = 0 in the GamePanel Class. In the playSoundEffect Method: if(playedRecently==0) -> play soundeffect, playedRecently++;. to reset the playedRecently value i used the FPS controll in the run()-Method. if(timer>1000000000) -> ... playedRecently = 0 ... That fixes the Problem.
@vVictorNos
@vVictorNos 8 ай бұрын
Made it to first half yes!! You have no ideaI how much i appreciate these tutorials, thank you so much! I will follow through the end!!
@RyiSnow
@RyiSnow 8 ай бұрын
Glad I could help! Hope you'll enjoy the rest of the series!
@se2180
@se2180 2 жыл бұрын
hello i would like to say your tutorials are really helpful for me for my school project !! tysmm for that ! however i would like to ask for the play time how do you make it decrease and stop at 0? as i manage to make it countdown from a set timing but not sure how to stop the time when it reaches 0
@RyiSnow
@RyiSnow 2 жыл бұрын
You can create an if statement and stop decreasing the time after it hit 0.
@davidbijaksantoso-085
@davidbijaksantoso-085 Жыл бұрын
hey I have a problem, is there a way to completely stop the game when character reach the treasure? thank you.
@ihavenoidea2736
@ihavenoidea2736 12 күн бұрын
Damn. Completed the first half. Cannot wait to continue, and implement my own stuff as well. Thank you, RyiSnow, for your service❤
@hentercato
@hentercato 9 ай бұрын
You are my hero!!!🥰
@edgaro93
@edgaro93 Жыл бұрын
Hello! Thank you so much for this, I have learned so much about how the game accually works, but I have an Issue at 11:06, line 21: "keyImage = key.image;" it says that "image" doesnt exist in key I tested it also with door object and it still does not work, the BufferedImage in superobject class is public (image) so I would really need your help! Edit: Sorry i had put image(); not image; so eclipse tought it was a method :) Honest mistake *Love your vids*
@janrui2477
@janrui2477 Жыл бұрын
I actually finished the first half!! I learned so much from this, I still have to review other codes though... after that I'll be watching the next part!! see you there fellow watchers!
@AlexanderHL1919
@AlexanderHL1919 5 ай бұрын
*edit* I placed the gp.playSE(3) before the if loop in the door case in the Player class hence why it was playing the sound when detecting collision with the player. And it sounded weird because it was playing it hundreds of times over itself I guess for as long as there was collision detected with the player against the door. Hi RyiSnow, thank you for making this series. Its really helpful. If I may ask, when I run up to a door like you do at 18:11, and I do not have a key for the door yet, the game still plays a sound effect, not the unlock one, just a very strange sound. It sounds like a bug, but I'm not sure how to fix it. Have you run into this issue?
@glowiak3430
@glowiak3430 2 жыл бұрын
Nice tutorials, but when a sound is played too much it throws java.lang.IllegalStateException: Clip is already open with format PCM_SIGNED 48000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian and frame lengh of 18240
@deborahlawani5539
@deborahlawani5539 28 күн бұрын
Nice work @ryisnow, but is there a way i can implement the current distance of the player away from its initial location. with x and y axis
@hameemhoque
@hameemhoque Жыл бұрын
Hi RyiSnow, not sure you'll read this but that's okay. I just wanna show my gratitude for this series. It's been super helpful and informative, and I've been able to understand you clearly as you explain things so well. I've also been making comments in the code to help me understand the code better and I've been taking notes on pen and paper. Seriously though, this series is incredible and I'm excited to go through the other 50 videos you have made. Thank you so much, RyiSnow! 😁 💯
@RyiSnow
@RyiSnow Жыл бұрын
Thank you so much for your kind words! It means a lot to me. I hope you will keep enjoying the series!
@boltgreywing4562
@boltgreywing4562 10 ай бұрын
I am kind of curious if it is possible to build your own Font class so you don't have to worry the built in text font so that it calls from the graphics that you put in and scales or decreases them accordingly? I haven't really seen many videos out there that tackle that sort of challenge.
@MarioLabadanBaseball
@MarioLabadanBaseball 2 жыл бұрын
Hello is it possible to open up a new jframe saying congratulations instead of it popping up in the middle of the screen? Also is there a way to dispose of the game jframe while opening up the congrats screen?
@RyiSnow
@RyiSnow 2 жыл бұрын
It is possible. You can instantiate a new JFrame and dispose the old one.
@weptashka
@weptashka 2 жыл бұрын
ryi, you are the best! 👍
@jarrodmcevoy
@jarrodmcevoy 2 жыл бұрын
My high score is only 29.08 seconds. I think I can do better!
@RyiSnow
@RyiSnow 2 жыл бұрын
wow that's super fast! I never thought you can beat the game under 30 seconds lol My best score was like 30.30
@Magnezone962
@Magnezone962 8 ай бұрын
How do I write if all the items like collecting all the available diamonds, are collected?
@FerodriEste
@FerodriEste 2 жыл бұрын
Ryi sos mejor que mis profesores de la universidad!!!
@Mypremiumacct
@Mypremiumacct 3 ай бұрын
I had to do a lot of debugging and not even chat gpt4o could detect my problem...turns out my background green I set in the very beginning caused the sound and text at the end to not appear and I finally figured it out after combing through it all. I feel like I am becoming more competent as to how to fix little funny mishaps like this and have been having a blast experimenting with other features such as a dodge roll(though I dont have sprites for it yet). I can feel how its starting to shape up. And in the end when you tried for a better score, that showed me, and I felt it too, that this is really becoming a game. I cannot wait to deviate further from your game to really make mine stand out but I will follow through till the end just to learn everything I can from you. Thank you so much and I cant wait to do more!
@nadinewalter-lang9333
@nadinewalter-lang9333 4 ай бұрын
You're legend! Thank you very much for your effort!
@mikemazanetz4183
@mikemazanetz4183 7 ай бұрын
cool - you answered my question from tutorial #9 !
@leonidas14775
@leonidas14775 5 ай бұрын
Super! your tutorial makes learning Java fun
@MrLoser-ks2xn
@MrLoser-ks2xn 2 жыл бұрын
Thanks!
@NikitaBomba112
@NikitaBomba112 Жыл бұрын
Thanks you so much for this video!
@clovercandii
@clovercandii 2 жыл бұрын
hello! I have a few questions. is there a way to add a background to the text? When I open the chest I want a long message to show, sort of like a letter, and I'd like there to be a solid color in the background. I tried adding a JPanel and JTextArea but I am not very good at java so i probably did it wrong (it didnt show up). Also, is there a way to add multiple lines of text to the thing that pops up (again, in sort of a letter format)? when i did it didnt work. Again, thank you so much for this in depth tutorial. It is very very beginner friendly and very clear. Keep up the amazing work, I appreciate it a lot!!
@RyiSnow
@RyiSnow 2 жыл бұрын
Hi, everything you just asked has been explained in Part 15 video. Glad you're enjoying this tutorial!
@clovercandii
@clovercandii 2 жыл бұрын
@@RyiSnow oh thank you so much!!!
@Dogukan-tm5xh
@Dogukan-tm5xh Жыл бұрын
53,37 pff :D sdada ver nice teacher :)
@ParalyticAngel
@ParalyticAngel 6 ай бұрын
31:97 here !!! 😉😉😉 Thank you man for that little but fully game so far.^^ 👍👍👍 The key controls needs diagonal movement, or should react more precise when releasing a key. For example: when you press W & D together and then you release W a millisecond, the player should walk right. Sometime you have to walk a little bit down for being able to walk again upwards.
@kimabram
@kimabram Жыл бұрын
Good evening sir. I was planning to make different characters with different abilities, but I don't know how to make that idea possible. I'm the guy from school who will use your project for my final exam. Any advice for me to do that? I was planning to put the character selection in the front screen (after pressing start). :) Thinking of Brawler, Swordsman, Archer, and Magic Caster. Just a character selection is my problem I guess due to everything in the game is good and I followed. I just don't know now how can I make character selection.
@edward265
@edward265 2 жыл бұрын
Besides your tutorial do have any other resources that can help? I have try to develop a 2d game before but the engine got complex and so did the music.
@RyiSnow
@RyiSnow 2 жыл бұрын
I'd recommend you to check a website called ZetCode. It's pretty great!
@michaelsaunders64
@michaelsaunders64 2 жыл бұрын
thank you for the helpful information :)
@bluethemcguy4430
@bluethemcguy4430 2 жыл бұрын
Hi, would you be making a survival 2d game in the future?
@RyiSnow
@RyiSnow 2 жыл бұрын
I might be. Can you be more specific? Like what game?
@bluethemcguy4430
@bluethemcguy4430 2 жыл бұрын
@@RyiSnow Like building a house, eating, fighting monsters, surviving the day
@artebotastic8846
@artebotastic8846 2 жыл бұрын
@@bluethemcguy4430 i know what you mean by looking at your pfp ;)
@cina-tech
@cina-tech 2 жыл бұрын
太棒! I just need to know whether it is possible to transfer this game to the android platform?
@RyiSnow
@RyiSnow 2 жыл бұрын
多謝! Android uses different classes to create GUI so you need to do a little adjustment but the basic concept such as how game loop works etc. is the same. So if you are already familiar with the basic Android GUI system, it won't be too difficult to transfer.
@mohamedgedo5109
@mohamedgedo5109 Жыл бұрын
how can i write the method drawString ?
@abd-elrahmanmahmoud3167
@abd-elrahmanmahmoud3167 2 жыл бұрын
hello sir, please i need your help in little thing in my college project
@overgamez497
@overgamez497 2 жыл бұрын
Hey, the font don't change, I didn't put anything in the place where you inserted "Arial" and still the txt appeard like yours. I tried insertin a custom font, but nothing chaged
@smokingcrimson128
@smokingcrimson128 Жыл бұрын
for the music in my code i did this: package audio; import java.net.URL; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.sound.sampled.FloatControl; public class Sound { Clip musicClip; //open audio files Clip soundClip; URL soundUrl[] = new URL[30]; //store file paths of sound files public Sound() { soundUrl[0] = getClass().getResource("/music/BlueBoyAdventure.wav"); soundUrl[1] = getClass().getResource("/sound/coin.wav"); soundUrl[2] = getClass().getResource("/sound/powerup.wav"); soundUrl[3] = getClass().getResource("/sound/unlock.wav"); soundUrl[4] = getClass().getResource("/music/fanfare.wav"); soundUrl[5] = getClass().getResource("/sound/walk.wav"); } public void setMusicFile(int i) { try { //FORMAT TO OPEN AN AUDIO FILE IN JAVA AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(soundUrl[i]); musicClip = AudioSystem.getClip(); musicClip.open(audioInputStream); } catch(Exception e) { e.printStackTrace(); } } public void setAudioEffectFile(int i) { try { //FORMAT TO OPEN AN AUDIO FILE IN JAVA AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(soundUrl[i]); soundClip = AudioSystem.getClip(); soundClip.open(audioInputStream); } catch(Exception e) { e.printStackTrace(); } } public void playMusic() { setVolume(musicClip, 0.30f); musicClip.start(); } @SuppressWarnings("static-access") public void loopMusic() { musicClip.loop(musicClip.LOOP_CONTINUOUSLY); } public void stopMusic() { musicClip.stop(); } public void playSoundEffect() { setVolume(soundClip, 0.40f); soundClip.start(); } //CONTROL SOUND OF MUSIC AND SOUND EFFECTS public float getVolume(Clip clip) { //0.0F to 1.0f FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN); return (float) Math.pow(10f, gainControl.getValue() / 20f); } public void setVolume(Clip clip, float volume) { //0.0f to 1.0f if (volume < 0f || volume > 1f) throw new IllegalArgumentException("Volume not valid: " + volume); FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN); gainControl.setValue(20f * (float) Math.log10(volume)); } } in the sound class i added to clips, one for music and the other one for sound effects, i also add a controller for the volume with a code that i discover on the internet, in my case i doesn't have the problem that you have with music, when i stop the music sounds are still function normally, but i don't know i want your opinion of this piece of code, Both solutions are okey? or yours is better.
@suryanshsuman7394
@suryanshsuman7394 Жыл бұрын
Hey , I created a jar file and converted it to .exe file but once i open it the game just stops after 0.02 sec . pls help
@zach990il4
@zach990il4 2 жыл бұрын
I added the drawString() and if I use it with setFont() it produces a white screen for 1 sec (noticeable ) every time I open the game. do you know why and if you know can you offer a solution please?
@overgamez497
@overgamez497 2 жыл бұрын
me too
@mohamed-alimessedi3
@mohamed-alimessedi3 Жыл бұрын
Yes same problem for me.
@mohamed-alimessedi3
@mohamed-alimessedi3 Жыл бұрын
I found a way to make it quicker, seems to be MacOS specific. In the UI class, add a method called loadFont where you will load the font from a ttf file, and then call that method in the constructor. That way is much faster.
@WannaBeProgrammer
@WannaBeProgrammer Жыл бұрын
Thank you! I finally finished this version of the game! I took a little longer because I was incorporating the Jar file at the same time. (Thank you for those tutorial video as well!)
@AlexPerez-gk6np
@AlexPerez-gk6np 8 ай бұрын
You’re the best man. I can rarely sit through tutorials and follow along, but you made it interesting and fun!
@mohamedzouad498
@mohamedzouad498 10 ай бұрын
I like this guy
@cedricsahaghian1605
@cedricsahaghian1605 Жыл бұрын
Really enjoyed the first part, I'm gonna reflect a bit on what I learned and start my own game before continuing but again and again and again: thank you so much!
@mohokhachai
@mohokhachai Жыл бұрын
Event is the key
@nicholasbrooks7349
@nicholasbrooks7349 Жыл бұрын
Hey I can not seem to get the text (16:27) to disapear could you help me?
@nicholasbrooks7349
@nicholasbrooks7349 Жыл бұрын
After nearly 30 minutes i fixed it
@reevandmello8960
@reevandmello8960 Жыл бұрын
im on 15:30
@edward265
@edward265 2 жыл бұрын
Nice!
@martinguggenberger
@martinguggenberger Жыл бұрын
First thank you for your tutorial, it's an awsome guide How can i put all the code into one jar file or .exe -> i just wanna send a executable file to a friend, so he can play the game :)
@RyiSnow
@RyiSnow Жыл бұрын
I've uploaded a video about it! kzbin.info/www/bejne/nmebiJ93o8SJnMk
@martinguggenberger
@martinguggenberger Жыл бұрын
@@RyiSnow thank you so much!
@dominiktworek6455
@dominiktworek6455 Жыл бұрын
for some reason i need to divide textLength by 5 to achive same effect, cant even figureout why. According to that what I see on your video and what I read on stackoverflow should it should give me string witdth by, it doesnt.
@nameno4685
@nameno4685 Жыл бұрын
Love this series very much!!! Many thanks for your effort
@Akariiinnn
@Akariiinnn Жыл бұрын
I noticed that translations can sometimes be really innacurate in titles and or description when it comes to French, i can help with that if you need someone, i don't know if those translations or automatic or something, but I can help I think.
@RyiSnow
@RyiSnow Жыл бұрын
Yes, unfortunately all of them are automatic translations. If you don't mind, could you please write them (video title translation) in a text file and send it to me? You can send it via email (learningryi@gmail.com) or upload it here: drive.google.com/drive/u/0/folders/1HcwLBQzqfw8Z1FK30-c4-Zy6wp5TSS9x I will make sure to credit your name in the video description. Thank you!
@Akariiinnn
@Akariiinnn Жыл бұрын
@@RyiSnow I sent it in the google docs, i'll keep updating it
@RyiSnow
@RyiSnow Жыл бұрын
Thank you so much! I will update the title tomorrow!
@RyiSnow
@RyiSnow Жыл бұрын
Updated the titles. Thank you so much for your help!
@luckyyunque1231
@luckyyunque1231 8 ай бұрын
I made it this far!
@RyiSnow
@RyiSnow 8 ай бұрын
Congratz!
@victoriousprue3648
@victoriousprue3648 Жыл бұрын
Thank you for the wonderful tutorial so far! My only concern is that I can't seem to get my game to work as a runnable jar file. I also can't get the jar file you provided to run either, so I'm not sure what I should do about this. Any advice would be appreciated!
@victoriousprue3648
@victoriousprue3648 Жыл бұрын
I discovered what the problem was by creating a .bat file to find the errors. Apparently, even though in Java the program could path to the asset files, like tiles and sounds, in packages the jar file could not. To fix this I had to move all the assets to the src and recode the paths in the various classes that called those files.
@sergiosanchez-tn2pu
@sergiosanchez-tn2pu 10 ай бұрын
ME GUZTA
@DhrKocak
@DhrKocak 2 жыл бұрын
I get a weird sound when I collide with a door without a key. I have not added that sound to the code. How does Java just produce a sound without me even writing the code. I'm confused
@stanislavsemenets8224
@stanislavsemenets8224 2 жыл бұрын
Greate! Thank you! :)
@VasiliyNikitin
@VasiliyNikitin Жыл бұрын
Great work, thx!
@jirax7144
@jirax7144 Жыл бұрын
Thank you !
@finn7798
@finn7798 6 ай бұрын
can i use this for presentation in my class?
@RyiSnow
@RyiSnow 6 ай бұрын
Of course! Here are the guidelines: docs.google.com/document/d/1qcafOofpXYd_QPr95qbgfb1GYxXKgSZb/edit
@lichenlink465
@lichenlink465 2 жыл бұрын
I’m really enjoying this series. I’ve tried following similar tutorials on KZbin, but they tend not to explain enough and don’t put concepts together in a easy to follow progression like this. Thank you for all the work you put into this! If I may ask, is there a way to convert the playtime counter display into a more standard time format (hh:mm:ss)? I’ve been searching online to try and figure it out (the decimal point looks a little weird to me), but I’be been unable to find a way to do it with a double.
@RyiSnow
@RyiSnow 2 жыл бұрын
You can do that by creating 3 variables (hour, minute, and second) When the second hits 60, set 0 to the second and add 1 to the minute, and do the same for the hour variable too.
@lichenlink465
@lichenlink465 2 жыл бұрын
@@RyiSnow Ah, yes, I didn't think of that. Thank you!
@woodswoody5553
@woodswoody5553 2 жыл бұрын
The text is not showing for mw at the end "congrats" "you found the treasure"
@woodswoody5553
@woodswoody5553 2 жыл бұрын
nvm I found it it was supposed to be int message = 0; i had int message;
@natzos6372
@natzos6372 Жыл бұрын
My highscore is 16,25!
@mastergamer4335
@mastergamer4335 2 жыл бұрын
isnt it easier to just do a textLength = text.split("").length instead of textLength = (int) g2.blablabla?
@mastergamer4335
@mastergamer4335 2 жыл бұрын
wait its nto the same thing. huh.
@mastergamer4335
@mastergamer4335 2 жыл бұрын
ohh its the texts width in pixels not in characters.
@masterdob7600
@masterdob7600 Жыл бұрын
@ryisnow is it ok if I skip some steps to get the game to exactly how I want.
@crackrokmccaib
@crackrokmccaib Жыл бұрын
I think y coordinate for draw string is still the top left corner, but instead of being 50 px from the top of the panel, it's 50 px from the top of the frame.
@rahatturmyshov8960
@rahatturmyshov8960 2 ай бұрын
Hello всем русскоговорящим. Если у вас проблемы с DecimalFormat и выводом запятой вместо точки, добавьте: DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.US); а затем: DecimalFormat dFormat = new DecimalFormat("#0.00", symbols);
@janrui2477
@janrui2477 Жыл бұрын
I made Conway's game of life using the knowledge I had with the past ten tutorials!! I still haven't implemented any mouse listener though and I'm struggling to make the thread stop and start again.. I'm looking forward to what the next tutorial is hopefully I can use it to improve the game of life... Here's the game of life if anyone is interested: drive.google.com/file/d/1KtC-42W2QDMvlsfjcc46KX5k2DMq6twn/view?usp=sharing
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 25 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 55 МЛН
Equip & Use Items - How to Make a 2D Game in Java #28
27:53
Object Placement - How to Make a 2D Game in Java #7
22:09
RyiSnow
Рет қаралды 59 М.
Options Menu - How to Make a 2D Game in Java #35
43:57
RyiSnow
Рет қаралды 13 М.
Drawing Tiles - How to Make a 2D Game in Java #4
27:26
RyiSnow
Рет қаралды 143 М.
Game State - How to Make a 2D Game in Java #13
16:49
RyiSnow
Рет қаралды 29 М.
Guard and Parry - How to Make a 2D Game in Java #49
26:08
RyiSnow
Рет қаралды 6 М.
Jumping into the water (Java 2D Game Demo)
0:23
RyiSnow
Рет қаралды 2,9 М.
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 25 МЛН