@-Codeing-4-Fun-@'s Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
8 (0.01 per day)
Joined:
07-October 12
Profile Views:
358
Last Active:
User is offline Nov 18 2012 11:39 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   @-Codeing-4-Fun-@ has no reallife :D

Posts I've Made

  1. In Topic: [Problem] Game crashes when...

    Posted 18 Nov 2012

    yet heres a error: uri format not supported

    Thenks, but this can I solve!

    yet it`s works
  2. In Topic: [Problem] Game crashes when...

    Posted 18 Nov 2012

    no message. it doesn't update any more and don't draw anything...

    look into Windows Task Manager: Attached File  error.png (12.36K)
    Number of downloads: 10
  3. In Topic: Showing black screen and not responding

    Posted 18 Nov 2012

    and you need in

    public Game1()

    this:

    Content.RootDirectory = "Content";
  4. In Topic: Showing black screen and not responding

    Posted 18 Nov 2012

    Line 54:
                graphics.ApplyChanges(); 
    


    When it is show a black screen use breakpoints!

    Fixed Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Audio;
    using Microsoft.Xna.Framework.Content;
    using Microsoft.Xna.Framework.GamerServices;
    using Microsoft.Xna.Framework.Graphics;
    using Microsoft.Xna.Framework.Input;
    using Microsoft.Xna.Framework.Media;
    
    namespace PowersOfTen
    {
    
        public class Game1 : Microsoft.Xna.Framework.Game
        {
            //Default graphics stuff
            GraphicsDeviceManager graphics;
            SpriteBatch spriteBatch;
    
            //Background Textures
            Texture2D mStartScreenBackground;
            Texture2D mTitleScreenBackground;
    
            //initalize keyboard and mouse states
            KeyboardState keyboard;
            MouseState currentMouseState, previousMouseState;
    
            //ICollection<MediaSource> mediaSources;
            //MediaLibrary mediaLib;
            //PictureCollection picCollection;
            //Texture2D pic;
     
    
            //Yaaay enumerations!
            enum ScreenState
            {
                TitleScreen,
                SlideShow,
                OptionsMenu
            }
    
            //Initialize the screen state
            ScreenState mCurrentScreen;
    
            public Game1()
            {
    
                //These are the resolutions for the tv's
                graphics = new GraphicsDeviceManager(this);
                this.graphics.PreferredBackBufferWidth = 1920;
                this.graphics.PreferredBackBufferHeight = 1080;
                graphics.IsFullScreen = true;
    
                //Don't mess with this.
                Content.RootDirectory = "Content";
            }
    
            protected override void Initialize()
            {
                base.Initialize();
            }
    
            protected override void LoadContent()
            {
                // Create a new SpriteBatch, which can be used to draw textures.
                spriteBatch = new SpriteBatch(GraphicsDevice);
    
                //mediaSources = MediaSource.GetAvailableMediaSources();
    
                //mediaLib = new MediaLibrary();
    
                //picCollection = mediaLib.Pictures;
    
                //pic = Texture2D.FromStream(GraphicsDevice, picCollection[currentPic].GetImage());
    
                
    
                //Load Backgrounds
                mStartScreenBackground = Content.Load<Texture2D>("startScreen");
                mTitleScreenBackground = Content.Load<Texture2D>("TitleScreen");
    
                //Create a screen state variable that sets the variable to enum.
                mCurrentScreen = ScreenState.TitleScreen;
            }
    
            protected override void UnloadContent()
            {
                //We won't use this.
            }
    
            private void UpdateTitleScreen()
            {
                //This is a single click. Look at update section.
                if (previousMouseState.LeftButton == ButtonState.Released && currentMouseState.LeftButton == ButtonState.Pressed)
                {
                    //Set screen to title screen
                    mCurrentScreen = ScreenState.SlideShow;
                    return;
                }
    
    
            }
    
            private void SlideShowStart()
            {
    
                //GraphicsDevice.Clear(Color.CornflowerBlue);
                //Vector2 pos = Vector2.Zero;
    
                //spriteBatch.Draw(pic, pos, Color.White);
    
    
            }
    
            private void OptionsMenu()
            {
    
                //idfk
    
            }
    
            private void DrawTitleScreen()
            {
                //Draws the screen texture with a white background at (0,0)
                spriteBatch.Draw(mStartScreenBackground, Vector2.Zero, Color.White);
    
            }
    
            private void DrawSlideShowScreen()
            {
                //Draws the title texture with a white background at (0,0)
                spriteBatch.Draw(mTitleScreenBackground, Vector2.Zero, Color.White);
    
            }
    
            private void DrawOptionsMenuStart()
            {
    
                //Button
                //Sure you want to quit?
                //Tutorial?
                //Hell if I know
    
            }
    
            protected override void Update(GameTime gameTime)
            {
                // Allows the game to exit with the "esc" key
                if (keyboard.IsKeyDown(Keys.Escape))
                    this.Exit();
    
                //this lets us single click since it will set current state immediately to previous so it's not active
                previousMouseState = currentMouseState;
    
                //initialize keyboard
                keyboard = Keyboard.GetState();
    
                //Initialize the mouse
                currentMouseState = Mouse.GetState();
    
                //Little old switch statement that switches between screens
                switch (mCurrentScreen)
                {
                    case ScreenState.TitleScreen:
                        {
                            //if case is start screen then update to UpdateStartScreen()
                            UpdateTitleScreen();
                            break;
                        }
    
                    case ScreenState.SlideShow:
                        {
                            //if case is title screen then update to UpdateTitleScreen()
                            SlideShowStart();
                            break;
                        }
                    case ScreenState.OptionsMenu:
                        {
                            //if case is title screen then update to OptionsMenu()
                            OptionsMenu();
                            break;
                        }
                }
    
                base.Update(gameTime);
            }
    
            protected override void Draw(GameTime gameTime)
            {
                //default don't worry about it.
                GraphicsDevice.Clear(Color.CornflowerBlue);
    
                //begin drawing sprites
                spriteBatch.Begin();
    
                //another switch that draws the screen.
                switch (mCurrentScreen)
                {
                    case ScreenState.TitleScreen:
                        {
                            //Draw the start screen if case is startscreen
                            DrawTitleScreen();
                            break;
                        }
                    case ScreenState.SlideShow:
                        {
                            //Draw the slideshow screen if case is slideshow
                            DrawSlideShowScreen();
                            break;
                        }
                    case ScreenState.OptionsMenu:
                        {
                            //Draw the optionsmenu screen if case is optionsmenu
                            DrawOptionsMenuStart();
                            break;
                        }
                }
    
                //end the drawing
                spriteBatch.End();
                base.Draw(gameTime);
            }
        }
    }
    
    
    


    oh Sorry!
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Audio;
    using Microsoft.Xna.Framework.Content;
    using Microsoft.Xna.Framework.GamerServices;
    using Microsoft.Xna.Framework.Graphics;
    using Microsoft.Xna.Framework.Input;
    using Microsoft.Xna.Framework.Media;
    
    namespace PowersOfTen
    {
    
        public class Game1 : Microsoft.Xna.Framework.Game
        {
            //Default graphics stuff
            GraphicsDeviceManager graphics;
            SpriteBatch spriteBatch;
    
            //Background Textures
            Texture2D mStartScreenBackground;
            Texture2D mTitleScreenBackground;
    
            //initalize keyboard and mouse states
            KeyboardState keyboard;
            MouseState currentMouseState, previousMouseState;
    
            //ICollection<MediaSource> mediaSources;
            //MediaLibrary mediaLib;
            //PictureCollection picCollection;
            //Texture2D pic;
     
    
            //Yaaay enumerations!
            enum ScreenState
            {
                TitleScreen,
                SlideShow,
                OptionsMenu
            }
    
            //Initialize the screen state
            ScreenState mCurrentScreen;
    
            public Game1()
            {
    
                //These are the resolutions for the tv's
                graphics = new GraphicsDeviceManager(this);
                this.graphics.PreferredBackBufferWidth = 1920;
                this.graphics.PreferredBackBufferHeight = 1080;
                graphics.IsFullScreen = true;
                graphics.ApplyChanges();
    
                //Don't mess with this.
                Content.RootDirectory = "Content";
            }
    
            protected override void Initialize()
            {
                base.Initialize();
            }
    
            protected override void LoadContent()
            {
                // Create a new SpriteBatch, which can be used to draw textures.
                spriteBatch = new SpriteBatch(GraphicsDevice);
    
                //mediaSources = MediaSource.GetAvailableMediaSources();
    
                //mediaLib = new MediaLibrary();
    
                //picCollection = mediaLib.Pictures;
    
                //pic = Texture2D.FromStream(GraphicsDevice, picCollection[currentPic].GetImage());
    
                
    
                //Load Backgrounds
                mStartScreenBackground = Content.Load<Texture2D>("startScreen");
                mTitleScreenBackground = Content.Load<Texture2D>("TitleScreen");
    
                //Create a screen state variable that sets the variable to enum.
                mCurrentScreen = ScreenState.TitleScreen;
            }
    
            protected override void UnloadContent()
            {
                //We won't use this.
            }
    
            private void UpdateTitleScreen()
            {
                //This is a single click. Look at update section.
                if (previousMouseState.LeftButton == ButtonState.Released && currentMouseState.LeftButton == ButtonState.Pressed)
                {
                    //Set screen to title screen
                    mCurrentScreen = ScreenState.SlideShow;
                    return;
                }
    
    
            }
    
            private void SlideShowStart()
            {
    
                //GraphicsDevice.Clear(Color.CornflowerBlue);
                //Vector2 pos = Vector2.Zero;
    
                //spriteBatch.Draw(pic, pos, Color.White);
    
    
            }
    
            private void OptionsMenu()
            {
    
                //idfk
    
            }
    
            private void DrawTitleScreen()
            {
                //Draws the screen texture with a white background at (0,0)
                spriteBatch.Draw(mStartScreenBackground, Vector2.Zero, Color.White);
    
            }
    
            private void DrawSlideShowScreen()
            {
                //Draws the title texture with a white background at (0,0)
                spriteBatch.Draw(mTitleScreenBackground, Vector2.Zero, Color.White);
    
            }
    
            private void DrawOptionsMenuStart()
            {
    
                //Button
                //Sure you want to quit?
                //Tutorial?
                //Hell if I know
    
            }
    
            protected override void Update(GameTime gameTime)
            {
                // Allows the game to exit with the "esc" key
                if (keyboard.IsKeyDown(Keys.Escape))
                    this.Exit();
    
                //this lets us single click since it will set current state immediately to previous so it's not active
                previousMouseState = currentMouseState;
    
                //initialize keyboard
                keyboard = Keyboard.GetState();
    
                //Initialize the mouse
                currentMouseState = Mouse.GetState();
    
                //Little old switch statement that switches between screens
                switch (mCurrentScreen)
                {
                    case ScreenState.TitleScreen:
                        {
                            //if case is start screen then update to UpdateStartScreen()
                            UpdateTitleScreen();
                            break;
                        }
    
                    case ScreenState.SlideShow:
                        {
                            //if case is title screen then update to UpdateTitleScreen()
                            SlideShowStart();
                            break;
                        }
                    case ScreenState.OptionsMenu:
                        {
                            //if case is title screen then update to OptionsMenu()
                            OptionsMenu();
                            break;
                        }
                }
    
                base.Update(gameTime);
            }
    
            protected override void Draw(GameTime gameTime)
            {
                //default don't worry about it.
                GraphicsDevice.Clear(Color.CornflowerBlue);
    
                //begin drawing sprites
                spriteBatch.Begin();
    
                //another switch that draws the screen.
                switch (mCurrentScreen)
                {
                    case ScreenState.TitleScreen:
                        {
                            //Draw the start screen if case is startscreen
                            DrawTitleScreen();
                            break;
                        }
                    case ScreenState.SlideShow:
                        {
                            //Draw the slideshow screen if case is slideshow
                            DrawSlideShowScreen();
                            break;
                        }
                    case ScreenState.OptionsMenu:
                        {
                            //Draw the optionsmenu screen if case is optionsmenu
                            DrawOptionsMenuStart();
                            break;
                        }
                }
    
                //end the drawing
                spriteBatch.End();
                base.Draw(gameTime);
            }
        }
    }
    
    
    
    
  5. In Topic: [XNA] Align object to another objekt?

    Posted 9 Oct 2012

    thanks... this I have searched :)

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

@-Codeing-4-Fun-@ hasn't added any friends yet.

Comments

@-Codeing-4-Fun-@ has no profile comments yet. Why not say hello?