Jump to content

  • Log In with Google      Sign In   
  • Create Account

Robot University -- a 2D DirectX Puzzle

Graph Maze Days 13-18

Posted by , 23 December 2015 - - - - - - · 642 views

Day 13, 14
Wrote section that generates the maze


Day 15, 16, 17, 18
Wrote section that finds solution
Posted Image

Graph Maze Days 10, 11, 12

Posted by , 17 December 2015 - - - - - - · 589 views

Day 10
Made the program assign numbers to all cells
and write edge numbers into cells.


Posted Image


Days 11, 12
Made the program find connections between cells.


Posted Image

Graph Maze Days 8, 9

Posted by , 12 December 2015 - - - - - - · 700 views

Day 8
Made the program assign numbers to all vertices.


Day 9
Made the program assign numbers to all edges.
Posted Image

Graph Maze

Posted by , 10 December 2015 - - - - - - · 664 views

It's been 15 months since I last posted. My new project is Graph Maze, which I have been designing in my head for many years. It is similar to Amorphous Maze in that the walls are at arbitrary angles, but different in that the locations are pre-set by a template created with a CAD program.


Day 1
To make a maze out of a mesh, must convert mesh to cells and walls. But finding islands from an interconnected graph may be very complicated. This has been the major reason for not wanting to start this project. Then I came to a realization that I can defer this task by manually drawing closed polygons in the CAD program. Things are starting to get exciting.


Day 2
Drew a test shape and wrote a DXF parser in Perl. My parser does not strictly follow the standard, but good enough for my purpose.


Day 3
Broke VS2010 by trying to add a feature. Installer would always leave out some needed include files. Spent hours removing and re-installing VS to no avail. Must be a MS bug. Gave up because the night was getting late. Posted Image


Day 4
Searched the web for discussions on cases similar to mine. Found a solution on stackoverflow, which involved editing the registry.Did that, and the problem went away Posted Image


Day 5
Will write code in MFC. Cut-and-pasted the parsed data into a pre-initialized array. Tried to draw it on screen in MM_ISOTROPIC map mode. Something is not right with how I use SetViewportOrg.


Day 6
Figured out SetViewportOrg. Output looks like this:
Posted Image
While only a fraction is done, having something to look at keeps the motivation up.


Day 7
Decided to start writing Developer Journal.

Hexadecagon Maze Day 10

Posted by , 15 September 2014 - - - - - - · 570 views
Hexadecagon, 88 Maze and 5 more...
Day 10

In the past few days I added the ability to print. I tested with only one printer so it would be nice if you (a GameDev member) can tell me if it worked with your printer. I will leave a copy of a beta version here for a few weeks:

http://members.gamedev.net/puz/88maze101.zip (75KB)

If you have Windows 7 or 8.1, program should just run. If you have XP, you may need MFC100.DLL and MSVCR100.DLL.

I welcome any type of suggestions for improvement. Thank you.

Hexadecagon Maze Day 9

Posted by , 10 September 2014 - - - - - - · 540 views
Hexadecagon, Maze, Visual Studio and 3 more...
Day 9

In the past 3 days, I added the ability to save the maze image to a bitmap file. Previously I used 96 DPI, which seems to be Windows' default, but this time I realized I can specify any DPI I want to in a bitmap file, so I picked 150 DPI because I thought it was a good compromise between resolution and file size. Then I decided to make the printable area of a letter size paper 8"x10", which results in 1200x1500 pixels -- a nice round number. I generated 10 mazes and saved them into a single PDF file.

You can get it here: http://www.puz.biz/sw/88maze/88m_10free.htm

Going back to Day 8, I tried out slayemin's suggestion by manually filling the centers with colors (Figure (16)). Does it look better? Note that this feature is not in the code yet; I wanted to first get people's opinions.

Figure (16)
Posted Image

Hexadecagon Maze Day 8

Posted by , 06 September 2014 - - - - - - · 1,125 views
Hexadecagon, Maze, Visual Studio and 3 more...
Day 8

I have not reported for about a week. I was spending all of my time refactoring, breaking, and fixing the code. That's why there were no visible progresses to report. But after that, I added the ability to find the solution. Figure 16 is a sample without the solution.

Figure (16)
Posted Image

If you have time, please try solving. Note that this is a 2-D maze, so no crossing over or under is allowed, although some places may look like bridges.

If you need to see the solution, please click here.

Since I see a lot of number "88" in the maze, I might rename "Hexadecagon Maze" to "88 Maze". What do you think?

Hexadecagon Maze Day 7

Posted by , 28 August 2014 - - - - - - · 502 views
Hexadecagon, Maze, Visual Studio and 3 more...
Day 7

Today I mixed GDI+ with MFC so that I can antialias my lines. Here are the before and after pictures:

Posted ImagePosted Image

I see an improvement in quality. I probably should revisit my old mazes and add antialiasing. Like this one.

December 2016 »

4567 8 910

Recent Entries

Recent Comments

Recent Entries

Recent Comments