Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About MikeyO

  • Rank
  1. Yes, Lidgren is good. (sorry to for the necromancy:P) http://code.google.com/p/lidgren-library-network/
  2. http://www.google.com/search?hl=en&q=httpwebrequest+ssl&btnG=Google+Search Tons of stuff on the web regarding this, actually I am a bit curious to know the answer but I really can't help you because I don't know any better than I'm sure a dozen forums put together;)
  3. MikeyO

    Troubles with the NAT - solved

    Well, as it turns out, I was attempting to experiment with someone who lived overseas and by altering the TTL (using .NET 2.0, which I was not initially using) to 45, so that the packet lasts a little longer, I was able to successfully punch through. Thanks for your help.
  4. MikeyO

    Troubles with the NAT - solved

    Heh, well... the actual program is a little bit different. If you send a '0' in front it will look like "1,0" when the server gets it, because 1 is the "Message" code (whereas 0 is the login code, which only sends when you hit the connect button). The code used is determined by the program, not the user. The server/client are not the programs I am trying to develop, I am actually trying to make an easy to use network library for another program. The server is only 100 lines of code. I have been pouring over documents on the internet and have not found any new information except one from http://www.mindcontrol.org/~hplus/nat-punch.html, where it says something about having a TTL of 2, but I have no idea what that means or how to implement it.
  5. MikeyO

    Troubles with the NAT - solved

    I am trying to implement it the way you said above.. here is the server logic (pseudocode): while(true) { Packet incomingPacket = connection.receive(); string[] message = incomingPacket.data; //doesn't block because packets are in a queue. if(message[0] == "0")//this means its a new user { userArrayList.Add(incomingPacket.endPoint); SendToAll(userArrayList); } } SendToAll(ArrayList users) { foreach(IPEndPoint ep in users) { connection.send("User has connected!", ep); } } connection.send(string msg, IPEndPoint ep) { socket.SendTo(getBytes(msg), ep); } The above works if: there is no NAT or if DMZ is enabled for my computer, or there is port forwarding/triggering. I can still send packets to the server, but not receive them otherwise.
  6. MikeyO

    Troubles with the NAT - solved

    When the server receives the packet, it stores all the data returned into a buffer, along with the EndPoint that is returned, it is essentially: remoteEndPoint = new IPEndPoint(IPAddress.Any, 0); bytesReceived = udpSocket.ReceiveFrom(buffer, SocketFlags.None, ref remoteEndPoint); remoteIPEndPoint = (IPEndPoint)remoteEndPoint; udpSocket.SendTo(data, remoteIPEndPoint); (I simplified it a little bit..)
  7. MikeyO

    Troubles with the NAT - solved

    Linksys is a division of Cisco, and I said "pretty much". It seems sort of like I am getting the Packet's destination port # rather than the source port.. but I am still unclear whether I should return it on the same port it came in on or on the port it was sent from.
  8. MikeyO

    Troubles with the NAT - solved

    I have actually been sniffing packets (with Ethereal), and they are not reaching my computer at all, the router just drops them. I have a Linksys router (and they pretty much invented NAT).
  9. I've been scouring the internet for solutions for nat punch through, but most of the resources I've found have not been able to answer some of the questions I have.. I am using C#, and am trying to send a UDP packet over the internet (through a NAT) to a remote server which does not have a NAT. The server gets my packets, and tries to send replies, but the replies never reach my machine. The program works fine if I route the ports Im using to my local machine. I use Socket.SendTo() to send messages and ReceiveFrom() to receive them. ReceiveFrom gets an EndPoint, which I am using in my SendTo() instruction, but the EndPoint that is retrieved apparently does not contain the 'source port' of the packet, where it got sent out of the router from. As I understand it, I send a packet from local address to a remote address (232.53.xxx.xxx) destination port: 9001, my router captures the packet, changes the source address of the packet to its outside address (lets say 66.150.xxx.xxx), and changes the source port from 9000 to some open port on the router (lets say 10), adds it to the routing table, and sends it to the remote server (232.54.xxx.xxx). When the remote server gets the packet, it checks who sent it, it sees 66.150.xxx.xxx as the address and destination port 9001. My question is: How do I send the packet from the server such that the client actually receives it when the router does? [Edited by - MikeyO on May 16, 2006 11:03:25 AM]
  10. Quote:Original post by KreK It looks like the second picture is using point filtering. Did you try setting it to linear filter? Agh! That did it! thanks mate. I had the texture filtering set in the device initialization but not after the device reset. It's all cleared up now, thanks again.
  11. Yep, the backbuffer is resized to 1024x768 when it goes to fullscreen mode. Here is an exerpt: if(presentParams.Windowed) { presentParams.BackBufferFormat = Format.Unknown; presentParams.BackBufferWidth = 0; presentParams.BackBufferHeight = 0; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.BackColor = System.Drawing.Color.Black; this.ClientSize = new System.Drawing.Size(798, 598); this.FormBorderstyle = System.Windows.Forms.FormBorderstyle.FixedSingle; this.MaximizeBox = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.TopMost = false; } else { presentParams.BackBufferFormat = Manager.Adapters[0].CurrentDisplayMode.Format; presentParams.BackBufferWidth = width; presentParams.BackBufferHeight = height; }
  12. The texture is actually managed, so it is not lost during the reset, so I dont even have to regenerate it. However, even when I do dispose when the device is lost, and regenerate the texture with the same function call, I have the same problem as I mentioned in the first post. Here is a screenshot, before I switched to fullscreen mode, and after.
  13. I am creating a cloud texture with perlin noise and it looks fine, but after I switch between full screen and windowed mode, the resolution of the texture seems to drop drastically. Even if I regenerate the texture after a reset, it is still all pixelated. However, no matter what I do, the texture looks fine initially, whether the program is started in full screen or windowed, it is only after the switch that the texture gets blocky looking. Anyone have any suggestions? I'll post up pictures later when I have time.
  14. Try rendering the transparent objects after the opaque ones, with alphablending and zbuffer enabled and zwrite disabled.
  15. MikeyO

    Z Fighting Question

    What are your Near and Far planes set at? I think that basically the larger the difference is between the Near and Far, the less accuracy you will have. You could try moving the lines slightly higher off the road.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!