Back to spaces

May 19, 2009

I’m having problems using WordPress.com, so I’ve decided to go back where I came, and use Windows Live Spaces once again.

Here’s my new blog:

http://saeedafshari.spaces.live.com/default.aspx


How to use this RedBulb thing?

April 1, 2009

This is a miniguide to make a RedBulb game…

  1. Make a Windows Game (3.0) project
  2. Add RedBulb project to your solution
  3. Right-click on your main project’s References folder, click on “Add Reference…”
  4. Go to “Projects” tab, choose RedBulb, then click OK.
  5. Create a new class, with RedBulbGame as it’s base. oh, wait, did you add using RedBulb; in the top of your file? … just checkin’!
    public partial class Game1 : RedBulbGame
  6. Write your init code:
    protected override void Initialize() {
    showMouse = false;
    fullscreen = false;
    GameWidth = 800;
    GameHeight = 600;
    InitializeGraphics();
    base.Initialize(); }
  7. Add your GameParts (first GamePart must be named “mainmenu”):
    public override void CreateParts() {
    Parts = new Dictionary<string, GamePart>();
    Parts.Add("mainmenu", new GamePart1(this)); }
  8. Write a LoadContent method:
    protected override void LoadContent()
    {
    base.LoadContent();
    spriteBatch = new SpriteBatch(GraphicsDevice);
    // Load your textures, sfx, music, fx, …
    // LoadTexture(@"path");
    // LoadSound(…);
    // LoadFont(…);
    // LoadEffect(…);
    }
  9. Create another file. make a GamePart Class
    public class RedBulbConsole : GamePart
    {
    public RedBulbConsole(RedBulbGame Game)
    : base(Game)
    {
    }

    Form form;
    public override void Initialize()
    {
    base.Initialize();
    form = new Form(game);
    }
    public override void Behave(GameTime gameTime)
    {
    form.Update(gameTime);
    base.Behave(gameTime);
    }

    public override void HandleInput(GameTime gameTime)
    {
    if (game.IsTapped(Keys.Escape, Buttons.Back)) ;
    base.HandleInput(gameTime);
    }

    public override void Render(GameTime gameTime)
    {
    base.Render(gameTime);
    form.Draw(gameTime);
    }

    }

  10. Compile and Run. It should work.

RedBulb Framework v3.0a source code

April 1, 2009

So, here’s the source code, but: it’s messy, needs lots of optimization, blah, blah, blah. because it’s under development. get it? It’s not finished yet! but it works. it works. and that’s all!

Download it from here.

I think it works with RedBulb base code v1.0. it can be downloaded from here.

What is Redbulb? It’s basically this.

Have fun!


My Top 5 Favorite Multiplayer games

March 18, 2009

There are lots of games out there with multiplayer support, and today I wanna share my Top 5 favorite multiplayer games list with you.

These games have some unique features:

  • They are light, so they run on almost all systems now, and they run smooth.
  • They run great on widescreen displays
  • They are addictive
  • You’ll never get bored of playing them!
  • All of them run perfectly on Windows Vista.

so, Here’s my list:

Number 5- Grand Theft Auto SA-MP

It’s a mod for Grand Theft Auto San Andreas which allows you to play online or over LAN with your friends in the San Andreas world.

Because anyone can write game modes for SA-MP, there are many game modes available for it.

you can download SA-MP from it’s website: http://www.sa-mp.com/

This game supports widescreen displays natively.

Number 4- Need for Speed Hot Pursuit 2

I know, it’s for 2002! but new Need for Speeds are pain in the ass in multiplayer with all those settings and spending time in menus for a single quick race. but in NFSHP2, you just host a game, select the track and that’s it! you’re playing MP. sure, it has some collision detection problems, but it’s no biggy!

This game supports widescreen displays natively.

Number 3- Armagetron Advanced!

Everybody loves tron! and the best tron clone around is Armagetron Advanced. It’s an open source game and it’s available for free.

It supports widescreen displays natively.

Download the game from here.

Number 2- Quake III Arena

