Software Development Network Logo
  • Visual C#
  • Game Technologies
  • SQL Server
  • Windows Vista
  • Smart Devicet
  • Visual FoxPro
  • VS Team System
  • Visual Basic
  • SharePoint Products
  • IE Development
  • Audio and Video
  • Windows Forms
  • Visual Studio
  • .NET Development
  • Visual C++

Software Development Network >> Game Technologies

Game Technologies

New Question

Microsoft's future policy for redistributing Xbox 360 games?
Are they bugs?
shader inputs question
XML TOOL KIT HELP
Rendering hundreds of models
DirectX Capabilities
Making a 3D model move in three dimensions
problem getting font to work with XNAExtras
Need Help with Opening Scene
loading large image using DirectX

Top Answerers

Yodatg
Mitch Wardrop
zdrae
Tarana
seu
Vijay Chegu
Trashey
JVV
Neil_D_Jones
PolkaDance
sitemap
Only Title

Answer Questions

  • piknik Beginner shader question - I'm missing something obvious

    Hello, all: I'm working on a simple space sim, and I'm trying to render a weapon shot using an HLSL shader. I haven't used a shader before, so I've read through a bunch of code samples, and picked up a couple of books, so I *think* I (kind of) understand what's going on with vertex and pixel shaders. The problem I'm having is that when I enable the vertex shader the mesh I'm rendering is drawn in black. If I disable the vertex shader (comment it out), the pixel shader outputs the color I expect. I've tried it with a mesh I created and with a mesh created via Mesh.Sphere with the same result. Here's the shader code (it's almost an exact copy of the simple pixel shader code from MDXInfo). As you can see, it's totally simple: uni ...Show All

  • Kelly R. Martin Vector to rotation, ie - point models 'forward' to their direction.

    Imagine you have a model of say a plane, with a position (x,y,z) and a vector for it's movement. On each update you're adding the movement vector to the position - ok easy enough. You want to have the plane model always be rendered to move with it's nose forward. is there a simple way to translate the movement vector into corrolating rotation x,y,z. My high-school cartisian trig is a bit sketchy, but as I recall on a 2d plane from a normalized vector it would be like rotation.x = csc(y/x) (i probably have the trig identity wrong,but you get the geist of it). Want to translate normalized vectors v(1,0.5,0) into a rotation so models are facing the correct way for their movement. - anything built into xna for this http://for ...Show All

  • C3i Model Position Problem

    I have this code that creates a model at the position of the mouse click but the model never shows up at that position. Maybe someone out there knows why the models seem to be offset. If I click in the top left corner of the screen, the model shows up in the center of the window. Here is the code: #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using System.Collections; #endregion namespace Commander { /// <summary> /// This is the main type for your game /// </summary> ...Show All

  • meddy Is Function Overriding The Only Way?

    When going throught the XNA tutorials, I noticed that functions for drawing and updating are overriden. Is there an event alternative to that Create an event function rather than override XNA's There are some events on Game related to activation but Update and Draw are overrides. We chose this route due to confusion in the early (internal) versions of the framework when both overrides and events existed. People had trouble figuring out when to use an event or override. In the end, because of the confusion of "two ways" to do things, the slight performance advantage of the virtuals, and the fact that you will usually need to override both anyway, we chose virtuals. Feel free to file a bug ...Show All

  • Joshizzle ColorKey in Texture2D?

    Is this any way to do a tranparent color key Thanks, thats worked. I don't know who set the answer as marked. i know you can do it that way, but i wanted to know if i could make lets say Magenta as the ColorKey, and it would set every pixel in the image that is magenta to transparent. Try using: TextureCreationParameters tcp = new TextureCreationParameters(pxWidth, pxHeight, 0, 0, SurfaceFormat.Unknown, ResourceUsage.None, ResourcePool.Default, Color.Magenta, FilterOptions.None, FilterOptions.None); tex = Texture2D.FromFile(device, strFileName, tcp); I've been using png files. They work well directly with xna and support 8bit transparency. Unless you're going to a retro arcade feel then you'll p ...Show All

  • BuddyBoy2006 Heightmap Collision testing

    This question has been mocking me all day. I know it's doable, I have even used such a function somewhere long ago, and I have even found quotes of people saying "the calculation is easy and quick," however, I cannot find an example of heightmap collision testing. In other words, I want to be able to type MyLandscape.GetHeight(x,z) and it'll return the height (y) at that point. Now, this is not a simple, find the vertex at (x,z), and return the array value. There is distance between each vertex so, (x,z) wouldn't always be a vertex location. If I recall my calculus from ages ago, I think I remember there being a way to do this, but I don't remember. Answers or links would be deeply appreciated. ...Show All

  • JIM.H. Render target save'n'restore

    I've a func that do some work including rendering into rt. So, i need to save old rt at the beginning of my rendering, and then restore it at the end ( when smb call my func, he may have rendering to texture enabled, or just rendering to the backbuffer, and he don't wont to worry about restoring his rt after call of my func ). Is there any way to implement such a behaviour using XNA i've got a little confused. i search in the document, and i find: "The GraphicsDevice can support multiple render targets. The number of render targets supported by a GraphicsDevice is contained in NumberSimultaneousRenderTargets." in the remarks of SetRenderTarget(). so is this mean i can only use mrt on pc ...Show All

  • Muhammad Azeem Azam Has anyone gotten the CLR Profiler to work with an XNA program?

    I haven't been able to get it to work yet, the CLR Profiler just says it's waiting for the CLR to start, and then crashes. The CLR (Memory) Profiler is here: http://www.microsoft.com/downloads/details.aspx familyid=86ce6052-d7f4-4aeb-9b7a-94635beebdda&displaylang=en I had the new one downloaded, but an old version was in my path, and was executing first instead. The new version seems to work fine. I think you want this one: http://www.microsoft.com/downloads/details.aspx familyid=A362781C-3870-43BE-8926-862B40AA0CD0&displaylang=en ...Show All

  • js111 problem with "your first game: Microsoft XNA game studio express in 2d" tutorial

    Hey, i just started using the xna game studio express beta 2 today and i decided to try out the tutorial. I thought i did everything correctly but when i debug it, it gives me an error for the line " spritebatch = new SpriteBatch (graphics.GraphicsDevice);" it says "InvalidOperationException was unhandled" and im not really sure what to do. any help with fixing this would be greatly appreciated, thanks. I'm having the same problem, and I'm running it on an inspiron 2650, think it has a 'special' geforce 2 card. I'm going to try updating it's driver... Some of them are. I know my Alienware laptop can be upgraded. There is a simple way to check the capabilities ...Show All

  • dav3333333 Using XMA2InMemoryEncoder API

    The XDK docs state you can write your own encoding application by using the XMA2InMemoryEncoder API. And I quote: XMAEncoder.lib is a statically linked library that is available as an alternative to the XMAEncode command-line utility. This library enables you to perform XMA encoding on the development computer as part of your build process, by exposing the XMAInMemoryEncoder function. Great! What I cannot find anywhere is the file format for actually writing and XMA file to disk. In the previous build of the XDK there was a source code example in ...\Source\Tools\Audio\XMAEncoder that contained an incomplete version of the XMAENCODE.EXE included with the XDK. I just downloaded and installed the latest XDK expecting to find a mor ...Show All

  • niallhannon How To Draw Torus(Mesh)?

    i couldnt draw a torus.can u please help me im using C# 2.0 and DirectX 101 thanks a lot, i have used Mesh.Torus but,the camera is showing in the mid of Torus.How can i show a Torus with 3rd person view i think my problem is all about the location of camera. thanks again Take Care You could use a modelling package such as blender (www.blender.org) to make a torus and then directx natively supports a .x format, you could load the .x file and render that. I hope this helps. Take care. thank u so much,i will try DirectX 101 Have you looked through the DirectX SDK samples To move camera some backward, use device.Transform.View = Matrix.LookAtLH(New Vector3(0.0F, 2.5F, 8.0F), New Vec ...Show All

  • DonMartin Boing v.0.5

    My first "real" game. Just a pong game but I used a different way than just having on or two files. I'll show the source after I clean up the code and summarize it for others to follow. I'll keep adding onto the game to learn other things. Rate/Comment. Boing Version 0.5 looks really nice, i'd love to see the source code for this. only things i noticed was that the ball leaves the playing field slightly before bouncing back in, and it gets too fast too quickly (that may just be me). overall its a nice pong game and it looks really good. Funny thing is...I already have that code (like almost exactly). I made it go fast quickly because I wanted a quick play game. ...Show All

  • RonanK Model Position Problem

    I have this code that creates a model at the position of the mouse click but the model never shows up at that position. Maybe someone out there knows why the models seem to be offset. If I click in the top left corner of the screen, the model shows up in the center of the window. Here is the code: #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using System.Collections; #endregion namespace Commander { /// <summary> /// This is the main type for your game /// </summary> ...Show All

  • Zooma Components ?

    My question is quite simple : What should we do with "Components". Until now, there is just the GraphicsComponent class. As mainly they will be called at : Initialisation, Update of frame and draw of frame, should we use them as scene object holder Let's take an exemple : I want to create a TextManager class, that mainly will keep a collection of texts with properties that needs to be render every frame. Should I go with a static class, or use the "Component" model for it Tx you !!! The GameComponents list is just a standard System.Collection class, from what I can see the list cannot be reordered as such but items can be inserted at specific points. The DrawComponen ...Show All

  • Hamed JI Undefined errorcode from D3DXGetImageInfoFromFile

    At the moment i'm programming a 2d graphical engine with directX9, but when i try to run the function D3DXGetImageInfoFromFile((LPCWSTR) filename, &imginfo); it gives back an undefined error code, i'm using the directx october 2005 sdk with the latest version of the directx runtimes. Full engine GraphEngine.h: #pragma once class GraphEngine; #include <D3d9.h> #include <Windows.h> #include "GraphResource.h" class GraphEngine { public : IDirect3D9 *D3D; IDirect3DDevice9 *D3DDevice; IDirect3DSurface9 *D3DScreen; GraphEngine(HWND hWnd); ~GraphEngine( void ); void drawImage(GraphResource *img, int X, int Y); void RefreshScreen(); }; GraphEngine.cpp: ...Show All

555657585960616263646566676869707172

©2008 Software Development Network

powered by phorum