
nikhilhs
Members-
Posts
23 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by nikhilhs
-
I have the following code to render to a texture: Bitmap bm=new Bitmap(512, 512); Texture tex=new Texture(device, bm, Usage.RenderTarget, Pool.Default); device.SetRenderTarget(0, tex.GetSurfaceLevel(0)); device.Clear(ClearFlags.Target | ClearFlags.ZBuffer , Color.Blue, 1f, 0); SetupCamera(); device.BeginScene(); Draw(); device.EndScene(); device.Present(); It's crashing on creation of the texture. Is there another option other than the bitmap creation? Thanks. -Nick
-
The HTML outputed by ASP.NET is not standard HTML. It only works on IE. I want to write code that explicitly outputs HTML. In Tomcat, there's an XML file that says url x goes to class y. Then the doGet function in class Y is called, and whatever it outputs is sent as the HTML page.
-
I've been using VS.NET for a while, but am unhappy with the way it does webapps. I'd like to write code that outputs plain HTML, and is somehow linked to a URL, like Tomcat/JSP does it. Is there a way to do this? Thanks. -NIck
-
So MS has deprecated DirectPlay, and they no longer plan to support it. Any advice on what networking library I should use? DirectPlay was soooo easy to use. I want something that simple. Thanks. -Nick
-
I'm attempting to get this code to run, but can't. Maybe it's because I'm using the summer 04 update. I get the following error: C:\Documents and Settings\Nick\My Documents\Visual Studio Projects\EngineDocumented\GraphicsText.vb(45): Overload resolution failed because no accessible 'DrawText' can be called with these arguments: 'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As Integer) As Integer': Value of type 'String' cannot be converted to 'Microsoft.DirectX.Direct3D.Sprite'. 'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As Integer) As Integer': Value of type 'System.Drawing.Rectangle' cannot be converted to 'String'. 'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As Integer) As Integer': Value of type 'Integer' cannot be converted to 'System.Drawing.Point'. 'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As Integer) As Integer': Value of type 'System.Drawing.Color' cannot be converted to 'Integer'. 'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As System.Drawing.Color) As Integer': Value of type 'String' cannot be converted to 'Microsoft.DirectX.Direct3D.Sprite'. 'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As System.Drawing.Color) As Integer': Value of type 'System.Drawing.Rectangle' cannot be converted to 'String'. 'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As System.Drawing.Color) As Integer': Value of type 'Integer' cannot be converted to 'System.Drawing.Point'.
-
Is there a way to check whether Managed DirectX runtime is installed on someone's computer? Thanks. -Nick
-
I'm currently working on a networked game which will start out PC only, but will then be ported to macs. My server is Windows 2003. My graphics and networking experience is with .NET/C#. My question is, can I use Sockets or TcpConnection in .NET to connect to Macs? Are .NET Sockets compatible with Mac sockets? Or will I have to write at least the networking part in C++? And in that case, would it be easier to just write the whole thing in C++? Thanks. -Nick
-
Unfortunately, it doesn't seem to be working. I've added this code between begin scene and end scene. All the 3d graphics still work fine. It's just not drawing anything that I specify after I switch to ortho. device.SetTransform(TransformType.Projection, Matrix.OrthoLH(1.0f, 1.0f, 0.0f, 1.0f)); device.VertexFormat = CustomVertex.PositionNormalColored.Format; CustomVertex.PositionNormalColored[] radarB = new CustomVertex.PositionNormalColored[2]; radarB[0].SetPosition(new Vector3(0.25f, 0.25f, 0.01f)); radarB[0].Color = System.Drawing.Color.Black.ToArgb(); radarB[0].SetNormal(new Vector3(0.0f, 0.0f, -1.0f)); radarB[1].SetPosition(new Vector3(0.40f, 0.25f, 0.01f)); radarB[1].Color = System.Drawing.Color.Black.ToArgb(); radarB[1].SetNormal(new Vector3(0.0f, 0.0f, -1.0f)); device.DrawUserPrimitives(PrimitiveType.LineStrip, 1, radarB);
-
I have a game where ships fly around, input and everything working... Now I need to figure out how to draw the user interface. Is there a way to draw it without manually finding where the vertices need to be so that they're right in front of the camera? I'm going to include things such as radar, other ships, messages, etc. I've attached an example of what I'm trying to do. I've taken this from Freelancer screen shots. I'm talking about things like the health bars in the center, #weapons left, options at the top right, etc. One idea would be somehow switching to ortho view, and then drawing the gui, but I'm not sure if it's possible to draw the main game in perspective view, switch to ortho, give it some new vertices, and then have it draw both. Any ideas? Thanks. -Nick
-
I work on several group projects, and am looking for a good source control/concurrent versioning system. Unfortunately, SourceSafe is too expensive, and I have given up on figuring out how to use CVS. Are there any others out there? I'm specifically looking for something that integrates well with VS.NET. Thanks. -Nick
-
How do I know if I'm using it or not? And how do I not use it?
-
I'm attempting to deploy my software on a friend's computer. I change the output on Visual Studio to Release mode, and I installed DX9.0 and the .NET Framework on his computer. It didn't run until I installed the DX9.0 SDK on his computer. What do I have to do to remove the dependency on the SDK? Thanks. -Nick
-
I have it on debug, but it didn't give me any warnings. Maybe I don't have the thing set up specifically. How do I do that?
-
I finally got it to work. Turns out the zNear was set to 0, and z-buffering only works if zNear is a positive value.
-
Managed DirectX 9 Kick Start : Graphics and Game Programming
nikhilhs replied to ThePentiumGuy's topic in DirectX
I love the book. It helps to know a bit about 3d computer graphics theory and the math behind it. Within a few weeks of it, I'm writing my own engine. The book gives you the DX9 code. And their source code is very well documented and explained. And it works without downloading any updates. I loved it so much, that I've ordered the C++ version in the series. -
I've used the following lines of code, and passed presentParams into the device constructor. presentParams.Windowed = true; presentParams.SwapEffect = SwapEffect.Discard; presentParams.EnableAutoDepthStencil = true; presentParams.AutoDepthStencilFormat = DepthFormat.D16; However, this does not put the closest stuff in front. I think it's placing the ones that are rendered last in front. What am I doing wrong? Thanks. -Nick
-
I'm trying to pick a scripting language for the game. The game is written in C# and MDX. The scripting language needs to be very easy to implement, and can call functions within the class that calls it. Any recommendations? Perl isn't an option, since all programmers on the team dislike it. Thanks. -Nick
-
Creating Installers that Check if certain things are installed
nikhilhs posted a topic in Deployment
I apologize for double posting this in the MDX forums. I didn't realize there's a deployment forum. I want to create an installer that first checks for the .NET Framework 1.1, and if it's not there, installs it. It then does the same for DirectX 9.0. And then it installs my program. Is this possible with the Visual Studio.NET installer creator? Or will I have to use something else? If it's possible, would someone please link me? Thanks. -Nick -
I got it to work. Turns out it's Rz. I guess z is pulling the stick in and out? weird...
-
I've been able to read the x and y position of the joystick. But I can't find any info on reading the "twist" of the joystick. Anyone know how to do that? Thanks. -Nick
-
My past experience has been with OpenGL, so I'm used to be able to specify a normal, texture, and color for every vertex. I'm now using MDX's CustomVertex, and I've found several different combinations. I've found textured+normal, normal+color, etc. But none of them allow all 3. If I want to have lighting, I need normals. But then I can't do both colors and textures, which forces me to create textures of several different colors, instead of allowing me to use the color of a vertex to blend and affect the color of the texture. Is there a way around this? Thanks. -Nick
-
C# means I don't have to touch WIN32, and that makes me happy! C# has no pointers, and that also makes me happy. I just prefer managed code. I find it cleaner and easier to debug.