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_

КОМЕНТАРІ • 51

  • @J0N36O
    @J0N36O Рік тому +16

    I always wanted to play with websockets and ktor but never had any idea on what to build, this video was my destiny, thanks!

  • @nymexe
    @nymexe Рік тому +7

    Pretty good job 👍 I have been waiting for a video about web-sockets for a long time 😀

  • @raymondmichael4987
    @raymondmichael4987 Рік тому +4

    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

  • @nipunshah1373
    @nipunshah1373 Рік тому +2

    Your content is really compelling Mobile Developer to eye out & indulge with the Android|Kotlin tech-stack, Keep-Up :)

  • @srikanthmacha7990
    @srikanthmacha7990 Рік тому +1

    Making simple games in Android is great idea💡, they are gpod projects to have😃 ...... Keep em' coming plz

  • @luckydevil1601
    @luckydevil1601 Місяць тому

    Amazing, as usual!😍

  • @Talaria.School
    @Talaria.School Рік тому +2

    I use a lot springboot with kotlin but I love increase my knowledge to compare both.
    Great topics thanks for your effort.

    • @RaghavSharma-nt3hr
      @RaghavSharma-nt3hr Рік тому

      What are your thoughts on Ktor vs Springboot-with-Kotlin?

    • @Talaria.School
      @Talaria.School Рік тому +2

      @@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.

    • @ka61er
      @ka61er Рік тому

      You mean springboot with android kotlin ?

    • @Talaria.School
      @Talaria.School Рік тому

      @@ka61er i was talking about the backend (rest api).

  • @nymexe
    @nymexe Рік тому +1

    Btw. I kinda love the background music. Love it.

  • @CineTechGeek
    @CineTechGeek Рік тому +2

    Can you run ktor from an Android app?
    So,for example start a android app, it becomes the server?

    • @PhilippLackner
      @PhilippLackner  Рік тому

      Technically you can host servers on an Android device, not sure if Ktor allows it. But why would you do that haha

  • @ujjwalkumarmaharana5813
    @ujjwalkumarmaharana5813 Рік тому +1

    Thank You for such an amazing tutorial. It was really insightful with lots of learning

  • @venkateshlingampally7220
    @venkateshlingampally7220 Рік тому

    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.

  • @nymexe
    @nymexe Рік тому +3

    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 😀

  • @abhicoder5863
    @abhicoder5863 Рік тому

    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

  • @alirezafaraji
    @alirezafaraji Рік тому

    Amazing video. I watched it all the way

  • @vilmarcabanero2500
    @vilmarcabanero2500 Рік тому +1

    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?

  • @neronguyenvn
    @neronguyenvn Рік тому

    woww and i can apply this to my korge game, thank you philipp

  • @TVHovna
    @TVHovna Рік тому

    Wow, really broad topic you've covered. Will watch soon :)

  • @MetehanBOLAT
    @MetehanBOLAT Рік тому +1

    Thanks Philipp! 🥳🥳

  • @ShashankYadav-vg2tz
    @ShashankYadav-vg2tz 9 місяців тому

    Amazing tutorial philipp❤ can you tell me where can i learn more on websockets like resources or docs?

  • @gouravdadhich1332
    @gouravdadhich1332 Рік тому +1

    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😢😢😢😢

  • @lepro0
    @lepro0 Рік тому +1

    Thanks for the amazing content Phillip, quick question (for anyone else as well) how do you deploy using git instead of through intellijIdea ?

  • @adcmjbe
    @adcmjbe Рік тому

    Excellent tutorial ... thanks a lot

  • @zynastor1
    @zynastor1 Рік тому

    Amazing tutorial!

  • @Phoenix-lv1iy
    @Phoenix-lv1iy Рік тому +1

    hey @PhilippLackner please make a video to deploy ktor web application on xaamp or apache please

  • @ykalchev
    @ykalchev Рік тому +1

    Amazing content, Phillip. Well done. Insta like :)

  • @josipmarasovic2436
    @josipmarasovic2436 9 місяців тому

    45:58 when did we configure "play" route on server?

  • @Tbijo54
    @Tbijo54 Рік тому

    I would like to know which color theme/scheme are you using please.

  • @xzibit5966
    @xzibit5966 Рік тому

    philip please provide a tutorial on making an item database application using jetpack compose, greetings fans from Indonesia

  • @darioinversiones
    @darioinversiones Рік тому

    amazing, inspiring, useful, great, cool, informative, other

  • @salmanjawed98
    @salmanjawed98 Рік тому

    Thanks a lot for this

  • @davronbekraximjanov9022
    @davronbekraximjanov9022 Рік тому

    Thanks , Bro 👍👍👍

  • @surajtutz5742
    @surajtutz5742 Рік тому

    How to deploy a ktor app , which is using PostgresSql , pls make a. Video on it 🙏

  • @Alexeytrn
    @Alexeytrn Рік тому

    Thanks a lot

  • @byran3019
    @byran3019 Рік тому

    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.

  • @mustafaammar551
    @mustafaammar551 Рік тому

    you are the best 👍👍👍👍👍👍

  • @_0_o_924
    @_0_o_924 Рік тому

    A beginner here ,,
    Do you need any money to host servers?

  • @majinzeke4977
    @majinzeke4977 Рік тому

    Is it possible to make fully functional games in kotlin? We don't have to use unity?

    • @PhilippLackner
      @PhilippLackner  Рік тому

      You can make them using OpenGL, but it's a pain the the a**. Use unity.

  • @smaig5196
    @smaig5196 Рік тому

    how to make tetris ?

  • @piyushinsightss
    @piyushinsightss Рік тому

    💯💯💯

  • @ravshanbaxronov
    @ravshanbaxronov Рік тому

    👍👍👍👍👍👍👍👍👍👍👍👍👍👍

  • @gofudgeyourselves9024
    @gofudgeyourselves9024 Рік тому

    Is it possible to connect client side ktor with websocketjs on backend side

  • @sijanneupane
    @sijanneupane Рік тому

    first

  • @TheMrAntosiek
    @TheMrAntosiek 10 місяців тому

    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
    }