MCPcopy Create free account

hub / github.com/cxong/gomapgen / functions

Functions105 in github.com/cxong/gomapgen

↓ 45 callersMethodsetTile
(x, y int, tile rune)
gmgmap/map.go:106
↓ 35 callersMethodgetTile
(x, y int)
gmgmap/map.go:99
↓ 27 callersMethodLayer
Layer - get a map layer by name If it doesn't exist, add the layer
gmgmap/map.go:80
↓ 13 callersMethodisClear
Check if rectangular area is clear, i.e. only composed of nothing tiles
gmgmap/map.go:261
↓ 12 callersFunctionhasSameTile
(m Map, x, y int, tile rune)
gmgmap/tmx.go:431
↓ 10 callersFunctionNewMap
NewMap - create a new Map for a certain size
gmgmap/map.go:62
↓ 9 callersMethodIsLeaf
()
gmgmap/util.go:157
↓ 9 callersMethodisIn
(x, y int)
gmgmap/map.go:121
↓ 9 callersMethodrectangle
Draw a rectangle - optional filled
gmgmap/map.go:135
↓ 9 callersMethodsetTile
(t *villageTile, x, y int)
gmgmap/village.go:265
↓ 8 callersFunctionIsWall
IsWall - whether a tile is a wall type
gmgmap/map.go:289
↓ 7 callersMethoddAlong
()
gmgmap/bspinterior.go:14
↓ 7 callersMethodget
(x, y int)
gmgmap/wfcshop.go:197
↓ 6 callersMethodfill
Fill the map with a single tile type
gmgmap/map.go:126
↓ 6 callersFunctionhasTile
(l Layer, x, y int)
gmgmap/bsp.go:261
↓ 6 callersFunctionimax
(i1, i2 int)
gmgmap/util.go:72
↓ 6 callersFunctionimin
(i1, i2 int)
gmgmap/util.go:65
↓ 6 callersMethodisConnected
()
gmgmap/rogue.go:254
↓ 6 callersMethodrectangleFilled
(r rect, tile rune)
gmgmap/map.go:145
↓ 4 callersMethodcollapsedValue
()
gmgmap/wfcshop.go:177
↓ 4 callersFunctionrandomWalk
(rr *rand.Rand, x, y, w, h int)
gmgmap/util.go:37
↓ 3 callersMethodConnect
(i, j int)
gmgmap/bspinterior.go:38
↓ 3 callersMethodIsAdjacent
(r2 rect, overlapSize int)
gmgmap/util.go:17
↓ 3 callersMethodPrint
Print - print map in ascii, with a border
gmgmap/map.go:191
↓ 3 callersMethodSplitHorizontal
Split rooms horizontally (left + right children)
gmgmap/util.go:126
↓ 3 callersMethodSplitVertical
Split rooms horizontally (top + bottom children)
gmgmap/util.go:142
↓ 3 callersFunctionaddCorridor
Add a corridor with two turns This can connect any two points; the S-shaped turn occurs at the middle
gmgmap/map.go:300
↓ 3 callersFunctionaddStraightCorridor
Add a corridor, to a ground and structure layer The corridor will be drawn in two directions, from a central point outwards The ground tile will be dr
gmgmap/bsp.go:174
↓ 3 callersFunctionapplyCollapsedValue
(x, y int, t rune, g, s, f *Layer)
gmgmap/wfcshop.go:151
↓ 3 callersFunctionbspRoomRoot
(width, height int)
gmgmap/util.go:105
↓ 3 callersMethoddAcross
()
gmgmap/bspinterior.go:21
↓ 3 callersMethodisCollapsed
()
gmgmap/wfcshop.go:186
↓ 3 callersMethodrectangleUnfilled
(r rect, tile rune)
gmgmap/map.go:149
↓ 3 callersMethodsetTileInAreaIfEmpty
(rr *rand.Rand, r rect, tile rune)
gmgmap/map.go:110
↓ 3 callersMethodtile
(x, y int)
gmgmap/map.go:413
↓ 3 callersMethodtile
(x, y int)
gmgmap/village.go:258
↓ 3 callersFunctiontryConnect
(connected []connectInfo, x, y, x1, y1, index, index2 int)
gmgmap/rogue.go:260
↓ 2 callersFunctionAbs
Abs - absolute value, integer
gmgmap/util.go:162
↓ 2 callersMethodIsConnected
(i, j int)
gmgmap/bspinterior.go:43
↓ 2 callersFunctionIsDoor
IsDoor - whether a tile is a door type
gmgmap/map.go:294
↓ 2 callersMethodSplit
(rr *rand.Rand, i, minRoomSize, maxRoomSize int)
gmgmap/util.go:109
↓ 2 callersMethodallConnected
()
gmgmap/rogue.go:257
↓ 2 callersFunctioncapStreet
(g, s *Layer, streets []bspArea, st bspArea, end, dAcross, dAlong vec2, corridorWidth, corridorLevelDiffBlock
gmgmap/bspinterior.go:387
↓ 2 callersMethodcountTiles
Count the number of tiles around a tile that match a certain tile Boundary tiles count
gmgmap/map.go:274
↓ 2 callersFunctiondrawInDirection
(g, s *Layer, startX, startY, dx, dy int, tile, wall rune)
gmgmap/bsp.go:181
↓ 2 callersFunctionfindDeepestRoomFrom
(areas []bspArea, child int)
gmgmap/bspinterior.go:419
↓ 2 callersFunctiongetXRange
(l Layer, r rect)
gmgmap/bsp.go:140
↓ 2 callersFunctiongetYRange
(l Layer, r rect)
gmgmap/bsp.go:154
↓ 2 callersFunctionhasNeighbouringTile
(l Layer, x, y, dx, dy int)
gmgmap/bsp.go:236
↓ 2 callersFunctioniclamp
(v, min, max int)
gmgmap/util.go:79
↓ 2 callersFunctionirand
(rr *rand.Rand, min, max int)
gmgmap/util.go:90
↓ 2 callersFunctionplaceInsideRoom
(s *Layer, r rect, t rune)
gmgmap/bspinterior.go:444
↓ 2 callersFunctionplacePaths
(g, s *Layer, world villageWorld, usage0, usage1, usage2, usage3 rune)
gmgmap/village.go:167
↓ 2 callersMethodset
(x, y int, sp Superposition)
gmgmap/wfcshop.go:201
↓ 1 callersFunctionNewBSP
NewBSP - generate a new dungeon, using BSP method
gmgmap/bsp.go:6
↓ 1 callersFunctionNewBSPInterior
NewBSPInterior - Create new BSP interior map Implementation of https://gamedev.stackexchange.com/questions/47917/procedural-house-with-rooms-generator
gmgmap/bspinterior.go:49
↓ 1 callersFunctionNewCellularAutomata
NewCellularAutomata - create a stone-on-floor map using cellular automata For a number of repetitions: If the number of stones within one step (includ
gmgmap/cellular_automata.go:15
↓ 1 callersFunctionNewInterior
NewInterior - create a building interior layout map. The layout has a "lobby", multiple rooms that all connect to the lobby. Idea taken from http://ww
gmgmap/interior.go:18
↓ 1 callersFunctionNewRandomWalk
NewRandomWalk - create a tree-on-floor map using random walk algorithm
gmgmap/random_walk.go:6
↓ 1 callersFunctionNewRogue
NewRogue - generate a new Rogue-like map, with rooms connected with tunnels
gmgmap/rogue.go:13
↓ 1 callersFunctionNewShop
NewShop - create a single shop, surrounded by road tiles. A shop contains the following elements: - Road around grass, with floor interior - Walls - C
gmgmap/shop.go:28
↓ 1 callersFunctionNewVillage
NewVillage - create a village, made up of multiple buildings
gmgmap/village.go:22
↓ 1 callersFunctionNewWFCShop
WFCShop - create a single shop, surrounded by road tiles. The interior is filled using Wave Function Collapse, with these rules: - Road on the edge -
gmgmap/wfcshop.go:42
↓ 1 callersMethodOverlaps
(r2 rect)
gmgmap/util.go:28
↓ 1 callersMethodToTMX
ToTMX - export map as TMX (Tiled XML map)
gmgmap/tmx.go:85
↓ 1 callersFunctionaddBuilding
(g, s, f *Layer, r rect, tileRoom, tileWall rune, hasSign bool)
gmgmap/village.go:197
↓ 1 callersMethodaddNPC
(rr *rand.Rand, c *Layer)
gmgmap/village.go:16
↓ 1 callersMethodaddPath
Use A* to find and return a path between two points A* will avoid any tiles where there's something in the structure (s) layer
gmgmap/village.go:286
↓ 1 callersFunctionaddPaths
(rr *rand.Rand, m *Map, exportFunc func(*Map), g, s *Layer, buildings []building)
gmgmap/village.go:98
↓ 1 callersFunctionassignBuildingImportance
(rr *rand.Rand, buildings []building)
gmgmap/village.go:77
↓ 1 callersFunctioncanDrawInDirection
(g Layer, startX, startY, dx, dy int)
gmgmap/bsp.go:215
↓ 1 callersMethodcountCollapsed
Count the number of collapsed values around a tile that match a certain tile Boundary tiles don't count
gmgmap/wfcshop.go:207
↓ 1 callersMethodentropy
()
gmgmap/wfcshop.go:166
↓ 1 callersFunctioneuclideanDistance
(x1, y1, x2, y2 int)
gmgmap/util.go:173
↓ 1 callersMethodfloodFill
Perform a flood fill starting from a location Floods up, down, left and right
gmgmap/map.go:155
↓ 1 callersFunctiongenBuildings
(rr *rand.Rand, width, height, buildingPadding int)
gmgmap/village.go:44
↓ 1 callersFunctionget16Tile
(m Map, x, y int, tile rune, templateTiles *[16]string)
gmgmap/tmx.go:316
↓ 1 callersFunctionget16Tile2
(m Map, x, y int, tile rune, templateTiles *[16]string)
gmgmap/tmx.go:373
↓ 1 callersMethodgetUsage
(x, y int)
gmgmap/village.go:280
↓ 1 callersMethodincUsage
(x, y int)
gmgmap/village.go:276
↓ 1 callersFunctionmanhattanDistance
(x1, y1, x2, y2 int)
gmgmap/util.go:169
↓ 1 callersFunctionnewAdjacencyMatrix
(x int)
gmgmap/bspinterior.go:30
↓ 1 callersFunctionnewLayer
(name string, width, height int)
gmgmap/map.go:69
↓ 1 callersFunctionnewSuperpositions
(m *Map)
gmgmap/wfcshop.go:222
↓ 1 callersFunctionnewVillageWorld
(w, h int, s *Layer)
gmgmap/village.go:248
↓ 1 callersMethodnumConnections
Don't count edges as connections
gmgmap/rogue.go:238
↓ 1 callersFunctionplaceBuildings
(m *Map, exportFunc func(*Map), g, s, f *Layer, buildings []building)
gmgmap/village.go:84
↓ 1 callersFunctionplaceNPCs
(rr *rand.Rand, m *Map, exportFunc func(*Map), c *Layer, buildings []building)
gmgmap/village.go:187
↓ 1 callersFunctionpopulateTemplate
(rr *rand.Rand, m Map, tmp *TMXTemplate)
gmgmap/tmx.go:171
↓ 1 callersMethodremoveLayer
(name string)
gmgmap/map.go:90
↓ 1 callersFunctionrep
(l *Layer, r1, r2 int)
gmgmap/cellular_automata.go:84
↓ 1 callersMethodsetTile
(t *Tile, x, y int)
gmgmap/map.go:420
↓ 1 callersFunctionunplacePaths
(s *Layer, usage0 rune)
gmgmap/village.go:154
MethodPathEstimatedCost
PathEstimatedCost - heuristic cost of path for astar, using manhattan distance
gmgmap/map.go:405
MethodPathEstimatedCost
(to astar.Pather)
gmgmap/village.go:241
MethodPathNeighborCost
PathNeighborCost - cost of traveling to neighbour for astar
gmgmap/map.go:400
MethodPathNeighborCost
(to astar.Pather)
gmgmap/village.go:235
MethodPathNeighbors
PathNeighbors - Get neighbours for astar pathfinding
gmgmap/map.go:384
MethodPathNeighbors
()
gmgmap/village.go:220
MethodPrintCSV
PrintCSV - print raw rune values as CSV
gmgmap/map.go:237
next →1–100 of 105, ranked by callers