Well here’s our FPS in this list! It is a fun and fast paced game. if you like FPS, you’ll love this.

If you want to play Quake III online, there’s a new version called Quake LIVE available for free at www.quakelive.com .

Number 1- Command & Conquer Generals
ZERO:HOUR

and the last one is a strategy game. It’s all about how you can manage your money!

With it’s World Builder tool, you can make new maps and worlds in no time, so It never gets boring. also, it’s easily moddable.

It does not have widescreen resolutions in it’s options menu, but that’s not a problem.

To make it look good on your widescreen laptop, just open options.ini file from your Documents\Command and Conquer Generals Zero Hour Data folder with notepad and change the value of resolution:

Resolution = 1280 800

and that’s it!


Cipher Puzzle

February 26, 2009

few days ago I was bored as hell, and I thought of making some cipher puzzles. so I created a new RedBulb Project, and began coding…

cipher Here’s my cipher game. It has three skill levels, and comes with a few random quotations. you can download it from my SkyDrive.

System Requirements:

  • Whatever an XNA game needs!
  • A widescreen display (game runs on normal displays, but It looks better on widescreen)
  • Games for Windows LIVE
  • XNA 3.0 Redist

If you want to add more quotations to the game, simply edit l.cfg file with notepad.


Sidescroller Progress

February 14, 2009

My polygon based sidescroller’s base code is almost ready. I’m waiting for some graphics from my artist to stick to the engine and test it.

Farseer Physics was a great help ‘till now, although I had to spend so much time on tweaking it.

I still need to write a good level editor; I need something that can insert entities and actors into the level easily. Level’s structure is more complicated than my old Tile-based engine; A level is made of:

  • A background texture (or animation)
  • A “foreground” texture
  • Polygons (for Walls, Level borders, etc.)
  • Entities

I’m worried about the size of textures, I need to find a technique to use huge textures in huge levels without any problems.


Adobe’s “January 19+1th” Incident!

January 29, 2009

Did you get “License Expired” from your Adobe programs? If so don’t panic. you are one of the thousand victims of this “January 19+1th” Incident :)

Reinstalling the suite doesn’t work, even reinstalling the Windows doesn’t work. Your key to solve this problem is this:

http://rapidshare.com/files/186717337/amtlib.dll

Just download this file, and copy (replace) it to all Adobe programs’ folders.

Don’t tell anybody I told you that!

Update: I found this helpful blog post in the net. take a look at it.


Media Center bug

January 28, 2009

I left my computer on with Media Center running, and when I returned, this happened:

mcebug


The Fight for Justice!

January 26, 2009

I was playing old DOS games, and look what I found :D I couldn’t stop laughing!

“The Fight for Justice” contains fully animated scrolling backgrounds. All the people you meet have their own lives, personalities, and objectives.

A 256-color VGA version will be Available (Smooth scrolling 256-color screens—fancy that)!

It reminded me the good old days :D ! The funnier thing is: They never made this fancy game!


Farseer Physics Engine

January 23, 2009

FarseerPhysicsNoBorder430X260

For those experts in XNA, This name is familiar. It’s a very very powerful and simultaneously easy to use 2D Physics Engine for XNA Framework.

Story is I coded and coded and coded to make some polygon based collision detection system to use in my new sidescroller game. But after a while I decided to download a physics engine instead of writing a shit load of code. so I jumped into codeplex and found this awesome engine. It has everything I want for my game and it is Ms-Pl!

So first thing I did was making a “Polygon Maker” program powered by this engine, so I could draw level boundaries with it.

Then I wrote some code to load polygons from file and attach them to PhysicsSimulator as bodies. then I added a simple rectangle body to test the collision detection:

rbfa2(Blue rectangle is a movable object, Black polygons are static objects and Red rectangles are Mass Centers.)

Anyway, it works perfect for me and kudos for it’s developers!

Oh and another thing: If you got lost in the world of physics, and couldn’t figure out which bodies are where and stuff like that, There is a PhysicsSimulatorView class in this engine that shows every thing about it’s PhysicsSimulator:

rbfa You can download the engine from here.