Тёмный

Code your FIRST GAME in Java 

Kenny Yip Coding
Подписаться 32 тыс.
Просмотров 11 тыс.
50% 1

Learn how to code a game in Java.
In this tutorial, you will learn to create the whac a mole game with java using the built-in swing awt graphics library. This project is perfect for new java programmers!
While creating this mario themed whac-a-mole game, you will learn how to create a graphical user interface (GUI) using java's swing library, add click handlers to whack the mole, and randomly spawn the mole and piranha plant using the Timer and Random modules.
Setup Java with Visual Studio Code:
• How to set up Java in ...
Code: github.com/ImK...
Website: www.kennyyipco...
Java Game Programming Projects Playlist:
• Java Game Programming ...
JavaScript Game Programming Projects Playlist:
• JavaScript Game Progra...
Subscribe for more coding tutorials 😄!

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

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@aasthabhatia3544
@aasthabhatia3544 24 дня назад
Hi kenny , this is really a great tutorial. I made my first game ever using Java. I have a request for you to keep adding new and fun games in your java playlist. Thankyou !!
@BabyBunny-Cottontail
@BabyBunny-Cottontail Год назад
Awesome video and congratulations to 10k subs!
@KennyYipCoding
@KennyYipCoding 11 месяцев назад
thank you :) !
@ImHlkari
@ImHlkari 2 месяца назад
Thanks kenny, this tutorial helped me out a lot
@phuongnam862
@phuongnam862 8 месяцев назад
Great work! Thank you very much! Keep working hard!
@user-or7gc8ui6r
@user-or7gc8ui6r 12 дней назад
Good video thanks for doing this game projects in java.
@hansmalm2801
@hansmalm2801 Месяц назад
I'm just a beginner but would like to suggest at 26:00: JButton tile; do { int num=random.nextInt(9); tile=board[num]; } while(currPlantTile==tile);
@user-or7gc8ui6r
@user-or7gc8ui6r 14 дней назад
Thanks for this🎉
@tkonan
@tkonan 4 месяца назад
Hey Kenny. When I get to defining the Timer at around 20:00, VS Code doesn't seem to recognise this construct - with parameters. Has something changed w.r.t. timers?
@tkonan
@tkonan 4 месяца назад
OK, I noticed that VS Code had auto-generated a number of imports, including javax.management.timer.Timer. The problem resolved after I removed them. Do you have any insights into this issue/behaviour?
@Toothless_Rides
@Toothless_Rides 3 месяца назад
Hey Kenny, great vid. I had a lot of fun following along and experimenting. I've hit a wall...how do I implement a 'reset' button. I'm assuming I have to create a new JButton for it, yeah? I created one: "JButton reset; " but I don't really know where to go from here. Do I make a 'reset' function? If so, how do I do that, and where do I place it in the code? (Beginner here...apologies)
@KennyYipCoding
@KennyYipCoding 3 месяца назад
Yes, similar to how I added a click handler to the each individual tile, which are buttons. You would need to create a function and tie it to the reset button.
@KennyYipCoding
@KennyYipCoding 3 месяца назад
Resetting is quite simple, you just need to call the reset function you create and within the function, just reset the variables to the starting conditions. Example: set score = 0
@Toothless_Rides
@Toothless_Rides 3 месяца назад
Thank you for the reply. I’ll give it a shot!
@emmasueli3134
@emmasueli3134 5 месяцев назад
Can javafx be used instead of awt and swing?
@itoadx
@itoadx 3 месяца назад
how can i add more moles? anyway you can tell me simply enough?
@KennyYipCoding
@KennyYipCoding 3 месяца назад
You will need to do it just like how we created the first mole. You need to add another mole object. Instead of having separate variables for multiple moles, you can store the objects in an array [ ] and loop through them if needed
@Setche2023
@Setche2023 7 месяцев назад
luv u t2 much bro❤❤❤❤❤❤❤❤❤❤❤❤❤❤🙏🙏🙏🙏🙏🙏👌👌👌👌👌👌👌👌👌👌👌👌
Далее
How to set up Java in Visual Studio Code
4:24
Просмотров 585 тыс.
Code Tic Tac Toe in Java
33:23
Просмотров 24 тыс.
Bike Vs Tricycle Fast Challenge
00:43
Просмотров 14 млн
Code Flappy Bird in Java
54:02
Просмотров 88 тыс.
Code Minesweeper in Java
49:50
Просмотров 20 тыс.
Java snake game 🐍
43:30
Просмотров 1,5 млн
The Flaws of Inheritance
10:01
Просмотров 941 тыс.
Java GUI in Netbeans
1:37:05
Просмотров 209 тыс.
How principled coders outperform the competition
11:11
How to Code Tetris in Java
1:32:40
Просмотров 31 тыс.
Java pong game 🏓
1:07:44
Просмотров 292 тыс.
How to ACTUALLY get into Gamedev
14:01
Просмотров 724 тыс.