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
Oct 132013
 

Olof Lagerkvist, the well known author of the popular ImDisk has released an open source virtual SCSI driver.

With that driver, you can mount a virtual disk which will be seen as physical disk by windows.
This vritual disk will appear as a disk in your devices but also in your disk management console.
Read more here.

Being quite enthusiast about this driver, I have decided to come up with a GUI named ImgMount, read more here.

mount

 Posted by at 12 h 43 min