We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello I am making a game, and I was hoping to make it accessible over the internet, especially multiplayer. So this is how it would be. User would download game. And when they open it, it works because if they have internet. If for a reason they don't have it, I will make an error message, but the main point is that I only want the game to work if there is internet.
Answers
Anyone please?
IMHO you shouldn't worry about post-production features while you still don't have even a working prototype!
Nonetheless, you should look into the "Net" library for server/client operations:
http://processing.org/reference/libraries/net/index.html
IMHO? What does that mean? The point is that I have already looked into it. Exact website as well. But I don't know which do I use? Server? Client?
IMHO -> In my humble opinion
https://stackoverflow.com/questions/1139547/detect-internet-connection-using-java
http://forum.processing.org/two/discussion/comment/21292#Comment_21292
dimiro, thank you, your answer is closer to what I needed, but thank you GoToLoop. Thing is i dont need yahoo weather, I just mean a connection in general. So is there a library for just a connection in general? or does the yahoo one work as well?
Well if you make a multiplayer game, it should find the server it's trying to connect to.
Thank you.
Okay so i went to examples and opened up the SharedCanvasServer. Now I am wondering, if i put this in my game, how can other people connect to the same port? How can they create their own port? Thank You
It's the server which chooses the port. And also opens that port in its router!
you mean the port of my computer, 80?
The port you choose the server to have, you've gotta open in your router!
Oh I see, okay but how do i open it in my router? Please, I only a teenager with very little computing experience in this area, so i am sorry if i ask all of these questions. Can other people playing the game make their own port for the server as well?
Hello?
It's probable, but dunno how to do it! For sake of simplicity, decide for a port and use it for both server & client!
Oh I get it now I make all this. Okay.
How would other people connect to this server?
You give them the IP address.
The one i create? Or the one from my computer.
The one from the server you're running the program on (that would be your computer). If the other players are on the same local network, you can find it by using ipconfig. I don't know how it works if they're not on the same network...
For the server computer:
http://InaTech.eu/inadyn.Ok so you mean, I make the game with a server. Like go to loop said, make my own port. Then I give other people my ip (the one I created) and they connect through it using some Ddns that go to loop spoke about.
All I've said above is for the server side only! Only thing client side need to know is server's host provided by the DDNS service. Port is fixed for both server & client!
So I only need the port.
Make a port, give others the port, they connect to the port. And they access my program, right?
Better hardcode it in the application. Make things easier although less flexible!
Okay what do you mean by hardcore it? Make it an int or something?
Okay, make an int for server, an int for client, client will ask the user which ip (which I don't know but I think I will give them or the one made by the DDNS server?) and they type it in, or something and they access my program.
Right?
Go to loop?
Have you already visited the links I've posted? When you sign up for your own DDNS, you're gonna have a much clearer idea than me simply saying "Yes, your conclusions are about right!" >-)
Oh okay, so my conclusions are right?
Okay i made my dns, and I have two hosts.
techwiz777.ddns.net and dndmultiplayer.ddns.net
Now how do I put this in my code?
Yes I installed the update system. And I put the ip they gave me into what net library example code.
Go to Loop?
???
Into which processing example do I put the ip they gave me? Please reply.
That IP URL is for the client app to use to connect to the server app!
I might sound so uneducated, but you are throwing me off, seriously. So after all this information, could you please just give me an example piece of CODE explaining what you mean? Thanjs
I've never coded client/server sketches yet. I've just told you what I knew about configuring a server for connection, which is independent from programming. Sorry! X_X
Oh. Sorry, GoToLoop.