This tutorial explain how to create your very first “Hello world” application using sharpallegro.
Tag Archives: tutorial
Leave a reply
Vista like bars – v2
Vista like bars
Have you ever wanted to create a glossy bar like the one in Windows Vista?
Follow this easy tutorial and you’ll get there.
XNA Tutorial 1: Hello world
Start XNA Game studio and create a new Windows game project.
Right click Content folder and choose Add, New Item.
Select Sprite Font and rename it to some font you like, such as “Arial”.
You can now open the file and modify some of the options such as Size or Style.
Locate the following code:
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); // TODO: Add your drawing code here base.Draw(gameTime); } |
[ad]
And finally add the code to draw a string:
spriteBatch.Begin(); spriteBatch.DrawString(Content.Load<SpriteFont>("Arial"), "Hello world", new Vector2(100, 100), Color.Black); spriteBatch.End(); |
[ad]
Easy, isn’t it?