Broadcasting on a lan network
Blitz3D Forums/Blitz3D Programming/Broadcasting on a lan network
| ||
So I am making a multiplayer game where for the multiplayer menu you will have the option to play lan or internet. Obviously the internet option would have its own server, and that would handle the game play and people who would be trying to join. However when it comes to lan I am having a few issues. Lan ip are normally in the format 192.168.x.x. When broadcasting I normally just do 192.168.8.255, however I believe it is possible that the 8 may change as well, and possibly even the 192 and the 168. I was trying to broadcast to using 192.168.255.255, however it didn't seem to be working. Was there something I was missing or should I be doing something different? Thanks for any response! |
| ||
Use this ;) http://dawp.tripod.com/netblitz.htm |
| ||
I am familiar with NetBlitz however he asks for the IP so the user still has to type it in. he does have an automatic option for the local computer if you were just testing it out, however that just get the IP for your computer and use it. |
| ||
Just delete the part with "Input" and change it to the external IP you wish to connect to. Name THAT file "Client.exe". Do the same thing with server, only change the IP to your internal IP. IE: 192.168.x.y... That's what I did! :) |
| ||
Lan ip are normally in the format 192.168.x.x. When broadcasting I normally just do 192.168.8.255, however I believe it is possible that the 8 may change as well, and possibly even the 192 and the 168. I was trying to broadcast to using 192.168.255.255, however it didn't seem to be working. LAN IPs can be in a lot of different forms: 10.0.0.0 through 10.255.255.255 192.168.0.0 through 192.168.255.255 172.16.0.0 through 172.31.255.255 you can calculate the broadcast address of your network segment, but you need the NETMASK value to determine that. I'm not sure how to read out the netmask from within blitzmax - I don't believe there's a built-in command to do so. Anyway: if your netmask is 255.255.255.0 (most common), then the broadcast IP is the same as the first three groups of your own IP address with '255' at the end. If it's something different, you will need to calculate the address -- which you can do as long as you have your own IP and the netmask value. Here's some info on how to calculate: http://www.wikihow.com/Calculate-Network-and-Broadcast-Address |
| ||
You da bomb man |
| ||
Thanks, buddy :) |
| ||
You're the greatest! |
| ||
Thanks for the kind words! :) Glad I could help! ^_^ |