Answer Questions
AlucardHellSing Shooting help
Can anyone post a website, code, or a project they have on making something shoot. I have tried, and it doesn't draw the bullet right, and some other ppl's code meses up But surely that line of code is only ever going to be called once regardless of where it is, so it doesn’t really make much difference where it is called from Seeing as there is only one image to be loaded there are actually less lines of code overall as well Most of the other examples I have looked at do all their GraphicsContent loading in the Game1 file as well. Whilst I do like to keep things contained or 'encapsulated' as much as I can, for loading graphics it seems like more trouble than it's worth. Sorry if ...Show All
Zuchman Drawing 2d Graphics
I'm just begining programming with Visual Basic Express Edition. I have no idea how to draw graphics. Can you give me any code Well, DirectX isn't very VB friendly. Although you _can_ write samples in VB, you'll find yourself in a very lonely place, since we only supply samples in C# (for managed code, with one lonely VB.NET exception that's not aimed at beginners). My recommendation is that you download Visual C# Express and then take a look at the tutorials in the DirectX SDK. In particular, you will want to look at the Simple2D sample in the SDK. If you absolutely, postively insist on using VB.NET, you can look here: http://www.thezbuffer.com/articles/187.aspx ...Show All
SDavis7813 Where is the download?
It is 12:48 pm here (GMT + 1)... in Nuku'alofa (GMT + 13) it is tomorrow... So where the hell is my download link :-D :'( Its like 1am in the states so i guess we are waiting for them :(. This is like xmas and Bill Gates is our dad, wake up Billy so I can open my XNA! Then move there and check the Internet. EvilOneSD wrote: Hmmm... the holy grail is here on my desk. Btw... it's "tomorrow" now... What, you have one too :p It's been "tomorrow" here all day... heck, it's almost the day after here! It's just about 12:30 AM, my guess is you'll still have to wait several more hours, probably at least 8 and a half since ...Show All
Kal100 Can't compile 3D code example
I'm having trouble compiling the tuturial code sample for GSE beta 2. The first 3d tutorial code as cut and pasted from microsoft (as modifed by me to reference my namespace) looks like what you see below. When I compile I get that a valid vertex or pixel shader needs to go on the device before it can be drawn, which make sense, except that the tutorial doesn't say how to do this. Can anyone help #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; #endregion namespace WindowsGame2 { /// <summar ...Show All
digitalmercenary DirectX 9c error: A cabinet file cannot be trusted
I am currently running windows 2000 and I am trying to install DirectX 9c. When I run the install it am given the following error: "A cabinet file necessary for installation cannot be trusted." I have tried everything to fix this and I am still having issues. I have admin rights and I have DirectX 8 installed right now. Any ideas ...Show All
clint 2 Is there an easy way to generate a random color?
I was trying to generate a random color to be passed into the Sprite Batch Draw function to put a tint on the sprite being drawn. mSpriteBatch.Draw(mBackground, new Rectangle (0, 0, 1024, 768), mRandomColor); However, there doesn't appear to be any way to create a new color from RGB values for the XNA frameworks Color object. I had thought that I would be able to do something similar to how you would create a new color when using the System.Drawing dll. Color mRandomColor= Color.FromArgb ( ( random.Next ( 0 , 255 ) ) , ( random.Next ( 0 , 255 ) ) , ( random.Next ( 0 , 255 ) ) ) ; Is there an easy way that I'm just overlooking to achieve that same effect Have you thought about putting System.Threading.Thre ...Show All
jomunoz Access violation using ID3DXFont::DrawText, trying to read 0x00000000
Basically I have a class for the Title Screen of a game, to this class I pass a LPD3DXFONT in the constructor and the class saves a copy of it. Then I initialize rectangles and D3DXFONT_DESCs for my menu like this: ZeroMemory(&FontDesc_title, sizeof(D3DXFONT_DESC)); FontDesc_title.Height = 64; FontDesc_title.Italic = false; FontDesc_title.CharSet = DEFAULT_CHARSET; FontDesc_title.OutputPrecision = OUT_DEFAULT_PRECIS; FontDesc_title.Quality = NONANTIALIASED_QUALITY; FontDesc_title.PitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; FontPosition_title.top = 0; FontPosition_title.left = 0; FontPosition_title.right = SCREEN_WIDTH; FontPosition_title.bottom = SCREEN_HEIGHT / 2; ZeroMemory(&FontDesc_menu, sizeof(D3DX ...Show All
zz2 How to set a texture on a model from a composite texture sheet?
Hi. Still working on my 3D playing cards class. I know how to set the textures of the front and back of the card independently now, but I don't know how I can use a single texture sheet (comprising of 52 fronts of cards and a few back face images) in this process. The BasicEffect takes a Texture2D format for the texture, and of course setting it to a single texture image is fine. But how to set the texture property to a rectangular portion of a larger texture image Since you'll have 52 cards, you'll want to lay the subtextures out in a grid in a larger texture. The grid will be 8x8. To simplify your runtime logic, you can precalculate all the rectangles (4 vertices) for each subtexture with the followin ...Show All
kinny_k XNA - Microsoft lack of vision
Its real sad that Microsoft, once again, shows this lack of vision for a games development tool: 1: Get visual: Don't force users to write such a lot of code to do just very little. It reminds the Charles Petzold's "Hello Window" hell of code days. 2: Provide visual tools: Let users choose the components, change their properties and write just the required code for the events. 3: Quick development means quick prototype and minimum learning curve. XNA has a lot of things to learn. Definetively it is NOT for students and hobbists. We will have to wait until someone encapsulates XNA framework into a group of visual components, that can be easily drag & dropped, inspected and tested very easily without having to learn lots of n ...Show All
JamesE 3D Audio
Has anyone had any luck with the implementing 3D audio dsp calculations using the emitter and listener Previous posts indicator there were problems back in October, but I don't know about now. Also on audio, are the friendly names for the SetVariable on the cue class documented anywhere Justin I was planning to create an audio-only game for my first project... but 3D audio was officially cut from XNAv1: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=884617&SiteID=1 ...Show All
S.Wind Content pipeline and reloading
I understand the content pipeline is designed to not wastefully reload content should you request the exact same file again, however, having implemented a few content loaders myself, my impression was that this was handled using the existingInstance parameter to the Read function. Giving you the choice to reuse or reload. I've made a file that I actually would like to reload, yet if I set a breakpoint inside the Read function it never gets called a second time... even with an "existingInstance" parameter. Is this as designed or am I just missing something Trev. I.e. Two Content.Load<MyType>("file"); calls will not invoke this twice.... class MyLoader : ContentTypeReader<MyType> { p ...Show All
NeoBugs New Farseer Physics Engine Release
This version contains quite a few updates... including collision events which many have been asking for. You can read about it here . You can download it here . This is a free 2D Physics Engine for XNA. Have fun! First, Let me say HI. Then thanks and lastly this is cool!!!!! I am learning and trying to work my way through not only codeing but game design as a hobbiest. I am just wondering how to use your work. I am trying to create a pong game ( Hockey themed) I am Canadian.LOL.. so far i have a bouncing orbe ( Ball ) bouncing of my edges of the playing surface. Thanks again and your work is awesome!!!! I love this thing!!! Cool new demo with the truck, I just wasted like 10 minutes playing with it ...Show All
Vladimir Chtepa The Unofficial "Hooray I'm Done With my DBP Game" Thread
When you get done with you game and sumbit it, crow about it here. A little over 24 hours left until the deadline and I'm so amazed I'm done, so much better than college Thanks to ZMan for his help, good luck all. I'll post the source code for my submission once the deadline hits. Bill I'm done. I haven't slept this night at all (it's 6 A.M. here ), and I have classes first thing in the morning, but I'm extremely pleased of what I achieved. Just a sneak preview: my game in called Quantum Wars and is all about time/space manipulation in order to win the battle against the other player. I thank all the comunity for: code snipets, support, examples, counter-examples and everything else. I'll post some mor ...Show All
Z.Y.S. sprites 1 file vs multiple files
Hello, I'm pretty new to the entire game making business. At the moment I'm making a 2d side scrolling game. When looking at other people's work i notice they put all their sprites in the same file and then they cut out the parts they need for their animation. I'm wondering what the advantage is for using this technique instead of using separate files. i am making a 2d online rpg and had to decide which one to use, i came up with these reason for using them. SpritMap allows for easer viewing, and you never need to worry about drawing the wrong image, it also makes you have less images, and possibly make your image files smaller. The single image files mean that you have to do no calculation for the files ...Show All
FS2K Form above game window.
The main idea is the following: There is a game, which is working in full-screen mode, of course. It’s necessary for me to make some toolbar, which could work above the game window. For example, make the calculator, which will appear after clicking a button on the toolbar, but the game window is not minimizing, and the working of this application continues above it. I tried to use the topmost form, but I can't draw it. In the case of using timer - BringToFront - it’s blinking, and when I click on it the game window is minimizing. Can anybody tell me what must I use to I saw the same working applications already, but I have no idea how to make it. Thanks beforehand. Sorry for my English. If the game is using D ...Show All
