I maed a Custom Script Language for my Xna Engine

Well the title is an Homage to James Silva‘s I MAED A GAM3 W1TH Z0MB1ES!!!1 I’ve been really busy with my Dream Build Play game lately. Although being a simple game somethings always turn out to be harder that we initial think. I’ve been debating myself with some bugs on my engine, had to redo tons of code yesterday due to XBOX360 compatibilities (should have tested earlier :P). Two days ago Rita started doing the assets and it’s looking really good. ...

February 15, 2010 · 2 min · 398 words · David Amador

Drawing Lines in XNA

One of the things I realized is very handy when prototyping or debugging is to draw a line on a specific location. Like drawing lines around collision boxes to see if your character is making a proper collision. For my games I’ve made a small LineBatch. Basically LineBatch uses a SpriteBatch to draw the lines by stretching a 1×1 white Texture2D to your line size. You can give it 2 points ( start and end point of course) and a color. There’s an overload function that receives the Layer parameter. ...

January 26, 2010 · 1 min · 163 words · David Amador

Xna Screen Manager

I know there’s lot’s of this stuff over the internet but I keep bumping into people asking for this. A way to easily switch from a Game Screen to a Menu or Options without having tons of flags and “if” clauses on the class Game. I’ve made a small project with a Screen Manager. The ScreenManager is static and can contain Screens. Instead of having typical Draw Update functions drawing SpriteBatches on the Game class we should have something like this: ...

January 24, 2010 · 2 min · 314 words · David Amador

Basalt and Sapphire Updates

Lately all my free time has been spent adding new features to Basalt and developing Sapphire. Some months ago, I started building Sapphire, a 2D editor for helping me creating to create my maps. Unfortunately I made a bad choice and decided to integrate XNA with Windows Forms, although I managed to do it it was a real pain to add something simple and eventually I dropped it. Here’s a screenshot of the previous alpha version: ...

December 2, 2009 · 2 min · 245 words · David Amador

How to do a XNA fps counter

Frame rate or FPS, how it is most commonly known is a way for you to know how many images per second is you game drawing. The more the better. Less then 30 and you start to see hiccups. So how can you measure your frame rate in XNA? Inside your game1 class declare these vars: SpriteFont _spr_font; int _total_frames = 0; float _elapsed_time = 0.0f; int _fps = 0; On function LoadContent() do // Put the name of the font _spr_font = Content.Load("kootenay"); you have on your project On the update pump do: ...

November 23, 2009 · 2 min · 254 words · David Amador

How to do a Xna Log file

Although the title says XNA log file this is actually a C# log file, I’ve just thrown this title cause lot’s of people search for xna log instead of C# log file. Many have asked me why take time to do a log file when you can throw exceptions when something goes wrong. Well the answer is simple, to keep track of what’s happening, log steps, write to the file exactly what when wrong even if you are on Release mode, and more, if someone complains the game is crashing you simply ask for the log file and see what when wrong. ...

November 20, 2009 · 2 min · 350 words · David Amador

Using PerfHUD with XNA

I am definitely a fan of ATI cards. Had a few Geforces but didn’t liked them very much. I actually noticed image quality decrease when switching from an old Radeon 9800 to a Geforce 8k something. I’m very happy with my Radeon 4890, now for the downside, PerfHUD, a very handy tool for Game Developers is only available for NVIDIA chipsets and although ATI has it’s own GPUPerfStudio it’s not the same thing. Anyway for those who have one and are developing for XNA you may have noticed that it doesn’t run PerfHUD out of the box. You will get an error, something like: “This applications is not configured for using PerfHUD. Consult the User’s Guide for more information” ...

November 18, 2009 · 2 min · 293 words · David Amador

Unreal Engine 3 is now free

Epic decided to offer Unreal Engine 3 for free to non-commercial applications. Sounds kind of weird considering it’s one of the best and most licensed engine out there, but maybe the recent release of Unity 3d free for all uses made them consider this option. Named UDK (Unreal Development Kit) you can download it here and have access to all tools and features that the full commercial Engine contains, well, except for the source code of course. This opens a lot of doors to students and indie hobbyists as me. I just can’t wait to have the time to get my hands on this. ...

November 5, 2009 · 1 min · 104 words · David Amador

Prototype for xna7day competition

I decided to make a game for the xna7day competition, in which we have to make a game that only uses 2 keys, so absolutely no analog input and it has to be built on xna of course. This is a great opportunity to test my engine Basalt. I decided to make a puzzle game, basically the rules are the same of a 3 in line game. This is what I have so far. ...

October 29, 2009 · 1 min · 74 words · David Amador

Building an 2D Game Engine in XNA - Part 1

I decided to starting writing a series of tutorials for building an 2d XNA game engine. Keep in mind that while the main focus is 2d nothing prevents us from adding the 3d stuff later but for now we will stick to 2D. It’s not very original but I’ll call this the Bay Engine. If anyone else has a better idea let me know. Requirements: You must have some Object Oriented Programming background to full understand what we will do here. XNA 3.1 Visual C# Express or Professional 2008 This is it for the first part. It just covers the basic structure, next week I’ll talk about objects2d, scene and screens management. ...

October 16, 2009 · 1 min · 112 words · David Amador