Creating Multiplayer Games with using LibGDX and NodeJS.
Learn how to turn you game into a client that can connect to a back end server and communicate with other clients via network sockets through the library Socket.IO. We will discuss the creation of both the back end server and the game client as well as connecting them together into a fully functional multiplayer game!
Source:
Github:
YouTube Channel:
Facebook:
Twitter:
Imran Abdulmalik
07.06.2023Thanks for the amazing tutorial. However I noticed a mistake in this part:The timer variable was never reset after update. This will make the client keep sending updates continuously after the first update.SOLUTION: After sending updates to the client, just reset the timer variable to 0.
Delibird Empire
10.12.2022Awesome!
Peter Haller
10.12.2022Thank u Brent. This series is just great. Thumbs up… Where can i donate you? greetz
Muhznit
09.12.2022This has been a pretty nice tutorial. I don't usually even bother with video tutorials, but this one was pretty easy to keep up with. So is this the end of it then, or will you go into more detailed things like the infamous synchronization issues I keep hearing about?
Delibird Empire
09.12.2022Are you going to participate in the LibGDX Jam?
Subconscious Quotes
09.12.2022You are awesome! I haven't completed these tutorial yet, but some of your libGDX lessons got me running for ioS, Android and mac, and I am very excited about that. This is exactly why I switched to java from c++ sfml, I couldn't run on multiple platforms with the same code. I love your tutorials I have seen so far, keep it up! I can't wait to do this nodejs in the near future.
Pavel Manachin
09.12.2022Hi, Brent. Thanks for tutorials. Could you make series of tutorials about game like Match-3? Example: http://www.raywenderlich.com/66877/how-to-make-a-game-like-candy-crush-part-1
Respekt
09.12.2022Hello Brent, thanks for the awesome tutorials I've been watching and rewatching to get a hang of how the socket.io client for Java works, because I need it for a project I'm working on now (Multiplayer Pong), and my project is a bit more modularized and I need events to be fired from different Classes, that is why I made a SocketHandler class that has multiple static methods to launch events from Java, but to do the opposite thing which is receiving data from Node.js, I need those "socket.on()" calls in different parts (Ball class, Paddle class, and others) but I can't wrap my head around how I would do that.
Here is the github repo, the main class is in multiplayer.pong.client
https://github.com/ImadSalimi/multiplayer-pong
Yevhenii Herasymchuk
09.12.2022great lessons)) hope I can learn a peace of this. I'm a new in node.js, it seems hard to study async, in the univ I study languages like C, C#.
Thank you, unfortunately, it has such a few views and likes.
Good luck!
Handre Elias
09.12.2022Nice tutorial. How can people connect to my server over the internet?
Tom Linthwaite
09.12.2022Great tutorial. By the end of it I adapted it to fit my game and am very pleased with the results! Online multiplayer is something I've always been scared of implementing but it seems like a reality after your videos. Thanks and keep up the great work!
supratik goswami
09.12.2022Hi, how would we translate all this to an android application? what changes will I have to make and where?
Tony Malfoy
09.12.2022Hello Brent, thanks for all ur tutorials , you are amazing, I have a question about this:
– I need to update a TextureRegion when my players moves (for any sides) My players are only initialise with default TextureRegion and the texture region never change, I try to send to my server a TextureRegion but I can not get back this one.
The locale player move correctly but the others doesn't.
I don't know if you have understood me 🙂 sorry for my bad english -)
Keep making amazing tutorials 😉 Thanks
kidabek
07.12.2022Watched all tuts on Multiplayer! Awesome!
Sean Noonan
07.12.2022This was a great tutorial and like everyone else I'd like to thank you for making it. Very concise and very cohesive. Do you have any suggestions where I could go to learn more on this subject? I've found this area particularly lacking especially in regards to LIBGDX. I'd really like to see a full game developed and see the nitty gritty details. I know there are many variations depending on the type of game, but I'd really like to learn more, any suggestions?
Muli Yulzary
07.12.2022Brent I challenge you to build simple game with client prediction and server reconciliation using nodejs and socket.io.
Some reading material: http://www.gabrielgambetta.com/fpm1.html
Btw love your vids, that's how I got into nodejs.
Felicia Amy
07.12.2022Hi, I love all your tutorial, they are really helpful for my project. By the way, do you think this will work on Android or ios phone? Thanks!
Marvin Jansen
07.12.2022Hey Brent. thanks for all of your helpful tutorials. I have a question about updating the remote clients position in the local client. When my player moves it sends the x, y coordinated judt like you do, but it will lag because it sends every 100ms. So my remote player jumps on the local client. Can you help me solve this? I have read a bit about "interpolation" / predicting player movement. Thank You!
Dragos Rachieru
07.12.2022part 8?
noosetime
07.12.2022This is pretty cool for starter level, but in real world that kind of communication would crash and burn.
Ali Janalizadeh
07.12.2022is this series going to continue?
Diaa Mostafa
07.12.2022Excellent tutorials. Thank you!
OlivaDevelop
07.12.20222 preguntas, como puedo conectarlo en mi server? tengo un server de dinahosting con nodejs y con su parte creada y todo, pero no me conecta al socket.
como añado bots automaticos?
İbrahim Kasapoğlu
05.12.2022Hi Brent, firstly thanks for the tutorial I have a question about run the Box2d world on the server. How can I calculate physic process with node.js ? Because I think if I run the box2d on client device it will very useless, am I wrong ? Are there any tutorial document etc. ? Or can you explain that basically, thank you.
Marcus Dubreuil
05.12.2022Whenever my client sends a socket.emit request there is a very noticeable hitch in performace (the whole screen literally freezes for half a second). Why could this be, would you have any idea?
Zeldars
05.12.2022Aren't you supposed to have all the logic, like spaceship positions, on the server side to avoid cheating?
汪汪
05.12.2022Thank you,it's very helpful to me !!!!!
Fabio B
05.12.2022does it work on android ?
Дмитро Клязника
05.12.2022Can I make it so that the game server itself was created by the game?
ToxicToast
05.12.2022Would you mind showing how to do rooms? As in, different players can join different rooms, so that they don't all have to go to the same world?
RED KIN
05.12.2022Socket.emit() with the coords lags me so much the app even if the server is disconnected someone knows why????
RED KIN
05.12.2022The problem is that socket.emit() slows down all threads by 2 ms, someone know how to make it dont slow down the threads? :(((
Capaz
05.12.2022Good and very instructive video series you made about multiplayer. Thank you very much!!!
Jack Luo
04.12.2022this is divine. holy. another realm of possibilities unlocked.
Jack Luo
04.12.2022my biggest question now is how do I run these games on web browser or phones?
Turko Game
04.12.2022Hi Brent, could you publish a training video on in-app purchasing for Libgdx. I can not find an informative video on this subject. Thank you.
Gabi D.
04.12.2022Thank you for these videos !
l1m3s
04.12.2022thanksssss its very helpful i am currently working on mult.p game that generate maze and 2 or 3 players starting to play move buy other items ..its very helpull thanksssssss
MationPlays
04.12.2022I get a nullpointerexception in line data.put( ´´x´´, player.getX());
Feep In
04.12.2022I got a problem with spriteBatch i think. A client can't see another client moving, it draws it when it spawns but when Im moving with a client it doesnt show up on the other client. Can anyone help me ?
Brian Salkas
04.12.2022Great videos man, each time I watch one I gain new insights.
Anh Xuan
04.12.2022Hi Brent, nice tutorial <3. Can you make a libgdx tutorial about prediction, interpolation for multiplayer game ?