My first attempt at a XNA game and in need of help

Last post 04-03-2008, 10:26 AM by Jim Perry. 13 replies.
Sort Posts: Previous Next
  •  03-31-2008, 7:37 AM

    My first attempt at a XNA game and in need of help

    ok so its like this im very very new to C# and at the moment find it VERY confusing. but anyways im trying to make a game with XNA 2.0 and i got one page to come up (yes the one with just a blue screen..i kno its easy just hit F5 lol) but i changed it to where its black now with my model spinning. now i have 2 questions first i have NO idea how to set the model into the lower right hand corner instead of the middle Sad so im looking for someone to maybe explain how to move it about. Smile also well the second question i might as well not ask till i get the model moved around. so just looking for help there... also sorry if i posted in wrong spot but these forums ARE HUGE! lol so much stuff everywhere...well thanks for your time.

     

    mike

  •  03-31-2008, 9:19 AM

    Re: My first attempt at a XNA game and in need of help

    The background being black might be due to you changing something somewhere. I know that in all the stuff I've stared at, the background is colored "cornflowerblue". I had no idea cornflower could be blue... I'm new too so I'm no help lol sorry.

    I love CornFlower blue!
  •  03-31-2008, 9:46 AM

    Re: My first attempt at a XNA game and in need of help

    yea i meant to change it black... just want to move my model to a certain spot so i can add other things in its current spot
  •  03-31-2008, 10:05 AM

    Re: My first attempt at a XNA game and in need of help

    protomor:
    I had no idea cornflower could be blue

    Cornflower, not corn flour. ;)

     

     

  •  03-31-2008, 10:13 AM

    Re: My first attempt at a XNA game and in need of help

    Congrats on getting rid of the cornflower blue, getting a model to spin, and finding the forum.  You're almost there.

    Good places to continue on...

    http://msdn2.microsoft.com/en-us/library/bb198548.aspx

    http://msdn2.microsoft.com/en-us/library/bb975154.aspx

    .. and the ever wonderful

    http://msdn2.microsoft.com/en-us/library/bb203897.aspx

    Proceed with caution.  After that last one there's no turning back.

    Best,

    Byron

     


    ..shaders make you feel... powerful, or very very stupid.
    http://drjbn.spaces.live.com/
  •  03-31-2008, 12:16 PM

    Re: My first attempt at a XNA game and in need of help

    oooh cornFLOWER... I so did not get that.

    I prefer keeping the background that kind of blue because some lighting effects (or lack there of) will leave what you are rendering black too. Then how would you know what is what?

    I love CornFlower blue!
  •  03-31-2008, 12:20 PM

    Re: My first attempt at a XNA game and in need of help

    You are quite correct see Why CornFlowerblue by the man who chose it.... it annoyed me at first in the managed DirectX days too, but now I have come to love it - we should all get CornflowerBlue t-shirts and wear them on the day 3.0 come out.

     



    The ZBuffer - News and information for XNA and Managed DirectX
  •  03-31-2008, 1:17 PM

    Re: My first attempt at a XNA game and in need of help

    The ZMan [MVP/Moderator]:

    ... we should all get CornflowerBlue t-shirts and wear them on the day 3.0 come out.

    Yes!  Although since we are not all at the same place, it wouldn't make much of an impact ... but if we do it at XNA GameFest 2008 ( http://www.xnagamefest.com ) then ... then ... yes, then ... we could make a statement.  Now what that statement would be ... I have no earthly idea ...

    Ah, I just had an idea though --- the swag Microsoft brings and gives away -- especially the XNA t-shirts ... should all be cornflower blue!  Even better -- doesn't cost me anything.  Only problem with that of course is that the DX10 guys won't care about our love of cornflower blue ... 

    Someone at MS needs to bring this before their marketing department -- maybe two different types of shirts could be handed out ... one (cornflower blue) for the uber cool XNA Game Studio guys and another (boring gray) for the DX10 guys :)   Easy to know how many of each to bring based on the online registration and number of people attending which tracks .... yes, this should be done -- someone with influence should suggest it to MS :)



    Microsoft XNA Unleashed - 2D, 3D, HLSL, Content Pipeline, XACT, Particle Systems, AI, Physics, Game States, Performance, Garbage Collection and 2 full games!
  •  04-01-2008, 12:56 PM

    Re: My first attempt at a XNA game and in need of help

    ok so i have yet to move my model :( so here a peice of the code i believe would move it if someone gots some ideas would be great! :)

     

     

    protected override void Draw(GameTime gameTime)

    {

    graphics.GraphicsDevice.Clear(Color.Black);

     

    Matrix[] transforms = new Matrix[myModel.Bones.Count];

    myModel.CopyAbsoluteBoneTransformsTo(transforms);

    foreach (ModelMesh mesh in myModel.Meshes)

    {

    foreach (BasicEffect effect in mesh.Effects)

    {

    effect.EnableDefaultLighting();

    effect.World = transforms[mesh.ParentBone.Index] * Matrix.CreateRotationY(modelRotation)

    * Matrix.CreateTranslation(modelPosition);

    effect.View = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up);

    effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(65.0f),

    aspectRatio, 1.0f, 8000.0f);

    }

     

    mesh.Draw();

    }

    base.Draw(gameTime);

    }

         }

    }

     

  •  04-01-2008, 1:24 PM

    Re: My first attempt at a XNA game and in need of help

    shadez:

    ok so i have yet to move my model :(

    Have you seen this?


    Jim Perry
    Here's what I'm up to.
  •  04-01-2008, 7:50 PM

    Re: My first attempt at a XNA game and in need of help

    yes i have seen that...im not trying to move the model around with an input but rather move it from its location to a different one for a perm. spot....
  •  04-01-2008, 7:52 PM

    Re: My first attempt at a XNA game and in need of help

    Well then simply set the position once and don't change it. That tutorial shows more than just the specific instance of moving a model with input. It simultaneously shows how to get input, process that, and set a model's position. You could simply omit the first two parts and you'd be fine.

    The key to starting with programming is learning how to take a sample or tutorial that is close to what you want and bend it into exactly what you want. There will not always be an example of exactly what you are going for.


    Nick Gravelyn -- Microsoft XNA MVP
    XNA Wiki | Zune Games
  •  04-03-2008, 6:47 AM

    Re: My first attempt at a XNA game and in need of help

    YAY guys i got it to where i wanted...believe it or not it was VERY easy cant even believe i missed it. :( But what can you do when your new to this kind of stuff. so now im looking for dirctions on how to change a page...like i got the one page up want it to say press any key when ready. Now im wondering after they push the key how to go to a new page.. and Thank EVERYONE who had input and help i thank you alot!

     

    mike

  •  04-03-2008, 10:26 AM

    Re: My first attempt at a XNA game and in need of help

    shadez:

    YAY guys i got it to where i wanted...believe it or not it was VERY easy cant even believe i missed it. :( But what can you do when your new to this kind of stuff. so now im looking for dirctions on how to change a page...like i got the one page up want it to say press any key when ready. Now im wondering after they push the key how to go to a new page..

    Game State Management Sample


    Jim Perry
    Here's what I'm up to.
View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback