Jump to content

File:Isometric DFS Maze.PNG

From Wikipedia, the free encyclopedia

Isometric_DFS_Maze.PNG (800 × 407 pixels, file size: 23 KB, MIME type: image/png)

Summary

[edit]
File information
Description

An isometric maze created using a FS.

Source

I (Joe D (talk)) created this work entirely by myself.

Date

00:55, 19 October 2009 (UTC)

Author

Joe D (talk)

Permission
(Reusing this file)

See below.


Code

[edit]
// Created using BYOND
// http://www.byond.com/?page=Developers

proc/Maze(turf/floor/T)
  T.visited=1
  var/list/L=list()
  for(var/i=0,i<4,i++)
    if(get_step(T,2**i))
      L+=get_step(T,2**i)
  var/runtime=L.len
  for(var/i=0,i<runtime,i++)
    var/turf/floor/n = pick(L)
    if(!(n.visited))
      var/tdir=get_dir(T,n)
      var/ndir=get_dir(n,T)
      var/obj/wall/W=T.walls[log(2,tdir)+1]
      del W
      W=n.walls[log(2,ndir)+1]
      del W
      Maze(n)
    L.Remove(n)

turf
  floor
    luminosity=0
    icon_state="floor"
    var
      visited=0
      list/walls=list()
    New()
      for(var/i=0,i<4,i++)
        var/obj/wall/OW
        if(get_step(src,2**i))
          var/turf/floor/adj=get_step(src,2**i)
          if(adj.walls.len>(log(2,get_dir(src,adj))+1))
            OW=adj.walls[log(2,get_dir(src,adj))+1]
        var/obj/wall/W=new
        W.dir=2**i
        if(2**i==2)
          W.layer+=2
        if(OW)
          W.icon_state="null"
        contents+=W
        walls+=W


obj
  wall
    icon_state="wall"

Licensing

[edit]

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current00:55, 19 October 2009Thumbnail for version as of 00:55, 19 October 2009800 × 407 (23 KB)JDougherty (talk | contribs){{Information |Description = An isometric maze created using a FS. |Source = I (~~~) created this work entirely by myself. |Date = ~~~~~ |Author = ~~~ }}
No pages on the English Wikipedia use this file (pages on other projects are not listed).