Jump to content
Xtreme .Net Talk

SysRq2000

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by SysRq2000

  1. No problemo dude... ;) - SysRq
  2. For you C# programmers check this page...
  3. To make a call to the hardware clock in vb.net use the following code. <DllImport("Kernel32.dll")> _ Public Shared Function QueryPerformanceCounter(ByRef lpPerformanceCount As Long) As Boolean End Function <DllImport("Kernel32.dll")> _ Public Shared Function QueryPerformanceFrequency(ByRef lpFrequency As Long) As Boolean End Function So a class could be formed like this... Public Class HighResolutionTimer Private m_Frequency As Long Private m_Count As Long Public Sub New() QueryPerformanceFrequency(m_Frequency) End Sub Public ReadOnly Property FTime() As Double Get QueryPerformanceCounter(m_Count) Return m_Count / m_Frequency End Get End Property <DllImport("Kernel32.dll")> _ Private Function QueryPerformanceCounter(ByRef lpPerformanceCount As Long) As Boolean End Function <DllImport("Kernel32.dll")> _ Private Function QueryPerformanceFrequency(ByRef lpFrequency As Long) As Boolean End Function End Class - SysRq
  4. I would really like to see a game section in this community because I've seen many game related posts in the "Graphics" and "DirectX" sections. The game section would be nice to have when you want to discuss gameplay issues and ask about math problems. I'm currently developing a 2d game and I have many questions I don't want to post in any of the current sections. So I just wanted to suggest it... - SysRq
  5. I started using Access but after a while it got to slow, so now im only using MS-SQL... Don't you just love stored procedures? ;) - SysRq
  6. If you use the standard forms authentication the user info will usually be stored in a cookie on the client. You can read more about it here. Then you can set the session duration in the config file, it's the attribute called "timeout" on the <forms> element. - SysRq
  7. I don't think you'll regret spending 120$ on VS.Net 2003.... - SysRq
  8. Dynamic_sysop, it looks great... Wanna share the source?
  9. In outlook xp you just add a http account and chose hotmail from the list...
  10. Thanks Thanks. I thought it would be something like that... But since I'm pretty new to Direct3D I would like to see some example code or a tutorial. Do you know where to find any samples related to this subject? - SysRq
  11. Hi, I'm developing a 2D game using Direct3D. I need to show a transparent map window in the corner of the main window (see attachment), so the player knows where to go... How is this done in Direct3D? - SysRq
  12. The game... It's an unicycle game... But it's still very much in the design stage. I'm developing the game around various physic concepts to make the unicycle handling very realistic. Early gameplay tests done in Flash MX, seems very promising, and I can't wait to show you guys an alpha release of the game. I got the idea from the old, but very addictive game, "Elasto Mania". Check it out! - SysRq
  13. QueryPerformanceFrequency & QueryPerformanceCounter, the most accurate? I don't think it is possible to get any more accurate... am I wrong? - SysRq
  14. High-resolution performance timer Well you can construct a much higher resolution performance timer by calling the windows api functions: QueryPerformanceCounter(out long) and QueryPerformanceFrequency(out long) Read this article from The Code Project, to learn how to construct your own high-resolution performance timer using windows api calls. :D I just don't know if there is an unknown cost by calling windows api functions from a loop in managed code? :confused: Maybe there is a better solution to the problem... I'm still open to suggestions! ;) No, I just used the original intended framerate of 30, and not the error-corrected value of 40, to explain why you have had to add 10 to get the correct framerate. Btw, if your TickCount resolution is 16 milliseconds, the true framerate will be 31.25fps when setting the intended framerate to 40fps. That is because the actual time between execution will be 32ms, and not 25ms as 40fps would suggest... ;) - SysRq
  15. Close but no cigar... Thx for the suggestion. However, I dont think that the use of Environment.TickCount is very reliable... Environment.TickCount have a resolution of approx. 16 milliseconds on my machine (may vary on your machine), which is a very unfortunate number because 1000 / 30 is 33,333... and 16*2 is 32. So in your code the time between execution will be 16*3 (48) milliseconds... and that will give you 21 frames per second. Notice that it is 9 frames below the wanted framerate of 30 FPS! (You make it 10 :p) Maybe a windows api timer could solve the resolution problem, but I'm worried that WinAPI calls from VB.Net are slow...? - SysRq
  16. Hi. I'm currently developing a 2d game using Direct3D. But I would like to limit my "game loop" to executing just 30 times per second, or said in an other way, I would like my game to run at 30 FPS... What is the best and/or normal way to do this? Currently my game loop is just a plain "Do" loop. I've tried to just use the tick event of a Timer but it is VERY inaccurate. Any suggestions? - SysRq
  17. I've just started using DirectX for my 2d games and I actually found Direct3D to be better (faster) to use than DirectDraw. The 2 most important objects are: DirectX.Direct3D.Surface and DirectX.Direct3D.Sprite. Be sure to reference both Direct3D and Direct3DX, because the Direct3D.Sprite object is a part of Direct3DX. - SysRq
×
×
  • Create New...