Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [IP Addresses] What IP do I use for a server?  (Read 1045 times)
0 Members and 1 Guest are viewing this topic.
Offline Jacob Pickens
« Posted 2014-04-27 21:07:46 »

Sorry about the lack of info in the title. I couldnt figure out a way to word it without it scaring off people. This question Isn't really networking related but more of just a problem that I am having trouble trying to work out in my head.

Anyways, I'm learning a little bit of KryoNet and I was trying to think of how I'm going to make this server. If I wanted people to just log into the game and instantly join the server I'd have to host the server on my own computer. Now here's the problem:

Quote
What IP Address do I use?

I have only used localhost for all my test servers and that won't work for a game server. So, what do I do? Do I have to buy a web host thing and use that? Do I have to get my own IP and just put that in?

I really am just confused about this strange thing called Networking. Tongue
Online Kefwar
« Reply #1 - Posted 2014-04-27 21:13:04 »

If you have a little server for your friends only you can host it on your own computer. Port forward your router to your local IP and give your friends your IP address.

Otherwise I would suggest renting a server.
Offline Jacob Pickens
« Reply #2 - Posted 2014-04-27 21:15:27 »

Thanks very much. Say I did make a huge MMO and hosted it on my IP, what would happen? I would assume it would slow my internet immensely but what else?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Slyth2727
« Reply #3 - Posted 2014-04-27 21:25:45 »

You'd probably have people trying to crack it too if it's big enough. Your home network probably wouldn't be able to handle a bunch of requests like that and might just shut down/crash.

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Online BurntPizza
« Reply #4 - Posted 2014-04-27 22:36:08 »

I haven't used it myself, but I've heard good things about Google App Engine.

Unless you're implementing a LAN mode, don't even think about hosting anything serious yourself.

Alternatively you could have your game set up as a peer-to-peer system.
Online theagentd
« Reply #5 - Posted 2014-04-28 01:01:02 »

I haven't used it myself, but I've heard good things about Google App Engine.

Unless you're implementing a LAN mode, don't even think about hosting anything serious yourself.

Alternatively you could have your game set up as a peer-to-peer system.

Crap. I have a perfect corner of my grandma's new apartment and a 100 Mb line ready! My evil plan has been foiled!

Myomyomyo.
Online BurntPizza
« Reply #6 - Posted 2014-04-28 01:43:11 »

Crap. I have a perfect corner of my grandma's new apartment and a 100 Mb line ready! My evil plan has been foiled!

"How tough are ya?"
"I have a T1 line straight to my bedroom."
"Oh... uh, right this way sir..."


If you have the setup and the evil plan to go with it, then by all means go ahead, you seem to know what you're doing.
Given that this thread exists, I doubt that that is OP's situation.
I realize that my response was quite absolute for the context. Counterexample noted.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2014-04-28 16:15:42 »

Avoid Google App Engine like the plague for this use case.

It allows ~15 concurrent connections per instance, any more and it starts to spin up instances as if you're dealing with a sudden surge in traffic.

It has a 30s timeout on responses, and if you fail to respond in time your entire instance will be terminated.

Once you exceed their free tier quotas, it's exceptionally expensive. And then you only get 600MHz instances with 128MB RAM.

TL;DR: don't even bother with KryoNet because GAE only supports HTTP, and doesn't even let you stream, everything you write is buffered until you close the stream.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Online BurntPizza
« Reply #8 - Posted 2014-04-28 16:41:05 »

Avoid Google App Engine like the plague for this use case.

It allows ~15 concurrent connections per instance, any more and it starts to spin up instances as if you're dealing with a sudden surge in traffic.

It has a 30s timeout on responses, and if you fail to respond in time your entire instance will be terminated.

Once you exceed their free tier quotas, it's exceptionally expensive. And then you only get 600MHz instances with 128MB RAM.

TL;DR: don't even bother with KryoNet because GAE only supports HTTP, and doesn't even let you stream, everything you write is buffered until you close the stream.

Ah, ok then. That's too bad, it sounded like a cool idea when I first heard about it, I guess once it gets off the paper it just doesn't turn out.
Have you learned this through experience?
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #9 - Posted 2014-04-28 16:57:54 »

Sadly, yes. GAE scales indefinitely horizontally, but vertically it's a drag. It feels like being hand cuffed, being slapped silly, and being charged big time. It's as tantalizing as it sounds, for the masochists among us.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online BurntPizza
« Reply #10 - Posted 2014-04-28 17:05:30 »

It feels like being hand cuffed, being slapped silly, and being charged big time.

Sounds like the standard legal procedure over here in the US...

Have you found a better alternative for this type of use case?
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #11 - Posted 2014-04-28 17:32:09 »

Any cheap VPS. A few bucks a year will do. If the provider goes out of business, or the server starts to get flaky, switch to another. Port forwarding is another option, but electricity is not as cheap as a VPS.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline ags1

JGO Ninja


Medals: 65
Projects: 3
Exp: 5 years


Make code not war!


« Reply #12 - Posted 2014-04-28 22:49:39 »

I can confirm Google App Engine can get expensive. It's really easy to run out of free quota too.

Offline aldacron

Senior Duke


Medals: 9
Exp: 16 years


Java games rock!


« Reply #13 - Posted 2014-04-30 06:04:20 »

Any cheap VPS. A few bucks a year will do.

I can say many, many good things about Linode. The best being that every so often they upgrade your plan -- one or more of more bandwidth, more memory, more disk -- without increasing the price. Recently, they upgraded memory, bandwidth and converted the hard drives to SSD in a smooth and painless process. The support is top-notch also. Digital Ocean seems to be their biggest competitor right now (after Slicehost got gobbled up by Rackspace, they are no longer in the same league). They have cheaper plans and I haven't heard much bad about them, but Linode just rocks. I couldn't imagine going anywhere else for a VPS.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #14 - Posted 2014-04-30 06:26:37 »

Sure. JGO runs on Linode. But $20/month is nothing to sneeze at, especially for a hobby project - keep in mind the OP has little networking experience, Linode is overkill.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline ags1

JGO Ninja


Medals: 65
Projects: 3
Exp: 5 years


Make code not war!


« Reply #15 - Posted 2014-04-30 07:37:36 »

For a hobby project, Google App Engine may be the best fit. After all it can be completely free for computationally light and low traffic scenarios.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #16 - Posted 2014-04-30 13:34:03 »

Repost for redundency's sake:

TL;DR: don't even bother with KryoNet because GAE only supports HTTP, and doesn't even let you stream, everything you write is buffered until you close the stream.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Cero
« Reply #17 - Posted 2014-04-30 14:35:25 »

how does Amazon AWS compare ?
One should be able to use KryoNet with that right ?

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #18 - Posted 2014-04-30 14:54:42 »

how does Amazon AWS compare ?
One should be able to use KryoNet with that right ?
Amazon's free tier is usable for running the smallest VPS 24/7 for 1 year.
After that, it's not cheap: $14.88/month for the smallest/cheapest instance: t1.micro and $128.12/year if you reserve, pay and use it for an entire year ($350.36 for 3 year).

This seems to be a nice resource to lookup cheap VPS providers: http://lowendbox.com/ - if you search a bit you can find a VPS for $18 per year ($1.50 / month) with more than acceptable specs.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (35 views)
2014-10-17 03:59:02

Norakomi (26 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (27 views)
2014-10-15 16:18:58

TehJavaDev (52 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (42 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (76 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!