Nov 082013
 

This time lets scree how to make a scrolling in VB.Net and XNA.

Rather simple : the idea is to load a texture and to draw it into 2 rectangles, next to each other, and to update the rectangles position.

The project files : XNA_DEMO_8


Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Audio
Imports Microsoft.Xna.Framework.Content
Imports Microsoft.Xna.Framework.Media
Imports Microsoft.Xna.Framework.Input

Public Class Game
Inherits Microsoft.Xna.Framework.Game
'Fields in our game graphic manager etc'
Dim graphics As GraphicsDeviceManager
' // 1. Load a Texture2D and SpriteBatch as normal.
Dim texture1 As Texture2D
Dim spriteBatch As SpriteBatch
' // 2. Create two rectangles for the texture.
Dim rectangle1 As Rectangle
Dim rectangle2 As Rectangle
'// 3. step for the scrolling
Dim istep As Integer = 5
'// some text we will display on screen
Dim font1 As SpriteFont
Dim msg As String

Public Sub New()
graphics = New GraphicsDeviceManager(Me)
Window.Title = "lets Scroll!"
graphics.PreferredBackBufferWidth = 800
graphics.PreferredBackBufferHeight = 410
End Sub

Protected Overrides Sub Initialize()
'// 3a. rectangle1 and 2 should be equal to the
'// dimension of the texture.
rectangle1 = New Rectangle(0, 0, 2048, 410)
'// 3b. Position rectangle2 to the immediate right of rectangle1.
rectangle2 = New Rectangle(2048, 0, 2048, 410)
MyBase.Initialize()
End Sub

Protected Overrides Sub LoadContent()
MyBase.LoadContent()
spriteBatch = New SpriteBatch(GraphicsDevice)
texture1 = Content.Load(Of Texture2D)("back1")
'lets create a font
font1 = Content.Load(Of SpriteFont)("myfont")
End Sub

Protected Overrides Sub UnloadContent()
MyBase.UnloadContent()
End Sub

