Answer Questions
MingMa GameComponent designer
Would it be possible to add support for a GameComponentCollection in the designer for GameComponent Perhaps it would make sense to do this by creating a new class analogous to UserControl in windows forms, or even creating an IGameComponent so that a collection isn't required. It would be pretty easy to implement myself, but I think it would be best done as part of the framework. I think it would be handy for things like a state machines, so you could aggregate components in a state component and still have access to the designer. Please file the suggestion via Connect. Are you asking for the GameComponent to have a GameComponents collection and for the GameComponent designer to behave similar to the ...Show All
Victor Egbe Rendering hundreds of models
How do games like Medieval: Total War 2 render hundreds of skinned models running different animations on the screen and still run at a good frame rate Is it possible that the models are not skinned I can't get more than 100 skinned models (matrix palette size = 50, verts = 5000) to run without getting a noticeable frame rate hit. This has to do with the fact that I am using shader instancing and doing 100 draw methods. I confirmed this by taking out all the animation and update code and only calling draw 100 times every frame. It's possible that my shader is inefficient (the DirectX examples split the shaders up based on influences per vertex), but I don't think it would be that huge of a difference. My skinning function is very similar ...Show All
JohanNL simple projectile motion physics??
im pretty new to gamedev, so simulating physics is new to me too. i know the projectile motion formulas, im just having trouble applying them. is there any "tutorial" on projectile motion physics for XNA basically, someone suggested to do "scorched earth". im trying to get the hang of just some simple projectile before i apply it to a game. i know i should basically have to just enter the initial velocity vector and the angle. then have it passed to a function that gets the initial x velocity, and initial y velocity. also, im assuming that whatever i get for y-velocity should be negative as "up" is negative in the XNA graphics. then, after each update, it should find the current change in position for x and ...Show All
Dudley Determining Direction of Billboard Movement
Now that I have billboards that are actually billboarded, I also have them moving around and animating. My next step is to create the logic that switches animations based on the direction of movement of the billboard. My logic works, except I can't figure out how to determine if the billboard is moving left. My process gives me an angle in the range of [0, 180] which doesn't help me find the direction of left. Any ideas Here's my current logic. (I do eliminate the Y component and use Vector2s because all my billboards are constrained on the Y axis). Matrix facing = GetBillboardedWorldMatrix(); Vector2 forward = new Vector2(facing.Forward.X, facing.Forward.Z); Vector2 vel = new Vector2(Entity.Velocity.X, Entity.Velocity.Z ...Show All
tapir Health Bars
Hey, I have looked at the spacewar game template, and I noticed their hp bars are just 5 blocks. How can I make a bar like the shield bar in halo 2 A sliding bar Ah, yup... that would be 2 :) The version I was envisioning was a little more complex visually. This one doesn't have a 'bottom' or 'top'. It's just 2 separate bars. It's been a while since I played Halo. You have the concept with your 'batch.Draw(shieldbar, ...)' though :) Jason Thanks, but what if I want to make an HP/SP bar together, like this: Also, why do you have 3 layers wouldn't you only need 2 When I was making 2D games a couple years ago, I just did the underlaying sprite (an empty bar), then over it, I ...Show All
Neophyte how do you load and control multiple sprites
I just started xna yesterday, and I learned how to load and control ONE sprite just fine... but I need to be able to load multiple sprites, and control them. Can someone help me with this pl ease. observe the wonderess 1 sprite world! @ www.sticksnap.com/The One Sprite Game! Install.exe ps. I am a software programmer, so don't treate me like a complete idiot. I am just new to game programming. Because the people answering might make assumptions that aren't valid, which might influence their answer, explaining things that don't need explaining. This is a realy nooby queston, but what is a Rectangle Why do so many programmers feel the need to qualify their experience whe ...Show All
dtlinker rotated text
Hi all, I'm trying to rotate a text by certain degrees. I tried doing it by using 'Mesh.TextFromFont' method. Before calling 'Mesh.DrawSubset' method i changed the world matrix. The problem I'm having is that I have to scale the mesh to the size I want it to be, but when I do that the text looks really bad, really really bad (depands on the amount of scaling, ofcourse). How can i solve this problem I didn't found a way to set the size of the mesh. I tried doing it using 'Font.DrawText' method, but I couldn't rotate it Is it possible Please, don't send me to the SDK example I've already viewed it and did not manage to solve the problem. Thanks. You could use Font.DrawText to render to ...Show All
Kimbe Looking for a way to download road.x for the book Managed DirectX 9 Kick Start: Graphics and Game Programming
I don't have the CD that comes with the book and I am trying to complete the Dodger game but I need the road.x file to make the game work. Does anyone know a place that I can download the road.x file thanks Nathan You should send a note to the author, Tom Miller. Visit his blog , then click on the "Email" link on the left. ...Show All
Andrew Shearer Loading a Texture2D in a specific format
I'm trying to load a Texture2D from an 8bit indexed PNG and have the resulting texture still in 8 bit indexed format. However, even when I do: TextureCreationParameters cp = TextureCreationParameters.Default; cp.Format = SurfaceFormat.Palette8; cp.Depth = 8; Texture2D p = Texture2D.FromFile(graphics.GraphicsDevice, "my_file.png", cp); The resulting texutre still seems to have Format = Color. Basicly I want some way to get at the index values. Do I have to write my own png loader If so, how would including libpng and zlib and writing a p/invoke wrapper for them effect xbox 360 compatability Ok. That kind of sucks. And it's somewhat fusterating to have to reimpliment what xna c ...Show All
Terry Fox Project Size Standards?
If in the future, there is a network in place where XNA homebrew developers can share their projects through Xbox360, would there be project size standards What project size in terms of MB would be reasonable Thanks. The latest video (The one with Frank Savage) mentions XNA Racer being > 100MB. I would imagine we're only limited by our distribution means. If I would like to distribute my game via the Creators Club I may be limited, but if I use my own site I'd bet I could use all 20GB on my Xbox360 harddrive - Although I might have to mail people DVDs for my game.... In reality I imagine developers like us would be happy with anything < 500MB. You can't find a decent demo on Arcade under 700-900MB anyways... :) ...Show All
Dan Miser can't build my application becoz of game.run error
i started with the example that is included in the help of xna beta2 .. and the the code is here : #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 WindowsGame1 { /// <summary> /// This is the main type for your game /// </summary> public class Game1 : Microsoft.Xna.Framework. Game { GraphicsDeviceManager graphics; ContentManager content; pub ...Show All
mnavkum $(ConfigurationName)
Hello; is it possible to use the $(ConfigurationName) variable XNA Build CTP, just like we can use global variables Another solution would be to define different variables per configuration. Any suggestion would be appreciated, thanks! Hello; I've tried using the $(Configuration) variable in my XNA Build tasks settings for specifying an output directory, just like I would use a global variable @(ProjectPath). Do XNA tasks use their own variables I've seen in the MC2 sample that it was possible to use an environment variable @(MC2ROOT); why isn't possible to use a MSBuild variable such as @(Configuration) Am I doing something wrong or is it just not supported yet I also tried messing direc ...Show All
IntMain My XNA Game 'iFACTOR'
Believe it or not, this time it's not a question :) I appreciate all the help I've been getting on this forum and I'd like to share some media of my first game. The media was taken from a Windows build but the game is designed for Xbox360. http://www.vector2games.com/ Thanks, Dave Hey Dave, nice game! I've uploaded your video to YouTube and wrote a short review . Cheers, -- Tony I looked at the video but couldn't figure it out. I guess if I played the game it might be different. I used FRAPS and mixed it using Windows Movie Maker . To capture the video, I compiled a Windows version of the game (I have an Xbox360 controller that works in Windows) I didn't make a Windows version because I didn't know how. It's be ...Show All
rolandpish Moving raw data through the content pipeline...
I'm probably just not looking hard enough, but... How do I get raw data through the content pipe and onto the 360 in a format I can just do a File.Open on All of the data processing I need is already being done offline so I don't need the content pipeline to do anything other than copying the file across - yet, because it's not a registered content pipeline format, it just sits there and gets ignored when I add it to my project... Help If you have binary files that are already in the exact right format, you can just add these to your C# Express project and set "copy to output" to true in the properties for those files. If you have some other tool that is building the game-ready outputs from a d ...Show All
mohdtmn Interfaces
Could anyone point me in the right direction regarding programming c# with interfaces. I've googled up the subject and whilst there are some good tutorials on how to do it, non of them really explain in simple terms why we should or shouldn't. I just can't seem to get my head around how they work properly. Thank you Parlance, I didn't notice your second post before replying to Robins. That description hits it on the head for me . I think I almost have it. I'm going to work on a few examples to see them in action now I understand why. Thank you both. That helped very much Robin, thank you. So could you basically have multiple Interfaces and theortically change a classes behaviour or rather add to a classes behaviour&nb ...Show All
