Results 1 to 4 of 4

Thread: XNA Cannon1

  1. #1

    XNA Cannon1

    I've been following the videos for Cannon1 and after finishing Phase 1 - Mechanics, I've realized when debugging the window is smaller than it should be. In the form1 properties I've set window size to be 640, 480.

    Edit: I've just noticed if I change the size in properties the window will stay the same size regardless.

    Edit: Here's a screenshot of what my cannon1 looks like.

    Click image for larger version. 

Name:	fRxkI.jpg 
Views:	47 
Size:	207.5 KB 
ID:	72666
    Last edited by lobothesequel; 04-16-2012 at 01:32 PM.

  2. #2
    Join Date
    Mar 2003
    Location
    Denmark
    Posts
    2,863
    Are you resizing the form size in your code perhaps ?
    Swoop - Buzzed Pirate!
    " If nobodys talking to me, im talking to me" - Swoop

    Reflection Design || Swoops Blog

    2D Tutorials Compilation

    The Speed Painting Thread || ((post your Concept Art thread))


  3. #3
    Join Date
    Jan 2007
    Posts
    216
    check if the constants SCREEN_WIDTH and SCREEN_HEIGHT are correct and check if you didn't flip them around when you set the ClientSize.

  4. #4
    Thanks guy, I finally found the problem This is where I went wrong.

    Code:
            public Form1()
            {
                InitializeComponent();
                this.ClientSize = new Size(SCREEN_HEIGHT, SCREEN_HEIGHT);
                random = new Random();
            }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •