Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About phb5000

  • Rank
  1. phb5000

    FPS / VSync Issue

    Thanks. It worked perfectly :P
  2. I'm using the FrameworkTimer supplied by the DirectX SDK samples to get the elapsed time between my frames. I have VSync turned on which should give me around 60 fps, however, I'm only able to achieve around 30 - 40 fps. What could be causing this? My render loop is as follows: 1) A framework update call 2) Updates FPS value 3) Updates my application 4) A framework render call 5) Prepares device 6) Renders my application 7) Finishes device 8) Loop
  3. Im using the render loop recommened by Tom Miller which uses the PeekMessage PInvoke to check for pending messages. However, when I try running this code on a different machine I get a "encountered a problem and needs to close" error. When I look at the details I found "P9 : system.security.security" which must be some kind of an exception. The code that I try running is: [StructLayout(LayoutKind.Sequential)] public struct Message { public IntPtr hWnd; public IntPtr msg; public IntPtr wParam; public IntPtr lParam; public uint time; public System.Drawing.Point p; } [System.Security.SuppressUnmanagedCodeSecurity] [DllImport("User32.dll", CharSet = CharSet.Auto)] public static extern bool PeekMessage(out Message msg, IntPtr hWnd, uint messageFilterMin, uint messageFilterMax, uint flags); Message msg; PeekMessage(out msg, IntPtr.Zero, 0, 0, 0); What could the problem be? How do I fix it? Is there a better way of doing this?
  4. I'm currently working on a game engine that may require a lot of "text" to be rendered. What is the optimal way of doing this? Should I use the DirectX Font object for each string of text? Or should I utilize GDI? Or should I make my own FontEngine? Is there a performance difference when using a single DirectX Font object to draw several strings of text, compared to declaring a DirectX Font object for each string of text?
  5. phb5000

    [web] Page Navigation?

    Yes, I know, i hate working with ASP, but here is my situation My web host is *itching about updating to asp.net 2.0!!! Which is driving me crazy since I cant develop any asp.net 1.1 in web developer express. And I really dont feel like chaning web host atm. So could I please get some suggestions for good page navigation, doesnt have to be language specific. :)
  6. Im just trying to figure out what the best page navigation structure for a website is? I would like some suggestions for different techniques such as: includes, frames, all single pages, etc... Im using ASP (classic) and I want my navigation to be as simple, but effective as possible.
  7. When errors are thrown during debugging in my application they are thrown in the Static void Main() @ Application.Run(...); The exception that is always thrown (regardless of what error occured) is the TargetInvocationException. How can I prevent this error from being thrown, and instead have the actual exception thrown, at its actual location, not at Application.Run(). Btw, Im using the BackgroundWorker, Im suspecting that this might have something to do with it. Any ideas?
  8. phb5000

    [.net] Thread Safe Socket,

    I managed to get a completely thread safe socket wrapper by simply using the BackgroundWorker component supplied by the .net framework.
  9. phb5000

    [.net] WebRequest Exception

    Nop, it aint there, haha. Yes, I added the Web namespace, and I do see that objects from the namespace are indeed there. However, the HttpUtility isnt there. Even when I use the object browser to browse for the class I find it, but I cant find it when typing the actual code. Its extremely weird.
  10. phb5000

    [.net] WebRequest Exception

    Thanks, Ill give it a try :) One more question though, HttpUtility seems to be a well known class supplied by the System.Web namespace. I cant seem to be able to find it :S
  11. phb5000

    [.net] WebRequest Exception

    WebRequest req; WebResponse res; req = WebRequest.Create("https://nexus.passport.com/rdr/pprdr.asp"); res = req.GetResponse(); (Throws WebException : ReceiveFailure)
  12. Im trying to get the response of a web request by calling the GetResponse() method after creating (succesfully) the WebRequest. However, one day, all of a sudden, after it had been working earlier, I get a "ReceiveFailure" WebException. Any Ideas?
  13. I have some source code regarding packet parsing for msn messenger. And by the way, I'm starting up a msn messenger .net client project. Maybe you're interested: http://forums.fanatic.net.nz/index.php?showtopic=15682 (Project Post) http://forums.fanatic.net.nz/index.php?showtopic=15628 (Packet Parsing) I'd be glad to have another .net programmer interested in msn messenger on my team :).
  14. phb5000

    [.net] Thread Safe Socket,

    Could you please be a bit more specific maybe on how to actual implement an invoke method? What exactly does it do? How exactly do I get back to the main thread without using the invoke method supplied by a windows control?
  15. phb5000

    [.net] Thread Safe Socket,

    So there is no way of handling the multithreading only within my component (the socket wrapper)? I have to add the "usage" code to use the data generated by my component. And another question what if my application looks like this: THE WINDOWS APPLICATION (GUI) (Thread 1) | | | APPLICATION FEATURES (Stuff my app does) (Thread 1) | | | DATA PARSER AND COMMUNICATOR (Communication Parser) (Thread 1) | | | SOCKET WRAPPER (Wraps the socket capabilites supplied by .NET) (Thread 2) Now, the only transition between threads is between the socket wrapper and the data parser, however, the only place that I can do the thread switching is in the actual windows application (use invoke...) But that seems like a very bad thing to do since the number of events at each step increase. For example: the socket wrapper may have 3 events (connect, close, received) the data parser may have a couple more (connect, close, recievedType1, Type2) application features may have a lot more (this happened, this, this, this, specifically for each type of command received through the socket). SO, what im trying to say is that, isnt there some way of doing the thread switch at a very low level so that the amount of work that has to be done, regarding threads, at the highest level would be nothing. Why do thread switching for maybe 20 events at the windows application level, when it maybe could be done at the lowest level with only 3 events. [Edited by - phb5000 on June 13, 2006 2:29:30 PM]
  • 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!