Protected Overrides Sub Update(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
'// 5a. This is where the quote unquote "magic" happens.
'// This is a simple bounds check. If the right edge of
'// rectangle1 is offscreen to the left, you move it to
'// the right side of rectangle2.
If (rectangle1.X + texture1.Width <= 0) Then rectangle1.X = rectangle2.X + texture1.Width ' // You repeat this check for rectangle2. If (rectangle2.X + texture1.Width <= 0) Then rectangle2.X = rectangle1.X + texture1.Width '// 6. Otherwise we incrementally move it to the left. '// You can swap out X for Y if you instead want incremental '// vertical scrolling. Dim key As KeyboardState key = Keyboard.GetState If key.IsKeyDown(Keys.Add) Then istep = istep + 1 If key.IsKeyDown(Keys.Subtract) Then istep = istep - 1 rectangle1.X -= istep rectangle2.X -= istep msg = "step= " & istep.ToString ' MyBase.Update(gameTime) End Sub Protected Overrides Sub Draw(ByVal gameTime As Microsoft.Xna.Framework.GameTime) '// 4. Load the SpriteBatch as normal. '// load the same texture into two different rectangles. spriteBatch.Begin() spriteBatch.Draw(texture1, rectangle1, Color.White) spriteBatch.Draw(texture1, rectangle2, Color.White) spriteBatch.DrawString(font1, msg, New Vector2(20.0F, 20.0F), Color.White) spriteBatch.End() MyBase.Draw(gameTime) End Sub End Class

 Posted by at 19 h 24 min
Nov 052013
 

One article for today : lets build on what have seen so far and lets have a bouncing ball with a background and some sound when the ball hit the walls.

As always we load contents (textures and sound), we update our variables (position and direction), and we finally draw.
By now, you probably got the idea 🙂

The project files : xna_demo_4


Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Audio
Imports Microsoft.Xna.Framework.Content
Imports Microsoft.Xna.Framework.Media
Imports Microsoft.Xna.Framework.Input

Public Class Game
Inherits Microsoft.Xna.Framework.Game
'Fields in our game graphic manager etc'
Dim graphics As GraphicsDeviceManager
Dim spriteBatch As SpriteBatch
'Texture that we will render'
Private mTexture As Texture2D
'Set the coordinates to draw the sprite at'
Private spritePos As Vector2 = Vector2.Zero
'X and Y speed of the sprite'
Private XSpeed As Single = 80
Private YSpeed As Single = 120
'Vector2 used for the speed of the sprite'
Private spriteSpeed As New Vector2(XSpeed, YSpeed)
'sound
Private mysound As SoundEffect
'background
Private backgroundTexture As Texture2D

Public Sub New()
graphics = New GraphicsDeviceManager(Me)
'graphics.ToggleFullScreen()
End Sub

Protected Overrides Sub Initialize()
'TODO: Add your initialization logic here'
MyBase.Initialize()
End Sub

Protected Overrides Sub LoadContent()
' TODO: use this.Content to load your game content here'
MyBase.LoadContent()
' Create a new SpriteBatch, which can be used to draw textures.'
spriteBatch = New SpriteBatch(GraphicsDevice)
'Load the texture'
mTexture = Content.Load(Of Texture2D)("bille")
'load sound
mysound = Content.Load(Of SoundEffect)("sleep")
'load background
backgroundTexture = Content.Load(Of Texture2D)("background2")
End Sub

Protected Overrides Sub UnloadContent()
MyBase.UnloadContent()
'TODO: Unload any non ContentManager content here'
End Sub

Protected Overrides Sub Update(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
'TODO: Add your update logic here'
'The method that will update our sprite position'
UpdateSprite(gameTime)
'
MyBase.Update(gameTime)
End Sub

Protected Overrides Sub Draw(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
'GraphicsDevice.Clear(Color.CornflowerBlue)
'TODO: Add your drawing code here'
Dim mainFrame As New Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height)
'Draw the sprite'
spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend)
spriteBatch.Draw(backgroundTexture, mainFrame, Color.White)
spriteBatch.Draw(mTexture, spritePos, Color.White)
spriteBatch.End()
'TODO: Add your drawing code here'
MyBase.Draw(gameTime)
End Sub

Private Sub UpdateSprite(ByVal gameTime As GameTime)
'The function move the sprite and check if its on the limits of the screen so it can bounce back'
Dim intMaxX As Integer
Dim intMinX As Integer = 0
Dim intMaxY As Integer
Dim intMinY As Integer = 0
'move the sprite by speed scaled by elapsed time'
spritePos += spriteSpeed * CSng(gameTime.ElapsedGameTime.TotalSeconds)
'Get the max. X and Y coordinates'
intMaxX = graphics.GraphicsDevice.Viewport.Width - mTexture.Width
intMaxY = graphics.GraphicsDevice.Viewport.Height - mTexture.Height
'Check the sprite if its at some of the edges of the screen and then reverce the speed of the sprite'
If spritePos.X > intMaxX Then
'Check if the sprite is at the maximum X coordinates of the screen if so reverse the speed'
spriteSpeed.X *= -1
spritePos.X = intMaxX
mysound.Play()
ElseIf spritePos.X < intMinX Then 'Check if the sprite is at the minimum X coordinates of the scree and reverse the speed' spriteSpeed.X *= -1 spritePos.X = intMinX mysound.Play() End If If spritePos.Y > intMaxY Then
'Check if the sprite is at the maximum Y coordinates of the screen if so reverse the speed'
spriteSpeed.Y *= -1
spritePos.Y = intMaxY
mysound.Play()

ElseIf spritePos.Y < intMinY Then 'Check if the sprite is at the minimum Y coordinates of the scree and reverse the speed' spriteSpeed.Y *= -1 spritePos.Y = intMinY mysound.Play() End If End Sub End Class

 Posted by at 22 h 24 min
Nov 042013
 

A quick one : lets adapt the last example (VB.Net and XNA : Article 4) and lets illustrate how to use the mouse input.
Here our texture will move around as we move the mouse.

Here are the project files : xna_demo_3.1

And below the code to review. Look at the updatemouse method.

Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Audio
Imports Microsoft.Xna.Framework.Content
Imports Microsoft.Xna.Framework.Media
Imports Microsoft.Xna.Framework.Input

Public Class Game
Inherits Microsoft.Xna.Framework.Game
'Fields in our game graphic manager etc'
Dim graphics As GraphicsDeviceManager
'
Dim font1 As SpriteFont
Dim msg As String
'
Dim spriteBatch As SpriteBatch
'
'Texture that we will render'
Private mTexture As Texture2D
'Set the coordinates to draw the sprite at'
Private spritePos As Vector2 = Vector2.Zero

Public Sub New()
graphics = New GraphicsDeviceManager(Me)
'graphics.ToggleFullScreen()
End Sub

Protected Overrides Sub Initialize()
'TODO: Add your initialization logic here'
MyBase.Initialize()
msg = "hello world"
End Sub

Protected Overrides Sub LoadContent()
' TODO: use this.Content to load your game content here'
MyBase.LoadContent()
' Create a new SpriteBatch, which can be used to draw textures.'
spriteBatch = New SpriteBatch(GraphicsDevice)
'Loading the texture'
mTexture = Content.Load(Of Texture2D)("bille")
'lets create a font
font1 = Content.Load(Of SpriteFont)("myfont")
End Sub
Protected Overrides Sub UnloadContent()
MyBase.UnloadContent()
'TODO: Unload any non ContentManager content here'
End Sub

Protected Overrides Sub Update(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
'Allows the game to exit'
If GamePad.GetState(PlayerIndex.One).Buttons.Back = ButtonState.Pressed Then
Me.Exit()
End If
'TODO: Add your update logic here'
updatemouse()
'
MyBase.Update(gameTime)
End Sub

Protected Overrides Sub Draw(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
GraphicsDevice.Clear(Color.CornflowerBlue)
'TODO: Add your drawing code here'
'Draw the sprite'
spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend)
spriteBatch.DrawString(font1, msg, New Vector2(20.0F, 20.0F), Color.White)
spriteBatch.Draw(mTexture, spritePos, Color.White)
spriteBatch.End()
MyBase.Draw(gameTime)
End Sub

Private Sub updatemouse()
Dim newState As MouseState
newState = Mouse.GetState
spritePos.X = newState.X
spritePos.Y = newState.Y
'
msg = spritePos.X & "," & spritePos.Y
End Sub
End Class

 Posted by at 22 h 57 min
Nov 032013
 

This time, lets see how to use the keyboard input to move a texture around since the update and draw event have no secrets for us anymore 🙂
And from now on, we’ll use XNA content files (see previous article).

Lets use the KeyboardState class and its GetState method.
And upon specific keypress (if newState.IsKeyDown(Keys.Right) …) lets update the X and Y of our texture.

As always, the full project : xna_demo_3 .


Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Audio
Imports Microsoft.Xna.Framework.Content
Imports Microsoft.Xna.Framework.Media
Imports Microsoft.Xna.Framework.Input

Public Class Game
Inherits Microsoft.Xna.Framework.Game
'Fields in our game graphic manager etc'
Dim graphics As GraphicsDeviceManager
'
Dim font1 As SpriteFont
Dim msg As String
'
Dim spriteBatch As SpriteBatch
'
'Texture that we will render'
Private mTexture As Texture2D
'Set the coordinates to draw the sprite at'
Private spritePos As Vector2 = Vector2.Zero

Public Sub New()
graphics = New GraphicsDeviceManager(Me)
'graphics.ToggleFullScreen()

End Sub

Protected Overrides Sub Initialize()
'TODO: Add your initialization logic here'
MyBase.Initialize()
msg = "hello world"
End Sub
Protected Overrides Sub LoadContent()
' TODO: use this.Content to load your game content here'
MyBase.LoadContent()
' Create a new SpriteBatch, which can be used to draw textures.'
spriteBatch = New SpriteBatch(GraphicsDevice)
'Loading the texture'
mTexture = Content.Load(Of Texture2D)("bille")
'lets create a font
font1 = Content.Load(Of SpriteFont)("myfont")

End Sub
Protected Overrides Sub UnloadContent()
MyBase.UnloadContent()
'TODO: Unload any non ContentManager content here'
End Sub
Protected Overrides Sub Update(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
'Allows the game to exit'
If GamePad.GetState(PlayerIndex.One).Buttons.Back = ButtonState.Pressed Then
Me.Exit()
End If
'TODO: Add your update logic here'

updateinput(gameTime)

MyBase.Update(gameTime)

End Sub
Protected Overrides Sub Draw(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
GraphicsDevice.Clear(Color.CornflowerBlue)
'TODO: Add your drawing code here'
'Draw the sprite'
spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend)
spriteBatch.DrawString(font1, msg, New Vector2(20.0F, 20.0F), Color.White)
spriteBatch.Draw(mTexture, spritePos, Color.White)
spriteBatch.End()
MyBase.Draw(gameTime)
End Sub

Private Sub updateinput(ByVal gameTime As GameTime)
Dim newState As KeyboardState
newState = Keyboard.GetState

If (newState.IsKeyDown(Keys.Right)) Then
spritePos.X = spritePos.X + 10
msg = "right " & spritePos.X & "," & spritePos.Y
End If

If (newState.IsKeyDown(Keys.Left)) Then
spritePos.X = spritePos.X - 10
msg = "left " & spritePos.X & "," & spritePos.Y
End If

If (newState.IsKeyDown(Keys.Up)) Then
spritePos.Y = spritePos.Y - 10
msg = "up " & spritePos.X & "," & spritePos.Y
End If

If (newState.IsKeyDown(Keys.Down)) Then
spritePos.Y = spritePos.Y + 10
msg = "down " & spritePos.X & "," & spritePos.Y
End If
End Sub
End Class

 Posted by at 23 h 09 min
Nov 032013
 

In previous article, we have seen a basic XNA application illustrating how to load a texture and how to move it around.

Lets see now how to write a text : load a spritefont as content, and use the drawstring method.

First lets look at a spritefont (in the zip file).
This is a simple XML file where you describe the font you want to use : font name, size, etc.

But you cannot use use as is in your vb.net XNA code.
You need to turn it into a XNA content (XNB file -> myfont.xnb next to exe file).
As my VS2013 does not manage XNA projects and contents, I use XNA Content Compiler.
Choose content type, select myfont.spritefont, input the destination folder and press compile !

Attached to this post the vb.net project files. xna_demo_2

Below the code for a quick review.


Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Audio
Imports Microsoft.Xna.Framework.Content
Imports Microsoft.Xna.Framework.Media
Imports Microsoft.Xna.Framework.Input

Public Class Game
Inherits Microsoft.Xna.Framework.Game
'Fields in our game graphic manager etc'
Dim graphics As GraphicsDeviceManager
'
Dim SpriteBatch As SpriteBatch
Dim font1 As SpriteFont
'
Public Sub New()
graphics = New GraphicsDeviceManager(Me)
End Sub

Protected Overrides Sub Initialize()
'TODO: Add your initialization logic here'
MyBase.Initialize()
End Sub
Protected Overrides Sub LoadContent()
' TODO: use this.Content to load your game content here'
MyBase.LoadContent()
' Create a new SpriteBatch, which can be used to draw textures.'
SpriteBatch = New SpriteBatch(GraphicsDevice)
'lets create a font
font1 = Content.Load(Of SpriteFont)("myfont")
End Sub
Protected Overrides Sub UnloadContent()
MyBase.UnloadContent()
'TODO: Unload any non ContentManager content here'
End Sub
Protected Overrides Sub Update(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
'Allows the game to exit'
If GamePad.GetState(PlayerIndex.One).Buttons.Back = ButtonState.Pressed Then
Me.Exit()
End If
'TODO: Add your update logic here'
MyBase.Update(gameTime)
End Sub
Protected Overrides Sub Draw(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
GraphicsDevice.Clear(Color.CornflowerBlue)
'TODO: Add your drawing code here'
'write text
SpriteBatch.Begin()
SpriteBatch.DrawString(font1, "Ceci est un Test !!!", New Vector2(20.0F, 20.0F), Color.White)
SpriteBatch.End()
'
MyBase.Draw(gameTime)
End Sub
End Class

xna03

 Posted by at 18 h 12 min
Nov 022013
 

In previous articles, we have seen what is needed to code with XNA and also the basics of an XNA class.

Lets now have a look at the small XNA app below : a bouncing ball.

-We declare some global variables
-we load our content (here : a sprite = a bleu ball) in the loadcontent xna method
-we call our updatesprite method in the update xna method which will take care of the moving position
-we draw our sprite in the draw xna method using the update spritepos

Attached to this post is the complete source code and compiled executable : xna_demo_1

Enjoy !


Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Input

Public Class Game
Inherits Microsoft.Xna.Framework.Game
'Fields in our game graphic manager etc'
Dim graphics As GraphicsDeviceManager
Dim spriteBatch As SpriteBatch
'
'Texture that we will render'
Private mTexture As Texture2D
'Set the coordinates to draw the sprite at'
Private spritePos As Vector2 = Vector2.Zero
'X and Y speed of the sprite'
Private XSpeed As Single = 80
Private YSpeed As Single = 120
'Vector2 used for the speed of the sprite'
Private spriteSpeed As New Vector2(XSpeed, YSpeed)

Public Sub New()
graphics = New GraphicsDeviceManager(Me)
End Sub

Protected Overrides Sub Initialize()
MyBase.Initialize()
End Sub

Protected Overrides Sub LoadContent()
MyBase.LoadContent()
' Create a new SpriteBatch, which can be used to draw textures.'
spriteBatch = New SpriteBatch(GraphicsDevice)
'
'Load the texture'
'We are using Stream , not a content (xnb format)
Dim textureStream As System.IO.Stream = New System.IO.StreamReader(Application.StartupPath + "\bille_bleu1.png").BaseStream
'Loading the texture'
mTexture = Texture2D.FromStream(GraphicsDevice, textureStream)
End Sub

Protected Overrides Sub UnloadContent()
MyBase.UnloadContent()
End Sub

Protected Overrides Sub Update(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
'Allows the game to exit'
Dim newState As KeyboardState = Keyboard.GetState
If newState.IsKeyDown(Keys.Q) Then Application.Exit()
'The method that will update our sprite position'
UpdateSprite(gameTime)
MyBase.Update(gameTime)
End Sub

Protected Overrides Sub Draw(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
GraphicsDevice.Clear(Color.CornflowerBlue)
'Draw the sprite'
spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend)
spriteBatch.Draw(mTexture, spritePos, Color.White)
spriteBatch.End()
MyBase.Draw(gameTime)
End Sub

Private Sub UpdateSprite(ByVal gameTime As GameTime)
'The function move the sprite and check if its on the limits of the screen so it can bounce back'
Dim intMaxX As Integer
Dim intMinX As Integer = 0
Dim intMaxY As Integer
Dim intMinY As Integer = 0

'move the sprite by speed scaled by elapsed time'
spritePos += spriteSpeed * CSng(gameTime.ElapsedGameTime.TotalSeconds)
'Get the max. X and Y coordinates'
intMaxX = graphics.GraphicsDevice.Viewport.Width - mTexture.Width
intMaxY = graphics.GraphicsDevice.Viewport.Height - mTexture.Height
'Check the sprite if its at some of the edges of the screen and then reverce the speed of the sprite'
If spritePos.X > intMaxX Then
'Check if the sprite is at the maximum X coordinates of the screen if so reverse the speed'
spriteSpeed.X *= -1
spritePos.X = intMaxX

ElseIf spritePos.X < intMinX Then 'Check if the sprite is at the minimum X coordinates of the scree and reverse the speed' spriteSpeed.X *= -1 spritePos.X = intMinX End If If spritePos.Y > intMaxY Then
'Check if the sprite is at the maximum Y coordinates of the screen if so reverse the speed'
spriteSpeed.Y *= -1
spritePos.Y = intMaxY

ElseIf spritePos.Y < intMinY Then 'Check if the sprite is at the minimum Y coordinates of the scree and reverse the speed' spriteSpeed.Y *= -1 spritePos.Y = intMinY End If End Sub End Class

 Posted by at 12 h 53 min
Oct 302013
 

First of all, and this is where beginners could get confused, there is no form in an XNA VB.Net app.
You actually need a module with a main sub calling the run method of your XNA class.

You need to make a class that will inherit from Inherits Microsoft.Xna.Framework.Game and in there you will have to override a couple of methods.

The basic steps/methods are
1-initialise variables in Initialize
2-load your content (audio, fonts, textures) in loadcontent
3-put your update logic in update (check inputs, set new coordinates for a sprite, etc)
4-(re)draw your window in draw

And thats basically it, you are ready to take advantage of all the classes and methods of the XNA framework 🙂

Next article will show a working XNA app.

To make it easy on you, at the end of this article is a template project for vs2013 : copy the zip file in C:\Users\username\Documents\Visual Studio 2013\Templates\ProjectTemplates and VS2013 will propose you to create a XNA project from scratch.

See below for a skeleton class.


Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Audio
Imports Microsoft.Xna.Framework.Content
Imports Microsoft.Xna.Framework.Media
Imports Microsoft.Xna.Framework.Input

Public Class Game
Inherits Microsoft.Xna.Framework.Game
'Fields in our game graphic manager etc'
Dim graphics As GraphicsDeviceManager

Public Sub New()
graphics = New GraphicsDeviceManager(Me)
Window.Title = "Test"
graphics.PreferredBackBufferHeight = 300
graphics.PreferredBackBufferWidth = 300
End Sub

Protected Overrides Sub Initialize()
'TODO: Add your initialization logic here'
'...
MyBase.Initialize()
End Sub

Protected Overrides Sub LoadContent()
MyBase.LoadContent()
' TODO: use this.Content to load your game content here'
'...
End Sub

Protected Overrides Sub UnloadContent()
MyBase.UnloadContent()
'TODO: Unload any non ContentManager content here'
End Sub

Protected Overrides Sub Update(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
'Allows the game to exit'
If GamePad.GetState(PlayerIndex.One).Buttons.Back = ButtonState.Pressed Then
Me.Exit()
End If
'TODO: Add your update logic here'
'...
MyBase.Update(gameTime)
End Sub

Protected Overrides Sub Draw(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
GraphicsDevice.Clear(Color.CornflowerBlue)
'TODO: Add your drawing code here'
'...
MyBase.Draw(gameTime)
End Sub
End Class

VS2013 template

xna0

 Posted by at 21 h 36 min
Oct 302013
 

I am usually not a pc gaming person nor I am into vb.net langage (thus I used to teach it years ago).
Still, lately I could see my 2 kids writing games in VB.net.
And of course, as « Daddy » is a dev guy, he sure knows how to handle scrolling, sprites, pixel collision, etc.

Well it happens not (at all!) 🙂

Hence me looking closer at this platform, reading some nice things around XNA (a framework for dotnet) and deciding to give it a go.

I will therefore post in the coming days a serie of article illustrating some very basics that should beginners to start writing some tiny games.

First things first, you will need :
Visual Studio Express 2013 windows desktop edition (free)
the XNA assemblies (Game Studio 4)
Dotnet 4.x (will be installed with VS2013)
XNA runtime (needed also when youo distribute your executable).

Note that XNA is end of life (MS will drop support on April 2014).
However this is a good framework to practice and learn gaming tips and tricks.
Plus, there is a future is MonoGame : an open source implementation of the Microsoft XNA 4.x Framework .

Regards,
Erwan

Oct 162013
 

Here below a step by step to PXE boot Linux Mint over NFS

needed :
ipxe
tiny pxe server
winnfsd
Mint

1/Prepare the Linux Mint files

open mint.iso in winrar (or any other iso reading capable tool).
extract casper folder to x:\pxe\iso\mint (or any path that suit you)

2/Prepare NFS Server

launch winnfsd with the following :
winnfsd.exe -id 0 0 x:\pxe\iso\mint

note : adapt the above path with your own path

3/Prepare iPXE Script

#!ipxe
set nfs-server ${next-server}
kernel /ISO/mint/casper/vmlinuz root=/dev/nfs boot=casper netboot=nfs nfsroot=${nfs-server}:/x/ISO/mint quiet splash
initrd /ISO/mint/casper/initrd.lz
boot

note : adapt /x/pxe/ISO/mint to your own path.
name it mint.ipxe and put it in x:\pxe

4/Prepare PXE Server

put ipxe-undionly.kpxe in x:\pxe
launch tiny pxe server with the following settings (leave other settings untouched) :
->boot filename = ipxe-undionly.kpxe (use the browse files and folders « … » button)
->filename if user-class=iPXE = mint.ipxe

push the online button

5/Boot !

pxe boot your computer and here we go 🙂

linux-mint-10-lxde

 Posted by at 19 h 25 min