I will, of course. Who may not be on Discord to see it too. Awesome. Cool.
And then another question. I don't know too much. I'll just ask it. Can we, is it possible to use UDP in web games today? Is that something we can do?
Actually, no, because there are some network issues, maybe network problems like VDOS attacks that make it not as safe to use UDP protocol in web, but the closest thing we have to that is using WebRTC, which is actually not my preference because it's really... first of all, it's a P2P on its own and it's harder to implement. So I think using TCP with WebSocket is the way to go.
That makes sense. But would that mean that WebRTC would be better in terms of... It wouldn't necessarily have server costs. So if you're making like a small game or something because it's P2P, you wouldn't...
Yeah, a small games, like a small room like Tic-Tac-Toe actually could be made with WebRTC, but as the rooms get bigger, especially, there are more problems like for P2P and WebRTC. Like on mobile games, each client has to send their messages to like a hundred people and they would use much data like connection and it wouldn't be very good practice.
That makes sense. But it sounds like maybe if it's like a one-on-one game like a chess or something where you only have two players, then maybe WebRTC would be a good option. That would be good. Cool.
Oh, I made a follow-up question for that. But even though it's P2P, you still need some server to make the initial connection between the peers?
Exactly. You can use ICE on your server to do that. Like I said, it's harder to implement. So maybe for a smaller game, it's better to use actually the web sockets, because it's easier to implement. It makes sense. Cool.
What about, we have a question from Tanta. They say thank you for the talk. And my question is, what's the advantage of using JavaScript on web versus desktop games, for example?
Well, JavaScript on web, it's actually much easier I guess to implement, because most of the developers have already worked with JavaScript and the compilation of that is actually really fast too, so you don't need any, the best thing about it is that you just refresh the browser page and you can see your work, yeah, it's there, and so I guess that's the best thing for me, because I can easily compile my code, easily see the results and stuff like that, and it's much easier to publish because of the way it's on the web and you can actually, your players can play it on every device.
Comments