Answer Questions
Thumper1 Scaling Sprites?(XNA)
Hi, I was wondering how I could scale textures, as the textures are too big than what I need for certain parts of the game, I think its in the SpriteBatch.draw method, but its hard to manuever through all of their intellisense arguments.... For XNA Would anyone be able to explain how I should be using the SpriteBatch.Draw overload functions to properly scale textures I'm a little confused about how to pass the parameters using the overloads and I think it may have to do with the way I've implemented my sprites. For the code below I am applying a texture that measures 100pix by 100pix to an object that ...Show All
Henrik Dahl Generate random numbers for every class instance
I'm trying out some AI techniques but I'm having a problem generating a TRULY random number. I create 20 instances of an ant class that should move and change directions on a random basis. They are doing that, but all in unison instead of each changing directions at different times. Its like synchronized ants. Anyone know how to create a truly random number each time the ants use this method Random r = new Random (); if (r.Next(100) < 5) ant.Speed = new Microsoft.Xna.Framework. Vector3 (-ant.Speed.X, ant.Speed.Y, ant.Speed.Z); if (r.Next(500) < 2) ant.Speed = new Microsoft.Xna.Framework. Vector3 (ant.Speed.X, -ant.Speed.Y, ant.Speed.Z); Thanks kindly, George. I don't wa ...Show All
ap231 joran's video tutorials dont work plz help
ok so the videos start out ok but as they progress the speech and video don't match up which makes it very difficult! plz help and tell me how to fix because i heard these are the best video tutorials out there. (dont tell me to find diff. tutorials ive done learnxna.com and i hate the text tutorials cause they make no sense.) (in case you dont kno wat tutorials im talking about there found here www.xnatutorial.com thx) Maybe you should contact the site you posted instead of Microsoft. o sry i looked on joran's site and didnt seem to find a way to contct joran does anyone know how i tried to e-mail him but it said that the e-mail addre ...Show All
DJ Pandamonium ODE.NET2
Hello, - I've updated ODE.NET2 to work with XNA math. - Bumped it up to the 0.7 version of ODE (ode.org). However, not all functionality has been "wrapped" yet. - No samples yet. I only tested a few primitive collisions but it seems fine so far. Can't test mesh's yet. - I'm also working on ODE Components for XNA. :P For those wondering, ODE is a physics engine. http://www.pepperboy.net/ vidalsasoon wrote: As for the pure managed ODE... I think it would be easier to create a new physics engine from scratch using newer tools. I don't think you have to look at the ODE source code for long to second that ... Trouble is that this is the hardest subsystem to code by a long shot, and revers ...Show All
pravej File Not Found, even though it exists!
Hi I'm making an MMORPG in DirectX7 (NOT DirectX9, simply because DirectX7 is easier). I have made a 261-frame rendered intro sequence, and I have placed all these images into a DLL, which works fine and has absolutely no problems whatsoever. The problem is, when I extract the images to disk, then try and read them again in a surface loader, DirectDraw returns a File Not Found exception, even though the previous line of code tested the file's existence and found that it really did exist! Here's the code: Sub LoadIntro() Dim k Dim ddsd As DDSURFACEDESC2 ddsd.lFlags = CONST_DDSURFACEDESCFLAGS.DDSD_CAPS Or CONST_DDSURFACEDESCFLAGS.DDSD_HEIGHT Or CONST_DDSURFACEDESCFLAGS.DDSD_WIDTH ddsd.ddsCaps.lCaps = C ...Show All
Webbert InvalidCallException in 3D primitives code attempt
Hello, Lacking full examples in the docs, I threw together some of the sample code in the How to: Draw 3D Primitives section, probably incorrectly, and am getting an InvalidCallException on the following line: graphics.GraphicsDevice.DrawUserPrimitives<VertexPositionColor>(PrimitiveType.TriangleList, 12, nonIndexedCube); The details of the exception are not helpful. They say "External component has thrown an exception." My code is below, hopefully this forum formats it ok, without smiley faces etc. Any suggestions appreciated. By the way, I am using an ATI Radeon Mobility X600 and had no problems compiling and running the Spacewar demo. - Matteus using System; using System.Collections.Generic; using Microsoft.Xna.Framework ...Show All
&#40643;&#27859;&#37327; Jeremy Wong 2D Arcade Space Shooter, Bullet firing
I'm fairly new to C#, OOP, XNA, you name it. I am however trying to take some initiative and go ahead and make an actual game (I made a Tic-Tac-Toe game before to try out XNA). So far my ideas for this game are to have a : Player Class: Moves the player's ship, creates bullets and tells them where to go. Enemy Class: Controls the Enemy's AI and handles collision with bullets. EnemyManager Class: Controls spawning enemies, checking their state and then updating them. (I need help with this, I originally wanted to hold an array of about 20 enemies, so I can keep recycling the objects but I'm finding this difficult if anyone has any advice on this or references for me to look at.) Bullet Class : Moves bullets, controls collision with enemies ...Show All
Daniel Tomasini Using windows forms components with XNA?
Is it possible to use windows forms components with XNA For instance... what if I wanted to add a menu bar to my game I realize that most games have their own interface, but it would still be very useful to have (especially for setting up quick temporary interfaces). Any ideas Given the GDI is being replaced by XAML components and the later also sits on top of DirectX it would be reasonable to expect that XNA could let us use -in the middle run- the XAML's way to program the visual layer. And with that to use XNA to program GUI like level editors and such. Ultrahead wrote: Anyway, will it be possible to integrate XAML-based components with XNA in the near future I'm not an expert ...Show All
migs "The project type not supported by this installation"
Any clues as to the cause of this error whenever I open templates Alex, Answering "Yes" to that error dialog will prevent C# Express from ever trying to load our package again. It actually sounds as though you never successfully loaded an XNA project, even with Beta 1 -- you were just creating projects that used the XNA Framework. If you do that with Beta 2, you will not be able to use certain features, like the Content Pipeline. There are some more steps that I would like you to follow now to help diagnose the problem. From a command prompt, start VCSExpress with the following command: vcsexpress.exe /resetskippkgs /log Next, try to create a new Windows Game Project. When you ...Show All
Christian Sparre Small tutorial flaw
Its not a big deal, but it is extremely misleading as I have gotten a handful of emails on the subject. In your (Microsofts) tutorial on audio. In the first part on using Xact, you never assign any of the sounds in the soundbank to the music category. Then later in ( part 3 or 4 ), you call: m_AudioEngine.GetCategory("Music").SetVolume(m_MusicVolume); End result to the end user is the volume doesnt appear to work. I suppose it could be either changed to GetCategory("Default") or the XACT part could be updated to set the category. Just a quick FYI, and its not a bug so I didnt see much point in a bug report. I just know by the emails i've received a few people are getting hung up on this. ...Show All
DeamonX Can't deploy to Xbox 360 from GSE
All Apologies but this is a repeat post from 31-Jan buried inside another thread that appears to have died. I can't push code to my Xbox 360 from GSE. This issue has been reported by other people and their problems boil down to either having entered the 25-digit code incorrectly or, in one case, that their router didn't properly support UPnP. I've regenerated, accepted and reconfigured the key *many* times, making sure I don't have any 0's, 1's, 5's or 8's in the generated key to avoid confusion. I understand this is a one-time key so I'm not reusing an old key. I am most definitely getting the key right and choosing accept, not cancel. I have downloaded and installed Windows Media Connect (I'm running Windows ...Show All
IMBack Build for Xbox 360 and Windows in one project
I have created a Visual Studio project template that can be built for either Xbox 360 or Windows, by selecting the correct platform in the VS IDE. There's nothing particularly clever about this, it just uses some of the conditional abilities of MSBuild projects to merge the properties of an Xbox 360 XNA project with a Windows XNA project. There's a slight problem though - the VS Express C# IDE has, by default, disabled the build configuration and platform settings to present a simpler interface to beginners. In order to use this project template you need to re-enable these features and should probably have a reasonable understanding of what they do. This could be the reason that the XNA devs have mentioned that building for both platforms ...Show All
Simone1 What next?
I'm learning XNA and game development in general and just finished one of my first games. You can find it here http://files-upload.com/106116/DelicateBalls.zip.html What I'm looking to know, is what to do next to help learn more I'd like to work on something a bit more advanced introducing some new topics etc... The things pretty much demonstrated in that game are: Creating/rendering sprites, and managing them as arrays of classes Keyboard/mouse input Sound Pixel Perfect Collision Rendering text on screen Game states If you have any suggestions, I'd loved to hear them. I still refer people to this article over at gamedev.net http://www.gamedev.net/reference/design/features/makegames/page2.asp good stuff ...Show All
Cycling is too much fun Can you edit a Model's vertices at runtime?
Is it possible to edit the vertices contained in ModelMesh Like could I get the vertices, alter their position and set the data back in the collection I ask this because for the terrain object in my game, I want it to be deformable. I've been playing with the content pipeline and my custom importer / processor / writer writes the height data as a byte array. When the object is read back, an index buffer and vertex buffer are generated in the terrain class. The vertex buffer is specified with ResourceUsage.Dynamic which to my knowledge is the only way to make the buffer read / write enabled. I'm considering altering my custom content pipeline objects to create ModelContent objects instead of my current approach, but I will abandon that id ...Show All
bryanedds Multiple Textures to shader
hi.. im making a projekt, and want to send more than one texture to my vertex shader... im using the Textures[0] from the graphicsdevice.. and trying to use the first 10 spaces in this texturecollecion.. and have the first 10 TEXCOORD's defined in the shader. When this is running i only have access to the first texture [0] and all the others have the same texture.. should i somehow tell xna how many textures im putting into this collextion or what could be the problem... if i send textures to the shader as parameters, i have to make custom texture samplers, which means that i have to create 10 different samplers, and choose between them in the pixel shader... insted i would like to send them ...Show All
