Anozireth

Members
  • Content count

    111
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Anozireth

  • Rank
    Member
  1. Player movement?

    Typically in the game's model of the world, the position of stationary objects in the world is fixed and the player (and other moving objects) move in relation to the origin. However, in terms of rendering, the camera's viewpoint is always the center of the action and the coordinates of everything else are translated relative to it. In a way, you're both right.
  2. Guessing Game Code help

    You will need a couple more variables, perhaps something like guessMin and guessMax to store the top and bottom of the range. Initialize them appropriately, and with each try, check if the guess is closer than one of your boundaries and update it as needed.
  3. Quote: PS:English is my second language(im a French-speaking from Québec) and I don't know if my English is ok, so I hope everything I said is understandable. ;) I don't think anyone would have known if you hadn't said anything. Your English is better than some native speakers. [smile]
  4. Here's how I use foreach with Dictionary in my programs. It successfully iterates through the whole collection without having to worry about indexing. I'm not quite clear if you are concerned with the ordering of the elements or not, but if you are then Dictionary is probably the wrong data structure to be using anyway. // This is part of my class definition. // ctlChannel is a custom Control. private Dictionary<String, ctlChannel> Channels; // IRC Channels keyed by name // // Initialze the Channels Dictionary in class constructor. // // Then when I need to do something with all the channels: foreach (KeyValuePair<String, ctlChannel> kvp in Channels) { // Do something with kvp.Value here. } Hope that helps! Edit: Typo
  5. Having the window and camera as two separate classes seems like the best way to me. The window should have a reference to its camera. Just like your second post. [smile] Edit: Fixed a typo.
  6. Establishing an irc link

    Yeah I was just looking again at the USER command in the newer RFC (2812) and realized what you are doing is fine. I had been using the original (1459) one when I wrote this part of my code before I realized there was an updated version. Looks like I have some updating to do!
  7. Establishing an irc link

    Here's the portions of my code relevant to establishing the connection. It's in C#, but should give you an idea of what I'm doing. private void Connect(String ServerAddress, String Port) { try { IPHostEntry iphe = Dns.GetHostEntry(ServerAddress); foreach (IPAddress ipad in iphe.AddressList) { IPEndPoint ipe = new IPEndPoint(ipad, int.Parse(Port)); Socket tmpS = new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp); tmpS.Connect(ipe); if (tmpS.Connected) { scktIRC = tmpS; break; } } } catch (SocketException e) { Console.WriteLine("SocketException caught on Connect()!"); Console.WriteLine(e.ToString()); } catch (Exception e) { Console.WriteLine("Exception caught on Connect()!"); Console.WriteLine(e.ToString()); } networkTimer.Start(); Status.EchoLine("Connected to server!", Color.Gray); String tempStr = "USER TomIRC " + Dns.GetHostName() + " " + Settings.ServerAddress + " :" + Settings.UserRealName + "\n"; SendData(tempStr); tempStr = "NICK " + Settings.Username + "\n"; SendData(tempStr); } public void SendData(String data) { if (scktIRC != null && scktIRC.Connected) { scktIRC.Send(Encoding.ASCII.GetBytes(data + "\n")); if (RawData != null) RawData.Echo(data, Color.Brown); } }
  8. Establishing an irc link

    I'm not sure your USER string is valid. Here's an example of what my client sends: USER TomIRC tomgaming irc.servercentral.net :John Q Public NICK TomTest Also, try adding a newline character to the end of your commands. If that doesn't work, post what message the server is sending back to you.
  9. Graphics Resources needed

    Google Images might be a good resource for reference pictures as well if you know specifically what you're looking for.