My ISP sucks

I have problem with my internet connection at home. And my ISP do not want to fix it. I’m thinking about to switch to another ISP. Before that i can`t post any Ignite updates (fancy screenshots etc) to this blog. Sorry.

But i keep working on it. Yesterday i’ve compleated an Item Editor, created a lot of items and implemented their creation in the game. Right now item can be only looted from monsters. There is a gradation of item quality:

  • gray items – simply bad items. You can get them at the start of the game, from trivial (to your level) monsters or when an item gets broken.
  • white items – ordinary item with no magic properties
  • green items – items with one unusual or magic properties. All of this items are generated randomly.
  • blue items – rare items with two unusual or magic properties. Some of this items will be pregenerated.
  • violet items – epic quality items with up to three magic properties.  Some of this items will be pregenerated.
  • orange items – legendary quality items with up to four magic properties. All items from this category will be pregenerated.
Also, i`ve fixed all of perfomance issues and right now i have up to 65 fps.

Roguelike – Vote for a best 2011 roguelike game

ASCII Dreams blog opening voting  for a title of a best roguelike game 2011.

There is 3 candidates from ex-USSR:

  • Fall from the Heaven
  • Ignite
  • Rayel
Feel free to learn more about them and “поддержи отечественного производителя:D

Ignite – dungeon types and new monster tiles

Right now Ignite have several “dungeon” types:

  • Ordinary caves and forts – they have full variety of monsters
  • Vermin cave
  • Insectoid hive
  • Kobold cave and outpost
  • Haunted castle – castle full of ghosts and wraiths

This dungeons are fully random generated and can be found while exploring the main map. They have various difficulty.

 

New monsters tile:


Fire and unholy fiend (looks like an alien, but i was trying to draw a kobold :D )


Some kind of worm

Ignite – monster information

(click to enlarge)

Ignite – new dungeon tileset

New tile shading (more sharp and a lot less edgy)

(click to enlarge)

Ignite – Tile shading

Hello! I have implemented new way of tile shading today. I was done a big work today to make such pictures posible:

As you see there is no more square fog/shadow tiles.

World generation – Dungeons access from main map

Now dungeons generated and can be accessed from main map:

All location will have unique name from now. How about to explore Forsaken Temple of Terrible Madness near the Helun Bay village ?

How to improve perfomance of GDI+ using C#

I’m not good at annotations and in english, so there will be only a useful tips. All of this has been discovered through the development process of my roguelike game – Ignite.

1. Use next combination of parameters:

C#
1
Graphics buffer;

C#
1
2
3
buffer.InterpolationMode = InterpolationMode.NearestNeighbor;
buffer.CompositingQuality = CompositingQuality.HighSpeed;
buffer.SmoothingMode = SmoothingMode.None;

C#
1
buffer.TextRenderingHint = TextRenderingHint.SingleBitPerPixel;

InterpolationMode.NearestNeighbor will ruin your image if there will be any interpolation, BUT there will be no need in interpolation if you will draw your image with original size. Also, InterpolationMode.NearestNeighbor is a number one parameter if you want to achieve “cool” 8-bit pixeling effect.

CompositingQuality.HighSpeed and SmoothingMode.None will give you 1-2 fps.

TextRenderingHint.SingleBitPerPixel I don`t think that any fps improvement can be achieved by this parameter. TextRenderingHint.SingleBitPerPixel will make your fonts to look crapy.

2. While double buffer – apply parameters from above to main buffer too. This will give you a good improvement.

3. Do not use Graphics.DrawImageUnscalled(…)! Instead use Graphics.DrawImage(Image, Point, Size) OR even Graphics.DrawImage(Image, Point). Make sure that dpi resolution of your image are same as resolution of your layer.

4. Always use 32bit (PixelFormat.32bppPArgb) images for maximum drawing speed of your application. You can convert to 32 bit image runntime using this code:

// Convert to 32bppPArgb for speed.
// = 32 bits per pixel, premultiplied alpha
if (sourceImage.PixelFormat != PixelFormat.Format32bppPArgb)
{     
SImage original = sourceImage;     
SImage backImage = new Bitmap(original.Width, original.Height, PixelFormat.Format32bppPArgb);      using (Graphics g = Graphics.FromImage(backImage))
      g.DrawImage(original, new Rectangle(0, 0, original.Width, original.Height));      
sourceImage = backImage;     
original.Dispose();
}

Make sure thal all your surfaces(main surface, double buffer etc.) are 32bppPArgb too.

By changing image PixelFormat i went from 20 fps to 65 in my application.

6. If you have something that is invisible to player – do not draw it!

7. Do not rotate or scale images at runtime. If you need to, try to do it in another thread.

8. Do not draw a part of an image. If you want to animate some image, have a new image for every frame.

9. When you get tired with “GDI+ perfomance” use directX or OpenGL for your projects (:

World Generation: Temperature – Cold

Snow and ice mass generation

Soft edge of a tile.

Not a big progress on a world generation, only made more soft edges of tiles. I think that they are looks good now.

(click to enlarge)

Image updated: first settlement (a desert camp) added to a map.