Тёмный

INPUTS - Episode #02 - Platformer Game Tutorial Java 

Kaarin Gaming
Подписаться 11 тыс.
Просмотров 72 тыс.
50% 1

Опубликовано:

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 228   
@itistreasonthen
@itistreasonthen 2 года назад
For me sometimes the addKeyListener or something didn't work and nothing happened when I pressed any buttons. Adding gamePanel.setFocusable(true); before the gamePanel.requestFocus(); in the Game.java helped and it seems to work now. Maybe it's helpful for someone else too.
@ForbiddenPhysics
@ForbiddenPhysics 2 года назад
Had the same issue and this helped. Thanks!
@nathansiregar3360
@nathansiregar3360 2 года назад
i cant thank you enough, i've been stressing about the keys not functioning and u saved me
@SchizoGenius
@SchizoGenius 2 года назад
You are a lifesaver!
@mireymackey
@mireymackey 2 года назад
Thank you, stranger. It's realy helped me
@myxtq4456
@myxtq4456 2 года назад
Thanks, I was about to go insane. Next time I'll check the comments before randomly changing the code
@Sanctivation
@Sanctivation 4 месяца назад
Man, You are amazing you easily made me learn java in just 2 day obviously not complete but i got the basic understanding of how it works, thank you dude.
@KaarinGaming
@KaarinGaming 4 месяца назад
Well done! :D
@MasterPriva
@MasterPriva 6 месяцев назад
This series is extremely helpful and very well produced. The code, the explanation, the editing of the videos. There is just a lot of effort in all of them, and in a very consistent way. Literally cannot phrase how much I appreciate it! You are a legend
@KaarinGaming
@KaarinGaming 6 месяцев назад
Your words are very kind
@sakshiiii6158
@sakshiiii6158 2 месяца назад
keep up the good work man! no youtuber i've seen till now is as dedicated as you!
@KaarinGaming
@KaarinGaming 2 месяца назад
Thanks mate! :D
@Camse56
@Camse56 11 месяцев назад
I have to say this, this is the clearest explanation I’ve ever seen. Thank you so much, there are a lot of things that I finally knew how and why I do it! I hope this channel keeps growing
@KaarinGaming
@KaarinGaming 11 месяцев назад
Cheers mate! :D
@HanakoSxj
@HanakoSxj 6 месяцев назад
@@KaarinGaming can you explain why your gamepanel.changexDelta(-5) doesn’t display a error?? Mine shows that I cannot make a static reference to a NON-static reference
@felipegomes2263
@felipegomes2263 2 года назад
When I tried to make a snake game alone, I got to this part (not 100% similar since I tried to use windowgame as an extension of jframe but it was close) but when I got to the part of trying to move the rectangle it didn't work, the input was not working no matter what I tried, so I hope this tutorial clarifies that. It's been great so far, the first part was very insightful. Generally tutorials just type stuff without explaining, it's great that you take the time to give a brief explanation of what everything does, so good job! Edit: finally I was able to move the rectangle, what happened was I didn't pass GamePanel as parameter for KeyboardInputs and "this" as parameter when calling it in the GamePanel itself in my previews game, now it's making a bit more sense. Definitely an underrated channel.
@KaarinGaming
@KaarinGaming 2 года назад
Cheers mate! :D
@rectaalborween8471
@rectaalborween8471 6 месяцев назад
Good stuff man, other tutorials don't go in detail or explain WHY it is they're doing something. Makes me wonder the point of watching rather than copy-pasting their code. But you actually explain your actions well, appreciate it. The sketches explaining theory is also really nice
@KaarinGaming
@KaarinGaming 6 месяцев назад
Glad you like it! Cheers 🍻
@nicholasnguyen8584
@nicholasnguyen8584 Год назад
I usually never comment, like, or subscribe, but I had to for this free content! I’m currently a student here at Princeton and these tutorials are top notch and eloquently explained. They’re helping me learn so much. Great job.
@Bennie2310
@Bennie2310 Год назад
I made myself move the rectangle with mouse click and drag and i can't express how HAPPY i feet when it worked after half an hour trying it. AMAZING tutorials, you make me want to try stuff by myself because i can understand your explanations so well and really clear. Thank you very much!
@Bennie2310
@Bennie2310 Год назад
feet lmao
@KaarinGaming
@KaarinGaming Год назад
Thats great mate! :D
@terciofelipeoliveirafrance2228
@terciofelipeoliveirafrance2228 7 месяцев назад
I'm using this just to wrack everything in java in my head really nice tutorial.
@Pinkmusak
@Pinkmusak Год назад
I’m having an issue at 1:30 because my IDE (visual studio) doesn’t recognize Key Listener at all. So I can’t do addKeyListener and it’s subsequent things. Please help.
@vcody9255
@vcody9255 Год назад
Had the same Problem you have to add the package before it: addKeyListener(new Inputs.KeyboardInputs()); //Input refers to the package name
@NickTorius
@NickTorius 13 дней назад
im also having the same problem
@santiraigoza5937
@santiraigoza5937 7 месяцев назад
Took a bit but i finally finished episode 2! Day 2 complete cw for vid 3 tm thanks sm!
@panagiotiskougioumtzidis9114
@panagiotiskougioumtzidis9114 2 года назад
You are doing a great job!!!
@KaarinGaming
@KaarinGaming 2 года назад
Thanks mate! :D
@notsospecialised
@notsospecialised Месяц назад
absolute legend
@lv1543
@lv1543 2 года назад
thanks for the tutorials. Ive taken a few intro to programming classes and i think i got the basics down. making games is much more fun than solving word problems.
@KaarinGaming
@KaarinGaming 2 года назад
It sure is :)
@mikavanooteghem8786
@mikavanooteghem8786 2 года назад
I LOVE your video's man, XD from Belgium!
@KaarinGaming
@KaarinGaming 2 года назад
Cheers mate! :D
@vindirect
@vindirect 2 года назад
Will need to watch this multiple times to get it xD
@KaarinGaming
@KaarinGaming 2 года назад
Hello :D Anything that i rushed through or is unclear?
@waffel6378
@waffel6378 2 года назад
Same lol
@waffel6378
@waffel6378 2 года назад
@@KaarinGaming no not really its just hard to understand sometimes, but that’s on me! I think you explain in a great way.
@vindirect
@vindirect 2 года назад
@@KaarinGaming you explain good I just like need to know things like who is calling paintComponent method in gamepanel? Also the arguments in those methods are unclear, who's sending and who's recieves it. Also how is that the addMouseListener and keylistener and other events connected to the panel? Is it by using those methods (addMouseListener...) that are connecting them?
@KaarinGaming
@KaarinGaming 2 года назад
​@@vindirect Lets begin with paintComponent() WE do not call paintcomponent directly ever. When we start the program, and we extend jpanel or have a object of that, it gets called automatically. Its part of the entire java.swing library/ system. (swing have alot of premade classes and method for us to use when we would like to build a interface, a GUI. But we are not building a gui, we are building a game. So we just need jframe and jpanel) So thats how it gets called in the start. But if we would like to make the images and objects move on the screen. We first add or remove values to their positions. Then we need it to be redrawn at the new pos. This is where repaint() comes in. And the purpose of repaint is just that. Tell the jpanel to redraw. And that is how we call paintComponent when we need it to be updated. And repaint is also part of java.swing ( the gui library ). If we used some other ways to draw, say openGL, then repaint and jframe and all that is completely useless. But we are in the java.swing system, so repaint is working. And the graphics object we pass in, is required beforehand. And the graphics object is not created by us, its made further up the chain beyond jpanel. We are given that object to draw with. They give us the paintbrush, now we can use it in this method. The key and mouselisteners are methods we can call. We extend jpanel, and jpanel extends jcomponent and so on. And at one point, there is a method in one of those super classes that have the methods we just called. They require a listener. So we could either create a new one inside the brackets or give it a class that implements the methods. Thats why we create a class that implements the listener, makes it easier to handle the code. We could have add the listeners to jframe , but we will use jpanel (gamePanel) to draw on and the buttons and menus and all that, will be on gamepanel too. So if the inputs were added to jframe, we could not use those buttons. I hope i cleared up some stuff. I talk about this in the first episode. Maybe not quite so in detail.
@victorgxn
@victorgxn Год назад
keep uploading videos your channel is crazy
@KaarinGaming
@KaarinGaming Год назад
Thank you, I will! :D
@ning_nang
@ning_nang Год назад
THIS IS SO GOOD, THANK YOU!!!
@abirkolin4702
@abirkolin4702 Год назад
it's fun to learn! Thanks! gonna finish asap
@CGRcodeYT
@CGRcodeYT 12 дней назад
if u use vs code instead of eclipse remeber to remove the throw new UnsupportedOperationExceptions because i forgot to in the mosueinputs class and oh boy i had a party in that terminal
@NikitaBomba112
@NikitaBomba112 Год назад
Thanks you for this video!
@kkgaming7756
@kkgaming7756 Год назад
Great, tutorial, you explained it very well.
@KaarinGaming
@KaarinGaming Год назад
Thanks! :D
@swayam50
@swayam50 2 года назад
Glad I found this playlist
@VMVladVMV
@VMVladVMV Год назад
1:36 if AddKeyListener doesnt pop up you can use this.AddKeyListener
@HarryHamster63
@HarryHamster63 Год назад
I did this and it still isnt working
@veyspixelboy
@veyspixelboy 4 месяца назад
waaa how did u find this?
@AramisOrdonezChavez
@AramisOrdonezChavez 4 месяца назад
GOAT
@veyspixelboy
@veyspixelboy 4 месяца назад
I tried but nothing works for me
@NickTorius
@NickTorius 13 дней назад
Thank you so much it worked!
@NoOne-jl2ii
@NoOne-jl2ii Год назад
Thanks man, great explanation.
@StreamersLiar
@StreamersLiar 5 месяцев назад
One thing I want to add to the changeXDelta and changeYDelta function. The reason why changing the value in x axis with -5 moves the rectange upward is because the method fillRect starts making the rectange from (0,0) in the 4th quadrant and moves the positive x axis in the downward direction and the positive y axis in the right direction. so the x axis's normal positive and negative integers change in the opposite order
@SkeWaBalkan
@SkeWaBalkan 8 месяцев назад
I really dk how u have 9k subs, you are amazing!
@IIEPEDO3
@IIEPEDO3 2 года назад
Thanks! Cool tutorials. Go on mate!
@getrickrolled1806
@getrickrolled1806 2 года назад
Just found your channel tysm for uploading videos. Very Greatfull 🔥
@KaarinGaming
@KaarinGaming 2 года назад
Cheers! :D
@modoupafaburay6151
@modoupafaburay6151 Год назад
grymt material som kommer hjälpa mig på mitt äventyr till att bli en riktigt bra java programmerare :).
@ЧИКЕНБУРГЕР-э8й
thank you, i am creating game for my homework of university))
@itlogskina
@itlogskina 2 года назад
lets goooo i love you man thank you so much
@anton_prollax
@anton_prollax 2 года назад
Большое спасибо! Thanks a lot!
@Hayles-oq3qm
@Hayles-oq3qm Год назад
Hey I just found you channel and the object you create, private MouseInputs mouseInputs, keeps giving me this error "Syntax error on token "MouseInputs", @ expected" I've tried retyping it and looking it up but I got no answers. any ideas?
@Hayles-oq3qm
@Hayles-oq3qm Год назад
Oh and it also gives me an error when I try to put the ; syntax on it, telling me to remove it.
@KaarinGaming
@KaarinGaming Год назад
Hey. Take a look on github for the code for the episode in question. There you can compare the code with yours.
@Hayles-oq3qm
@Hayles-oq3qm Год назад
@@KaarinGaming Thanks dude I'll check it out! yeah found out what was wrong I forgot to put it inside the jpanel extends jpanel thing lol
@navytiger3851
@navytiger3851 Год назад
Perfection!
@kerem-zk7rl
@kerem-zk7rl Год назад
i love your content but i'm not sure if it's good for beginners i was learning oop now and found your youtube channel. To understand it completly i think i should learn more about oop what do you guys think?
@CGRcodeYT
@CGRcodeYT 12 дней назад
oop is in JavaScript as well, tbh but object oriented programming was supposed to be ez for beginners
@8rboy
@8rboy Год назад
Vid 12:10 får jag ett error. När jag ska försöka importera GamePanel vill den att jag ska skapa en ny klass GamePanel, problemet är att den redan finns ju. jag använder mig av default pack, är det det som ställer till det?
@8rboy
@8rboy Год назад
Nvm, jag skapade ett nytt package som heter main och nu kunde jag importera GamePanel, har ingen aning om varför man inte kan använda default package bara aja, it is what it is I guess :)
@dl-cb7yc
@dl-cb7yc Год назад
thank you for lesson
@oskarjokinen3190
@oskarjokinen3190 Год назад
PLEASE HELP ME! I typed the addKeyListener(new KeyListener); but it doesn't bring the code thingy up where you get the huge amounts of code, instead it says KeyListener cannot be resolved to a type and it's telling me to create a class called KeyListener or other things. I know this is an old video and you probably won't answer but please help i would really like it!
@oskarjokinen3190
@oskarjokinen3190 Год назад
1:38 this part
@KaarinGaming
@KaarinGaming Год назад
It was a auto import I selected when the option presented itself. Otherwise, you have to code it out all by yourself.
@oskarjokinen3190
@oskarjokinen3190 Год назад
@@KaarinGaming Thank you so much! But what code do i need to write for it to work? Could you like copy me an example of the code if you can?
@KaarinGaming
@KaarinGaming Год назад
@@oskarjokinen3190 Np. All of the code can be found on github. Follow the link in the description. :)
@oskarjokinen3190
@oskarjokinen3190 Год назад
@@KaarinGaming Thank you so much! This really helped :) I'm still a big noob in coding and don't know a lot of stuff, i'm following your tutorials for my first game so thanks!
@msugendra2981
@msugendra2981 Год назад
While inputting values in keyboard inputs, it works sometimes and doesn't work for sometimes, can you please help me with this.
@Kz-om9eq
@Kz-om9eq Год назад
I'm getting the same problem.
@msugendra2981
@msugendra2981 Год назад
gamePanel.setFocusable(true); Solved this issue for me.
@fakeheure8132
@fakeheure8132 Год назад
Hello ! good job for this video , i have a problem , when i use the methode repaint() as you do at 15min and when i test it by moving with zqsd , my rectangle leave trail on my screen how could i resolve this? Thank !
@KaarinGaming
@KaarinGaming Год назад
Hey! Make sure you call super in the repaint method and as always, the code on github is a great place to check the code! :)
@halcyon-s
@halcyon-s Год назад
Thanks!
@OddlyAnimated1203
@OddlyAnimated1203 Год назад
Everything was going fine until I hit one part. For whatever reason that I am unable to find, the "GamePanel" in the KeyBoardInputs does not work!! It shows a red underline and then that's when the problems start to kick in. I tried to change some stuff, but it does not work and when I added "this.gamePanel = gamepanel;", it still shows error! Then when I add "this" inside the "addKeyListener(new KeyBoardInputs(this));" it shows wrong. The "xDelta" and "yDelta" don't with either. I tried what the pinned comment said and it STILL shows error. This is really irritating as I've been trying to find what's wrong for a long time and actually went ahead to redo the entire thing but got stuck on that part again 😭 can anybody tell me what's wrong??
@CGRcodeYT
@CGRcodeYT 12 дней назад
wait yk where u import all the functions did u import game panel? (Its in a diff package so u have to import it)
@CGRcodeYT
@CGRcodeYT 12 дней назад
plus u have to do exactly what tutorial says, if u on vs code u need to also install the vs code java extension because it has java intelli so it'll automatically import tit for u
@OddlyAnimated1203
@OddlyAnimated1203 11 дней назад
Hello, @@CGRcodeYT! Thank you for your reply. Although it has been a long time since I typed this comment, I even forgot about it. I had tried multiple things and other tutorials but I couldn't find what's wrong, so I just gave up 💀 I have deleted it long ago, and do not remember any terms or anything from Java. Yet again, even though it's been a long time, I still appreciate your response. I may take Java again someday, in which case I'll keep in mind what you said. Have a great day!
@0xbinary
@0xbinary Год назад
Amazing!
@asherseifan1748
@asherseifan1748 2 месяца назад
thanks
@bruhidk3341
@bruhidk3341 4 месяца назад
nice video, but how do i make another rectangle that is moved by keyboard only and the first rectangle that is moved by mouse only?
@richomuticahya2986
@richomuticahya2986 4 месяца назад
why in my program must add "import inputs.KeyboardInputs;"? I ask my friend because it was the class in another package
@shairis2007
@shairis2007 24 дня назад
idk i can be happy after seeing a moving grey rectangle.
@Deepika_736
@Deepika_736 6 месяцев назад
Sir, it is a project for me for the college event can I add it to my RESUME after completing it
@KaarinGaming
@KaarinGaming 6 месяцев назад
Go ahead mate. Best od luck!
@breadzeppelin2705
@breadzeppelin2705 3 месяца назад
Shouldn't we put main.GamePanel because the GamePanel and the keybouardinputs classes are in different packages
@ericyu-gw7tl
@ericyu-gw7tl 4 месяца назад
when i put gamepanel in the constructor for keyboardinputs it tells me that there is an error and that it cannot find the symbole gamepanel. anyone know why?
@HanakoSxj
@HanakoSxj 7 месяцев назад
14:02 the code in keyboard inputs would say “cannot make a static reference to non-static” blabla What happened?
@HanakoSxj
@HanakoSxj 6 месяцев назад
I can see you liking the other comments dawg
@Михаил-ж4н4щ
@Михаил-ж4н4щ 5 месяцев назад
If someone does not display information that a key has been pressed, then try replacing requesFocus with setFocusable, it helped me personally
@ducklacanard
@ducklacanard 2 года назад
KeyboardInputs didn't work in another package for me, when I put it in the main package it works
@zoltanpalvolgyi3655
@zoltanpalvolgyi3655 2 года назад
you should import it: import inputs.KeyboardInputs; because the Classes can see each other only inside the same package.
@CGRcodeYT
@CGRcodeYT 12 дней назад
@@zoltanpalvolgyi3655 i explained that to another person man
@efeatas85
@efeatas85 Год назад
Thanks :)
@Mepotism
@Mepotism Год назад
at 12:00 i typed the constructor for KeyboardInputs and "private GamePanel gamePanel" and GamePanel just gives out an error or something. i saw a similar comment about this and tried the "import main.GamePanel" trick, but it doesn't recognize it. i don't know if it's because I'm using a different Java version(or JDK, SDK, i don't even know this is still confusing) or it's IntelliJ. i tried IntelliJ's suggestion which is to create a type parameter which basically goes "public class KeyboardInputs implements KeyListener". it solved the error UNTIL i tried to call the changeYDelta method. so, i'm kind of stuck for now lol UPDATE: i figured it out. i had to create a main package and move most of the classes inside that package (hence the "package main;" on top of most classes in this video). i believe this isn't the default behavior in IntelliJ since i do not remember having to create a main package when i was in my CS class like 9 months ago. i don't do programming so idk how different IDE's behave
@natteravn252
@natteravn252 2 года назад
In the GamePanel.java class you removed the line "import javax.swing.JPanel" that was present in the last episode, but somehow your window is still working? It isn't for me though.
@KaarinGaming
@KaarinGaming 2 года назад
I just checked github, its still there =) Imports usually gets minimized.
@jacopurrino7379
@jacopurrino7379 Год назад
i dont know if it can interfere but for me it says that the changeXDelta variable don't work into the Keyboard imputs class
@jacopurrino7379
@jacopurrino7379 Год назад
I use IntellijIdea
@KaarinGaming
@KaarinGaming Год назад
You can always check github for reference if you get stuck :D
@jacopurrino7379
@jacopurrino7379 Год назад
@@KaarinGaming it Gaves me an error as soon that i take the Y delta, but it dosen't make a problem if I use X delta, any suggestions?
@jacopurrino7379
@jacopurrino7379 Год назад
No it's all done XD i forgot to put the value in, thanks for the tips, in italian we say comunque (Anyway)
@jacopurrino7379
@jacopurrino7379 Год назад
I had the same problem, i had to write it lowercase, thankyou
@parulsaxena7750
@parulsaxena7750 2 года назад
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "main.Gamepannel.changeYDelta(int)" because "this.gamepannel" is null why this error is coming how to solve this
@KaarinGaming
@KaarinGaming 2 года назад
Looks like you misspelled gamepanel. Make sure you initialize it before doing any calls to it =)
@progamermaster2685
@progamermaster2685 Год назад
Can you pls tell me why are you adding this. at some places in the code?
@KaarinGaming
@KaarinGaming Год назад
The keyword this, refers to the class variables.
@zpect
@zpect Год назад
Could you explain to me the logic of the movement so maybe it's a silly question but why when we want the rectangle move to up we must subtract pixel (-5), I cant understand that :c Really good video btw
@KaarinGaming
@KaarinGaming Год назад
The top left corner is (0,0) and bottom right corner is (100,100) on a screen that is 100x100. To go up in y dir, we just -5 to move 5 pixels up.
@zpect
@zpect Год назад
@@KaarinGaming Oooh thank you man
@HessSR
@HessSR 2 года назад
12:45 do you have to use "this." for xDelta?
@KaarinGaming
@KaarinGaming 2 года назад
"Have to", no. It simply lets you know that xDelta is a global variable.
@HessSR
@HessSR 2 года назад
@@KaarinGaming ah i see, thanks!
@gamermapping6963
@gamermapping6963 Год назад
Repaint does nothing for me, It gives me a bunch of errors in the terminal but nothing actually happens
@KaarinGaming
@KaarinGaming Год назад
Hey! There is a discord server you can check out and get more help! =)
@eden2047
@eden2047 Год назад
somehow, when i move with keyboard or drag/move the mouse, the rectangle it just getting bigger as i move or drag
@johanliebert9662
@johanliebert9662 Год назад
hey bro if u still don't know the error, maybe my comments can help you you should have to call the super.paintComponent(g); and remember paintComponent not paintComponents, i struggle with this error to and when i see in my source code there is typo there
@Cryptic_Zero
@Cryptic_Zero 2 года назад
aaaah yes the gay panel
@AskAKill99
@AskAKill99 10 месяцев назад
🤣🤣
@Crezolution
@Crezolution 2 месяца назад
The most beautiful panel
@snztr3178
@snztr3178 2 года назад
for me when i do addKeyListener(new KeyListener); i dont see the "annonymous inner type"
@dharma6543
@dharma6543 2 года назад
Bro in class keyboardinputs implements keylistener in this click keyboardinputs will get underlined it show unimplement something click that you will Getvthatvinline
@snztr3178
@snztr3178 2 года назад
@@dharma6543 thanks for tip but i already fixed it with zero experience
@jetalonzo3594
@jetalonzo3594 Год назад
Im getting an error on 12:30. it says cannot find symbol class GamePanel
@HarryHamster63
@HarryHamster63 Год назад
for me it said there was something wrong with the addkeylistener code it was not prompting me to help it is not doing anything
@HarryHamster63
@HarryHamster63 Год назад
I read some comments and you said there was import code on the github but i cant find the code
@tron1kk
@tron1kk 2 года назад
What code's theme are you using?
@KaarinGaming
@KaarinGaming 2 года назад
Just dark mode
@kun0xxken798
@kun0xxken798 2 года назад
What software are u using?
@KaarinGaming
@KaarinGaming 2 года назад
For what ?
@kun0xxken798
@kun0xxken798 2 года назад
@@KaarinGaming i'm actually trying to study programming but i don't know what software to use
@TechBoxNorth
@TechBoxNorth Год назад
I'm only on episode 2 and I already feel like I'm lost in a huge maze :( Maybe this isn't for me?
@KaarinGaming
@KaarinGaming Год назад
Nha, you got this :D Take it slow, and re-watch a few times if you need. Remember, you have a discord to use if need be. Just let me know when you join or what your name is so I can promote in the discord since you are a member =)
@avishankarsardar6981
@avishankarsardar6981 2 года назад
Hey @KaarinGaming 12:02 the global variable you added was showing some error in my system but when I imported main.GamePanel, was glad it worked but how did it work I don't know could you clarify it? P.S I am using VS Code Incredible work bro love frm India❤
@KaarinGaming
@KaarinGaming 2 года назад
Hey! I think i already had it imported. Sometimes i re-record what i coded, and then there is a chance of some parts not being removed from one take to the other. So up there i must have had the import already before typing it out. Thanks for the kind words =) Cheers!
@avishankarsardar6981
@avishankarsardar6981 2 года назад
That's the fastest reply I hv witnessed in ages. Thanks bro and may you achieve what you aim for.
@victorokpube5501
@victorokpube5501 Год назад
how to run your game window within the same ide window eclipse
@purplepaws5875
@purplepaws5875 Год назад
thanks for the gaypanel tutorial :)
@KaarinGaming
@KaarinGaming Год назад
You are welcome! xD
@adityabhadane4391
@adityabhadane4391 7 месяцев назад
Worst bro you did cut the part of key listeners My project didnt have project babylon
@qiqioo8127
@qiqioo8127 Год назад
EZ
@arpittyagi2649
@arpittyagi2649 Год назад
3:39 Gaypanel?? 😂
@enjakuro7048
@enjakuro7048 Год назад
In GayPanel, uh, GamePanel xD sorry
@prateekchauhan435
@prateekchauhan435 Год назад
GayPanel 🤣🤣🤣🤣
@btsbloodsweatandtears4021
@btsbloodsweatandtears4021 2 года назад
guys if addKeyListener didn't work for you, all I did was add a curly bracket so like this. addKeyListener( new KeyListener() { *** all the override methods will be inside here. } );
@dimdemon5831
@dimdemon5831 Год назад
How I can't get it
@fuad1730
@fuad1730 Год назад
Hi, I have a problem the rectangles doesnt move when i try to move it package inputs; import main.GamePanel; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; public class MouseInputs implements MouseListener, MouseMotionListener { private GamePanel gamePanel; public MouseInputs(GamePanel gamePanel) { this.gamePanel = gamePanel; } @Override public void mouseClicked(MouseEvent e) { System.out.println("mouse clicked"); } @Override public void mousePressed(MouseEvent e) { } @Override public void mouseReleased(MouseEvent e) { } @Override public void mouseEntered(MouseEvent e) { } @Override public void mouseExited(MouseEvent e) { } @Override public void mouseDragged(MouseEvent e) { } @Override public void mouseMoved(MouseEvent e) { System.out.println("Mouse Moved!"); gamePanel.setRectPos(e.getX(), e.getY()); } }
@KaarinGaming
@KaarinGaming Год назад
Hey. Always start by looking at the code on github. Then we also have a discord channel. Links in the description:)
@vnnews3632
@vnnews3632 Год назад
in the setRectPos mothod, you set this.xDelta = x; this.yDelta = y not this.xDelta += x; this.yDelta += y;
@Kanlikne
@Kanlikne 2 года назад
Hey man, I'm getting a problem "at java.awt.Window.dispatchEventImpl(Unknown Source)" any chance you know why this is happening.
@KaarinGaming
@KaarinGaming 2 года назад
Hey, sorry for late response. Check out github for the code to see what you missed.
@semp3092
@semp3092 Год назад
I have a question. Does it work too If I usr Iteliij.eclipse dont work
@KaarinGaming
@KaarinGaming Год назад
Intelij works fine too
@semp3092
@semp3092 Год назад
@@KaarinGaming thanks 👍😁
@10RedditStories01
@10RedditStories01 2 года назад
On adding the KeyListener this error came to me „Cannot instantiate the type KeyListener Java(16777373) [Ln 7, Col 28]“ please help
@KaarinGaming
@KaarinGaming 2 года назад
Take a look on github on github to compare your code to my code. It usually helps :)
@MrLoser-ks2xn
@MrLoser-ks2xn Год назад
Thanks!
Далее
GAME LOOP  - Episode #03 - Platformer Tutorial Java
28:11
I Spent 100 HOURS Making a Game With NO GAME ENGINE
13:42
I Made a Game Using ChatGPT
9:51
Просмотров 2,7 млн
PLAYER CLASS  - Episode #07 - Platformer Tutorial Java
27:18
Create Rock Paper Scissors in Java in 10 Minutes
10:24
Просмотров 117 тыс.
One of The Craziest Matches in Volleyball History (HD)
13:57
20 Advanced Coding Tips For Big Unity Projects
22:23
Просмотров 190 тыс.