Making of a Maze Game RRS feed

  • General discussion

  • In this thread I'd like to introduce making of a maze game.

    Latest version: Maze Game 1.56 (XHL585-5)

    Maze 0.3 ... Published as a example of Graphical Challenge 3 in Challenge of the Month - August 2012.
    Maze 1.2 ... Introduced as "Turtle Maze" in Small Basic Blog.
    Maze Game 1.3b ... Published as game beta version.
    Maze Game 1.56 ... Completed game version.

    Screen shot of a maze program

    Nonki Takahashi

    Friday, November 23, 2012 12:02 AM

All replies

  • About Maze 1.2:

    Maze 0.3 doesn't work properly in web browser with Silverlight. So, I rewrote it to work in browser and the output is Maze 1.2.

    Maze 1.2 is a program just make a maze and resolve by itself using Turtle.

    I received requests for this program via Small Basic Blog.  That are:

    1. Can we have another button where the user gets to control the turtle? Maybe with the arrow keys?
    2. Maybe time the user so that we can compare top scores of times it took us to beat it?
    3. After the turtle finishes or we finish, could it refresh itself back to the beginning so that we could play again?
    4. Less important, but it would be interesting to add some more AI on that turtle when he tries to complete the maze (other than or in addition to the "turn right" method).

    Then, I decided to revise this program as a maze game.

    Nonki Takahashi

    Friday, November 23, 2012 12:16 AM
  • Technical Issues:

    1. How to create or solve a maze?
    There are many ideas in Wikipedia.

    2. What are needed for Silverlight environment?
    I wrote an article titled "Local (Small Basic IDE) vs Remote (Silverlight)" in a forum thread "Bugs to Fix for Version 1.1 (continued)".

    3. Turtle disappears after clear
    Turtle disappears after calling GraphicsWindow.Clear().  But we need GraphicsWindow.Clear() to remove lines drawn by Turtle.  So, I think only the way to restart Turtle for the game is not to use pen of the Turtle.

    4. How to control Turtle
    I'd like to use arrow keys to control Turtle.  Arrow keys are recognized by using GraphicsWindow.KeyDown = OnKeyDown.  (OnKeyDown is a key event handling subroutine.)

    5. How to save score
    Score will be saved in setting file.

    Nonki Takahashi

    Friday, November 23, 2012 12:42 AM
  • Create Another Turtle:

    I'm going to make another turtle for human player.  Following steps are plan to create it.

    1. Make a program to show turtle.

    ' Show Turtle to Capture
    tx = Turtle.X
    ty = Turtle.Y
    s = 18            ' set frame size
    x1 = tx - s / 2
    x2 = tx + s / 2
    y1 = ty - s / 2
    y2 = ty + s / 2
    GraphicsWindow.BrushColor = "Gray"
    GraphicsWindow.PenWidth = 0
    GraphicsWindow.FillRectangle(x1, y1, 1, s)      ' draw frame
    GraphicsWindow.FillRectangle(x1, y1, s, 1)
    GraphicsWindow.FillRectangle(x2, y1, 1, s)
    GraphicsWindow.FillRectangle(x1, y2, s, 1)
    GraphicsWindow.FillRectangle(tx, y2, 1, s / 2)  ' draw center
    GraphicsWindow.FillRectangle(x2, ty, s / 2, 1)
    GraphicsWindow.FillRectangle(tx, y1 - s / 2, 1, s / 2)
    GraphicsWindow.FillRectangle(x1 - s / 2, ty, s / 2, 1)

    2. Capture original turtle using [Alt]+[Print Screen] key.

    3. Create a bitmap of original turtle using Paint program.

    Original Turtle Image

    4. Make a program to change turtle color.  --> I made a tool (SDH367) for this.

    5. Capture new turtle using [Alt]+[Print Screen] key.

    6. Create a bitmap of another color turtle using Paint and GIMP2.

    Another Turtle

    7. Use the bitmap as image shape.  --> I made a sample program (CQV406-0).

    Nonki Takahashi

    • Edited by Nonki Takahashi Wednesday, November 28, 2012 10:52 AM new turtle
    Friday, November 23, 2012 2:44 AM
  • Awesome! Do you want to send it to the gallery? Maybe call it "Maze 1.3"?


    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Twitter, Wiki)

    Saturday, November 24, 2012 4:43 AM
  • Yes.  I will rename Maze to Maze Game.  Maze 1.2 in the gallery should be replaced by new one.


    Nonki Takahashi

    Sunday, November 25, 2012 11:44 PM
  • I published a game version of Maze as  Maze Game 1.3b (PNC833-14).

    This is still beta (not completed) and has following known issue.

    • CPU's Turtle position is displayed.
    • Score / record are not saved.
    • Not working properly in browser.

    You can control player's Turtle with arrow keys.

    Screen shot of Maze Game 1.3b

    Nonki Takahashi

    Monday, December 3, 2012 1:32 AM
  • I published completed version as XHL585-5.

    Have fun!

    Screen shot of Maze Game 1.56

    * In browser, click maze once before using arrow keys.
    * In local, remove comment lines for File objects.

    Nonki Takahashi

    Monday, December 3, 2012 3:00 PM