How to Build & Deploy an Online Tic Tac Toe With Ktor And Web Sockets
Вставка
- Опубліковано 6 вер 2024
- Deploy your own Tic Tac Toe game on Hostinger with 80% off: hostinger.com/... (use PHILIPP7 code for an extra 10%)
In this video you'll learn how you can build an online tic tac toe game using a Ktor Kotlin backend together with Jetpack Compose in Android. You'll also learn how to deploy this custom backend to play with your friends.
⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:
pl-coding.com/...
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/...
Get the source code for the backend here:
github.com/phi...
Get the source code for the Android app here:
github.com/phi...
Get the deployment steps here:
gist.github.co...
Join my Discord server:
/ discord
Regular programming advice on my Instagram page: / _philipplackner_
I always wanted to play with websockets and ktor but never had any idea on what to build, this video was my destiny, thanks!
Pretty good job 👍 I have been waiting for a video about web-sockets for a long time 😀
I already had that though 😁
Thanks, I've been trying to learn kotlin so much, your channel is a good place.
though I find it hard to swap databases like from room to realm; hopefully one day you'll cover that too.
Thanks buddy, stay healthier
Your content is really compelling Mobile Developer to eye out & indulge with the Android|Kotlin tech-stack, Keep-Up :)
Making simple games in Android is great idea💡, they are gpod projects to have😃 ...... Keep em' coming plz
Amazing, as usual!😍
I use a lot springboot with kotlin but I love increase my knowledge to compare both.
Great topics thanks for your effort.
What are your thoughts on Ktor vs Springboot-with-Kotlin?
@@RaghavSharma-nt3hr I think ktor is much straightforward than spring on the other side spring is much a swiss knife with a response to every major composents used in back end very well documented with a large community. With a microservices architecture you can use both at the same time and share domain logic.
You mean springboot with android kotlin ?
@@ka61er i was talking about the backend (rest api).
Btw. I kinda love the background music. Love it.
Can you run ktor from an Android app?
So,for example start a android app, it becomes the server?
Technically you can host servers on an Android device, not sure if Ktor allows it. But why would you do that haha
Thank You for such an amazing tutorial. It was really insightful with lots of learning
I have used that play button only to play the android project on the android device. Now I'm also using it for the Backend LOL. Actually, it feels like an android project we are working on but not that's crazy.
Why are you still using the legacy version of defining dependencies/plugins in the project-level build file? I think the Gradle team did a pretty good job on it 😀
hey philipp, thanks for such an amazing tutorial. could you please also make a video on how to use android Account Manager to store user credentials in jetpack compose? I am a beginner in android developement but I currently dont know how to start implementing this in my project
Amazing video. I watched it all the way
More on Websocket-related videos!
Philipp a question, is it possible if I use Ktor (so that I can use the dependency ktor-server-wrbsockets) just for the real communication between the server and client (kotlin android) and to have another API written in another language (e.g. Node.js) as the main API that is connected to database?
woww and i can apply this to my korge game, thank you philipp
Wow, really broad topic you've covered. Will watch soon :)
Thanks Philipp! 🥳🥳
Amazing tutorial philipp❤ can you tell me where can i learn more on websockets like resources or docs?
hello please help i have bottom navigation with 3 fragments when i go from one fragment to another and come back again fragment is recreated
please sir help me😢😢😢😢
Thanks for the amazing content Phillip, quick question (for anyone else as well) how do you deploy using git instead of through intellijIdea ?
Excellent tutorial ... thanks a lot
Amazing tutorial!
hey @PhilippLackner please make a video to deploy ktor web application on xaamp or apache please
Amazing content, Phillip. Well done. Insta like :)
Glad you like it!
45:58 when did we configure "play" route on server?
I would like to know which color theme/scheme are you using please.
philip please provide a tutorial on making an item database application using jetpack compose, greetings fans from Indonesia
amazing, inspiring, useful, great, cool, informative, other
Thanks a lot for this
Thanks , Bro 👍👍👍
How to deploy a ktor app , which is using PostgresSql , pls make a. Video on it 🙏
Thanks a lot
In the TicTacToeGame class, do you need to assign delayGameJob in the init block like ""delayGameJob = state.onEach(::broadcast).launchIn(gameScope)"? Since you only assign it when start a newGame, but not on the init block, therefore, it may cannot cancel the first time job.
you are the best 👍👍👍👍👍👍
A beginner here ,,
Do you need any money to host servers?
Is it possible to make fully functional games in kotlin? We don't have to use unity?
You can make them using OpenGL, but it's a pain the the a**. Use unity.
how to make tetris ?
💯💯💯
👍👍👍👍👍👍👍👍👍👍👍👍👍👍
Is it possible to connect client side ktor with websocketjs on backend side
first
private fun getWinningPlayer(board: Array): Char? {
// Check rows, columns, and diagonals
for (i in 0..2) {
if (board[i][0] != null && board[i][0] == board[i][1] && board[i][1] == board[i][2]) return board[i][0]
if (board[0][i] != null && board[0][i] == board[1][i] && board[1][i] == board[2][i]) return board[0][i]
}
// Check diagonals
if (board[0][0] != null && board[0][0] == board[1][1] && board[1][1] == board[2][2]) return board[0][0]
if (board[0][2] != null && board[0][2] == board[1][1] && board[1][1] == board[2][0]) return board[0][2]
return null
}