Answer Questions
KitGreen Tom Miller's Render Loop
I am using vb.net 2003 an i am at a loss as to how to convert Tom Miller's render loop c# code sample into vb, could anyone help public void MainLoop() { // Hook the application's idle event System.Windows.Forms.Application.Idle += new EventHandler(OnApplicationIdle); System.Windows.Forms.Application.Run(myForm); } private void OnApplicationIdle(object sender, EventArgs e) { while (AppStillIdle) { // Render a frame during idle time (no messages are waiting) UpdateEnvironment ...Show All
TemporaryNick 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 Probably the same place you left the Holy Grail! :'( 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! Patience is a virtue 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 the workday starts for most people in the US around 9 AM. Even then I don't expect to see it until later in the afternoon Pacific time. EvilOneSD wrote: Hmmm... the holy grail is here ...Show All
GraemeP Collision Detection With Bezier Curves
Hi, I'm currently making a small 2D game in XNA Game Studio Express. It involves a player moving around a terrain and being able to collide with it. Nearly all the graphics and settings in my game are user generated so this allows for everything to be quite customisable. For collision detection the user specifies paths made of Bezier curves which are stored in a file. The game reads this file and stores a number of points on the curves in an array. The player is also made of Bezier curves that are converted into points: This shows how I want collision detection to happen; if any of the lines that make up the player intersect with any of the lines that make up the terrain, then a collision has occurred. Once a collision has occurred two t ...Show All
tarkster2 Line class CPU problem
Hi everyone, When I used Line class to draw lines with different thicknesses in 3D space, everything seems ok until I increase number of lines up to 1000 lines. My CPU is up to 100%. Any hints. Thanks. Well, it seems that it's linear (100-300 x 4 => ~1000 and 25% x 4 => 100%)... So depending on your target CPU specs, you'll have to start optimizing things if you want to lower CPU usage... I have been searching for that, but have had no luck. Do you have any sample code that I can study. Thanks. I do need line thickness and antialias features in my project. Actually I have both in my project. The one with line primitive does not look very good, but it doe ...Show All
Saibal Goswami Multi threading in a game (using XNA)
Hello. I am able to create thread and make them exchange information through common objects they know (server / each other reference) Now I would like 2 threads to update a server. Each of those threads takes for inputs a keyboard for one, a mouse for the other one. However, it seems that the thread that listens on the keyboard do not detect events from it. Seems like it is the parent thread that is able to listen to a keyboard event and only that parent thread. How would you do so that a children thread is master over a device even if it does not have the focus Regards, Chryso Maybe not the most helpful response but why dont you just ignore all the hassle of multi threading and not use it I mean multit ...Show All
Quirk 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
Mikael Håkansson Content - XNA + SpriteBatch in a windows form
Hey everyone, small problem here. I've managed to get XNA to run inside of a Panel in my windows form, but my problem is that I can't figure out how to load textures to sprites, since my form does not extend Game. And even when I make a game class, it still says that it can't find my image file, even though I am quite sure it is there. When I look at the debugging process further, I find that it is looking for a file called (imagename).xnb What is this file And why is it not being created like it should be Any help would be greatly appreciated. This is the line in trouble (pixel, obviously, is the name of my image): SpriteTexture = content.Load<Texture2D>("pixel"); Either way I think it would be ab ...Show All
paulking123 RTS unit movement and positioning including rotations
Hi guys, i am thinking about the way how to move and position and also rotate a unit on terrain in a RTS game. First of all my actual point where i am: I have a quadtree terrain engine that can give me back any interpolated height value by giving it the X and Y(will be the 3D Z coord) coords. So i can move a unit around and adjust the Y axis value of the unit so that it will not drown or fly over the terrain. Next i calculated the angle using pythagoream by using the X and Y(Z axis in 3D space again) movement (from a top down view) in which the unit is moving. So there is not at least any smooth rotation animation or so but some basic stuff. I think the next step is rotating the unit also along the X and Z axis in 3D space. Therefore a tho ...Show All
axg70 Can someone point me to a thread that will tell me how to add collision detection to my game?
I know tons of threads exist, but I looked through a few of them, and they didn't really help me to learn how to start a collision detection code. Thanks waruwaru wrote: Is your game 2D, or 3D What are you having trouble with Why didn't the threads help you Without more info, can only point you to the more generic answers. http://www.google.com/search hl=en&q=xna+collision+tutorial ok, my game thus far is set in 3d. I believe that bounding sphere would be the best collision detection for me, but i havent used it yet. In everything I have made so far, I just walk thru walls. The reason I didnt find anything that helped me is that the threads I looked at had info fo ...Show All
punchycool USing VB and C++.. 2 programs, accessing 1 anothers var's
Hey guys, Quick question. I have a school project that i have to do. We are required to use visual basic 6.0. I dont like using direct input because i like the other values that xinput outputs. I found out, after hours of searching online that directx 9 can not! be used in VB.. because no one can do it.... so ill just use C++..... now this is my question, Can i have a created C++ programm running in the background and have a VB program running, which access's the C++ var's .. is this possible.... please let me noe its not the graphics i need, im not using directx 9 for the graphics, i need the api to interface the controller. The game is being developed through just if, and else statesments, photos ...Show All
Sqnyy .fx not working right
this is my shader in rendermonkey nor in my game the model i apply this shows up i quess i has to do with the 3 matrix but i am not sure how to code the shader so it works with it uniform extern float4x4 World : WORLD; uniform extern float4x4 View : VIEW; uniform extern float4x4 Proj : PROJECTION; uniform extern texture UserTexture; struct VS_OUTPUT { float4 position : POSITION; float4 textureCoordinate : TEXCOORD0; }; sampler textureSampler = sampler_state { Texture = <UserTexture>; mipfilter = LINEAR; }; VS_OUTPUT Transform( float4 Position : POSITION, float4 TextureCoordinate : TEXCOORD0 ) { VS_OUTPUT Out = (VS_OUTPUT)0; Out.position = mul(Position, View * World * Proj); Out.textureCoordinate = TextureCoordinate; return ...Show All
SimonS_ Post Processing Shader
Hi- I'm pretty new to DirectX coding (at least in it's more recent incarnations), so forgive me if this is a dumb question. How do you apply a post processing Shader with XNA Does anyone have a working example Or ist ist just not possible right now Thanks for any help, -markus Cool. Took some time until I got throgh, but now it seems to work. Thanks. Render your scene to a texture. Render a full screen quad to your backbuffer with the desired pixel shader (triangle strip, 2 prims). ...Show All
Tim Ward Memory Leak?
Heya, I've been working on this 2d game for about a month and a half. A space shooter with a ton of animations. But thats not the problem the problem is recently as the amount of Images has increased I've noticed that the memory usage never stops going up as the game progresses. I know there is some kind of flaw or redundancy in the way i store textures now since the release of beta2 and the content manager. However What would cause memory to keep adding up until the game begins to stutter The structure for storing textures was done before the content manager so it is just a Dictionary class that loads and gets textures loaded via the content manager. The UnloadGraphicsContent method in the game unloads the content mana ...Show All
IceAngel89 Drawing into the ZBuffer
I wish to "clear draw" a perimitive into the ZBuffer. What I mean is, I want to draw the geometry of a mesh or perimitive into the ZBuffer, where in each place a pixel should be drawen, the ZBuffer value in that place will be set to 1. How can I accomplish this Thanks. If you don't want to modify your mesh nor you rendering pipeline (shader, declaration, ..), you could also tweek your viewport. You could set both minZ and maxZ viewport values (IDirect3DDevice9::SetViewport) with 1.0f so you're mesh should be rendererd at depth = 1.0f. I haven't tested it but I think it should work Otherwise if you're using shaders and still don't want to modify your mesh, you could use oDepth resiter ( ...Show All
M Thomas Animated Meshes in XNA
Well, I finally did it... I got skeletal animation working in XNA. It's only missing two small pieces now. 1) Blending between multiple bones. 2) Direct manipulation of the bones. I'll be cleaning up the code to try and give some more source code away. Although I don't know how successful I will be due to the fact I had to use my own proprietary format to get all of this working and I don't know how difficult it would be supporting that as well as the mesh code. Plus theres that whole thing about it being obsolete once the content pipeline is released. Visit my blog for some video. http://kukyona.blogspot.com/ Just per vertex for now... thats what I meant by blending by multiple bones, sorry. ...Show All
