XNA Particle System 2D

It’s been a long week. Even though I’ve always pointed to a make a very simple game for Dream Build Play so that I may actually have the time to finish it I just lost almost two day doing something to show for about 3 or 4 seconds per level. Discussing how we should make our puzzle appear and disappear between each level we decided that a particle system or an effect of such nature would be nice to show apart from some fading or something on the puzzle itself. Then it began, the one task that all programmers should ask someone else to do, because once you get the first one working you are gonna keep adding features because is so FUC**** pretty 😀 ...

February 19, 2010 · 2 min · 225 words · David Amador

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

Flex Build Path GUI bug and fix

I recently faced myself with a really annoying bug on Flex 3, the “Flex Modules” section of the properties dialog is blank. After some search on the internet some suggested that it might be a resolution problem. What the f**? So I have to switch resolution to use a program? Adobe Support turned out a dead end so still no permanent fix for this. There is however a small thing you can do, just adjust the divider between the list on the left hand side of the dialog and the right hand content area. Just adjusting the divider a smidge will cause everything to magically appear. ...

January 20, 2010 · 1 min · 127 words · David Amador

Updates about Different Pixel and Sapphire

Like some of you already know I’m currently out of job, the company where I worked like many out there closed due to, I don’t know, financial issues, bad management, who knows. Even worse the news got out just before Christmas and it was not the holidays I intended to have. Times have been hard, since the last pay check I got was in November. I worked there since 2006, almost 4 years, I joined the team back then in the hopes of joining something in the games industry. It was funny, built a couple of games, made part of big projects, learned much, learned that even more is to be learned. One year after I started making small prototype games on my free times as a joke and websites now and then for a couple of extra bucks. ...

December 30, 2009 · 3 min · 433 words · David Amador

C# foreach VS for loop

When I started using C#, mainly because of XNA one of the things I got used to write is foreach loops instead of for, seemed easier and it’s a much cleaner code. Doing almost the same thing as a for loop I never really bother to see the differences, almost everyone in their XNA examples used it instead. Today I decided to see the differences between them: FOR int[] values = new int[1]; int total = 0; for(int i = 0; i < values.Length; i++) { total += values[i]; } FOREACH ...

December 12, 2009 · 2 min · 312 words · David Amador

munchies for Design

As most developers do I spend a lot of time programming. Most of us has made some sketches for prototyping games, yes, the ones no one else can understand except for ourselves. I always liked drawing and 3D modeling but I was never very good at it. I was just cleaning up some stuff on my pc and found a folder, god most of this stuff I made is UGLYYYY lol. ...

December 5, 2009 · 1 min · 71 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