Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Cyanite85578y@Kimmax It's randomly generated lol
What should the limit be then? (minimum and maximum) -
Kimmax111068y@Cyanite every ip address's octet (a number between the points) is 8bit long, so the range goes from 0-255.
But there are reserved ips too, like the network id, but that depends on the subnet. Can be easily calculated by an AND tho. -
Cyanite85578y@Kimmax I did not know that. Thank you, I will edit my code promptly. ^~^
Anything else I should know about IP generation? (these won't be real IPs obviously, just in-game "systems") -
Cyanite85578y@Kimmax Huh.. '.299' is actually a bug. My current max is 230. I'll need to look into that.
-
Cyanite85578y@Kimmax pfft. Nvm. I'm just an idiot. The IP i was debugging had '.229' not '.299' lol
-
Kimmax111068y@Cyanite there a few reserved private blocks for private networks that shall not be routed publicly (eg not accessible over the Internet), so use 10.0.0.0/8, 169.0.0.0/8 or 192.168.0.0/8 when representing a private network and don't use one of these addresses when they should be reachable over the Internet.
Ip addresses are a whole own world in the networking part if today's tech, so you may want to read how they work if you want a realistic game -
Cyanite85578y@Kimmax I tried looking up how they work, but didn't find anything useful.
Probably just looking in the wrong places. -
Cyanite85578y@Kimmax If you're interested, would you mind helping me build a cheat-sheet?
A.B.C.D (IP)
A should never be *this*
D isn't usually over *this*
I would really appriciate it, and would happily put your name/user + a link in my source (my game is open-source) above the generation function for everyone to see. ^~^ -
@Cyanite how 'realistic' do you want it? *.0.0.0 should be a country 'code' if i remember right but its been a long time but for 0.0.0.* it should never be 0,1, or 255
-
Cyanite85578y@jckimble i'm not worried about country codes (yet) just tell me what values each position CANT be, and that'll be good enough for now. If it would be easier for you, I can provide my email.
-
Cyanite85578y@jckimble I just want to fool average people who are not expected to know the exact meaning of an IP address. It just need to 'look' legit.
-
@Cyanite yeah i understand
https://en.m.wikipedia.org/wiki/...
This should give you a full list of ips that wouldn't be public. I would block 8.8.8.8 or 8.8.4.4 since its googles dns also but i would make them and 127.0.0.1 easter eggs myself -
Cyanite85578y@jckimble Thanks. What about averages? Like.. How often are values really low/high? For example: The minimum value for an IP section in my game is 30. Is that okay?
-
Cyanite85578y@jckimble Well, thanks alot for your help. Would you like to claim that reward I had mentioned?
-
@Cyanite naw its fine. Pay in forward. If you see someone that needs help, help them.
-
c3ypt1c99058y@osmarks even in a game ipv4 would be better as it is more aesthetically pleasing at least in my opinion.
Plus, I don't think there is going to be millions and millions of devices so i would say keep ipv4 for the game. c: -
How are you doing networking or programming at all and not knowing the upperbounds of an IPv4 address????????????????? Did you do any sort of education
-
Cyanite85578y@itzyzex
Having trouble? This is an old post for the Python version of my game.
I'm setting up my game store page on http://itch.io atm.
;3
Related Rants
-
linuxxx32*client calls in* Me: good morning, how can I help you? Client: my ip is blocked, could you unblock it for m...
-
DRSDavidSoft28Found this in our codebase, apparently one of my co-workers had written this
-
linuxxx23*client calls* "hello, we forgot the password to our WiFi router. Could you reset that for us?" 😐😶😮...
I just spent 20minutes "debugging" my game because i was trying to connect to '117.299.38.69'(in-game IP)
When i was supposed to be connecting to '177.299.38.69' and I couldn't figure out why the IF statement was saying it wasn't in the global list of IPs.. I even checked the two IPs side by side and STILL didn't notice they were different..
undefined
questioning career choice
end my suffering
i feel so dumb
wtf