Debuging UserControl when the designer crash…

Do you ever happened to make an UserControl and when you want to use it in the designer, Visual Studio crash? This is what happened recently for a control in the Dungeon Eye project. Even using the debug mode in Visual Studio (devenv.exe / log), no way to find the exact location of the bug. No messages, no reports, only a restart of the application. In the worst case, your settings reopens the bogus file when you reopen your project. Welcome to an endless crash loop !

Debuging using MessageBox.Show() is not very practical, very slow and not really user friendly… So why not use Visual Studio to debug Visual Studio ? Here’s how :

    • Launch Visual Studio in normal mode and open your project.
    • Start another instance of Visual Studio and go to the Debug menu and ‘Attach to process …’

    • Select the first instance of your Visual Studio

  • Click on ‘Attach’

Now, make your UserControl crash and, now you can debug it !

[Photo]

Tags:

Dungeon Eye website


 
As the project slowly grows and more and more people are following the project, I decided to host the project on its own website. You will find there specific informations about the game, its progress…
 
The new web site can be reached at www.dungeoneye.net
 
Spread the word and happy gaming !

Tags:

Request for ideas

02/03/2011 un commentaire

We Want You

A new poll is up asking you for options, additions, ideas you would like to see in future versions of the game. For example:

  • multiplayer : you can play several simultaneously. You can consider several modes : capture the flag, cooperative, time attack…
  • merchant : to buy or sell items
  • Cities with inns to hire new heros, like in Ishar
  • More dialog part
  • Automap option where you can leave comments and share with other players

We look forward to your comments !

[Photo]

Tags:

Dungeon Eye beta 0.3.3 is out !

17/02/2011 3 commentaires

After months of silence, here’s a beta of Dungeon Eye.

Here’s ingame keys :

  • ‘F1′, ‘F2′, ‘T’ & ‘F’ changes current level
  • ‘insert’ runs the editor
  • ‘space’ displays some debug informations and the minimap
  • ‘a’, ‘z’, ‘e’, ‘q’, ‘s’, ‘d’ (european keyboard) to move in the game. You can change this layout in the main game menu (press ‘esc’ and then go to options)

Please, report any bug, crash, comment or suggestion to improve the game ! If you report crash, please attach ‘log.html’ file.

Tags:

New visuals

I’m currently working hard on the editor. Here’s some screens of the improvments :

A new release is expected by the end of the year.

Tags: ,

Hardware cursor in OpenGL

In my current game Dungeon Eye, I need to have a custom cursor. My first approach was to hide the system cursor and in every frame, draws my custom cursor at the mouse location. It’s quite easy but not perfect. You have some slowdowns as a side effect. Not perfect…

The solution is to have custom cursor. All that you have is an image of your cursor and the following code :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// <summary>
/// Creates a new hardware cursor
/// </summary>
/// <param name="bmp">Bitmap handle</param>
/// <param name="hotspot">Cursor hotspot</param>
/// <return>A Cursor handle</return>
static public Cursor HardwareCursor(Bitmap bmp, Point hotspot)
{
	User32.IconInfo tmp = new User32.IconInfo();
	User32.GetIconInfo(bmp.GetHicon(), ref tmp);
	tmp.xHotspot = hotspot.X;
	tmp.yHotspot = hotspot.Y;
	tmp.fIcon = false;
 
	return new Cursor(User32.CreateIconIndirect(ref tmp));
}

And now here’s the Platform Invocation Services :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 /// <summary>
/// 
/// </summary>
/// <param name="hIcon"></param>
/// <param name="pIconInfo"></param>
/// <returns></returns>
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetIconInfo(IntPtr hIcon, ref IconInfo pIconInfo);
 
/// <summary>
/// IconInfo
/// </summary>
[StructLayout(LayoutKind.Sequential)]
internal struct IconInfo
{
    /// <summary>
    /// Specifies whether this structure defines an icon or a cursor.
    /// A value of TRUE specifies an icon; FALSE specifies a cursor
    /// </summary>
    public bool fIcon;
 
    /// <summary>
    /// The x-coordinate of a cursor's hot spot
    /// </summary>
    public Int32 xHotspot;
 
    /// <summary>
    /// The y-coordinate of a cursor's hot spot
    /// </summary>
    public Int32 yHotspot;
 
    /// <summary>
    /// The icon bitmask bitmap
    /// </summary>
    public IntPtr hbmMask;
 
    /// <summary>
    /// A handle to the icon color bitmap.
    /// </summary>
    public IntPtr hbmColor;
}
 
/// <summary>
/// CreateIconIndirect
/// </summary>
/// <param name="icon"></param>
/// <returns></returns>
[DllImport("user32.dll")]
public static extern IntPtr CreateIconIndirect(ref IconInfo icon);

To use the new cursor, simply set the Cursor property of your Form with the created hardware cursor. It’s also possible with a little effort to use OpenGL texture (or sub part of it) as HardwareCursor.

For more informations, look at my HardwareCursor class.

OpenGL 3.0


Hi

I am trying to migrate gradually the entire framework to OpenGL 3.0 and dropping all deprecated functions. I did not think it could have given me so much work, but I do not lose hope.

In the meantime, here is my bookmark of all the sites that deals with OpenGL 3.x.

Stay tuned !

Tags:

Help needed !

20/02/2010 9 commentaires

As the Dungeon Eye remake grows, I need some help to get rid of the originals assets (it’s copyrigth protected and I don’t own the rights to the game). So, I’m actively looking for the following help :

  • 2d artist
  • Every visual need to be done (from the introduction sequence, to the ending game). The general atmosphere/feeling must be D&D to match the game plot.
    Right now, the game is in VGA mode (640×400), but I want it to be in XGA (1024×768) or better in SXGA(1280×1024).
    As long the file format is in PNG 32b with alpha transparency and the size is a power of two, you are free to use what ever you want (however, it’s better to use free softwares…).

  • Musician and sound artist(s)
  • From the ingame music to every little sound in the game.
    Currently, the framework supports only wave file. I can improve it to support other (open) audio format. As for the visual part, you are free to use whatever you want.

I’m looking only for one or two persons, no more. I don’t want this project to becomes too big for the moment. Every little help is welcome, even if you can make only one or two images or sound effects, it is always made of !

Tags:

Dungeon Eye 0.3 is out !

12/02/2010 2 commentaires

A new release of Dungeon Eye is available to download. Here’s a shot overview of the new features :
- Monster with basic ai
- Doors
- Pits
- Character generation
- You can use items and throw them in the maze (and occasionally hit monsters :))
- Built in editor (press ‘insert’ key anytime during the game)
- Internationalization (english and french for the moment).
- many other new good surprises…

Here’s a list of in game keys :
- ‘Space bar’ toggle the debug mode (maze map and monster ai)
- ‘T’ to teleport to the test maze
- ‘Escape’ to escape…
- ‘Insert’ to open the editor and edit assets

Some more hidden keys but at your own risks :)

Tags: ,

Duh ?!

Just for the fun, I apply a rotation to the display. Here’s the result :

I dare not imagine what would happen if it’s in motion ;)

Tags: