Difference between revisions of "Game Programming Class1"

esse quam videri
Jump to: navigation, search
(Discuss Syllabus)
(Mono Game)
Line 18: Line 18:
==Mono Game==
==Mono Game==
*http://monogame.codeplex.com/ new site http://www.monogame.net/
*Mono game is the current path to managed games in windows 8
*MonoGame is a current path to managed games in windows 10 and XboxOne
*Also a path from XNA to iOS, Android, Sony Vita, Linux, raspberry pi etc..
*Also a path from XNA to iOS, Android, Sony PS4, XboxOne, Linux, raspberry pi etc..
[[Installing Monogame]]
[[Installing Monogame]]

Revision as of 02:44, 2 September 2016

Discuss Syllabus


  • Visual Studio 2015 available from MSDN


GitHuib URL https://github.com/dsp56001/GameProgramming

Mono Game

Installing Monogame

What is DirectX?

show c++ examples

quick start guide - create

watch Accelerating Windows Store Game Development with Middleware http://channel9.msdn.com/Events/Build/2013/3-187

Hello World

Hello World in Monogame using spritefont. We'll revisit the spriteFont when we build the console/debug class

Hello Monogame with texture

Simple monogame project that draws a pacman sprite

  • Start a new Monogame Project (For all the example in this class I will use windowsGL)


Add two variable declarations at the top of the class

            Texture2D PacMan;   //Texture2D to hold pacman texture
            Vector2 PacManLoc;  //Vector location to draw pacman texture

In the LoadContent Function add the following code to initialize the two variables declared above

        protected override void LoadContent()
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            //load PacMan image
            PacMan = Content.Load<texture2d>("pacmanSingle");
            //Center PacMan image
            PacManLoc = new Vector2(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2);
  • Add the following code to the Draw Method to Draw the texture
	protected override void Draw(GameTime gameTime)

            // TODO: Add your drawing code here
            spriteBatch.Draw(PacMan, PacManLoc, Color.White);


pacman image is availble here: PacmanSingle.png

the full game1.cs file should look like


the build of the game will look like IntroSimpleSpriteWindows.png

Simple 2D texture example with update


Monogame Overview

MonoGameDemos\IntroFonts https://iam.colum.edu:8443/!/#GPMonogame3/view/head/trunk/jeff/IntroFonts zip file!!!


Watch Accelerating Windows Store Game Development with Middleware http://channel9.msdn.com/Events/Build/2013/3-187

Install VS2015 get Monogame 3.5 and prerequisites

Create an Monogame Picture. The picture needs to have at least

  • 1 SpriteFont
  • 3 Textures

Monogame pipeline tool supports different types of images but for this project let's stick with png files. What does the alpha channel in the png files do in monogame? what happens if you use a jpg?

Also please post a screen shot of your project running in the assignments. Zip and upload source to moodle.

You can take a screen shot using the snip tool. Start run snip in vista or 7. Or you can just press the Print Screen key on the keyboard.

  • Read Chapter 1 of XNA 3.0