You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No print do mapa está reportando "?" pelo que eu venho debugando, está me parecendo ser um problema no ASC2.
Mas eu não tenho dominio completo para aformar. Segue código exemplo:
local astray = require('astray.astray')
-- Initialize generator with desired parameters
-- Note: Astray generates uneven-sized maps (e.g., 39x39 from 40x40 input)
local height, width = 40, 40
local generator = astray.Astray:new(
width/2-1, -- Map width
height/2-1, -- Map height
30, -- Change direction modifier (1-30)
70, -- Sparseness modifier (25-70)
50, -- Dead end removal modifier (50-99)
astray.RoomGenerator:new( -- Room generator configuration
4, -- Number of rooms
2, 4, -- Min/Max room width
2, 4 -- Min/Max room height
)
)
-- Generate dungeon
local dungeon = generator:Generate()
-- Convert to ASCII tiles
local tiles = generator:CellToTiles(dungeon)
-- Print the dungeon
for y = 0, #tiles[1] do
local line = ''
for x = 0, #tiles do
line = line .. tiles[x][y]
end
print(line)
end
Retorno:
The text was updated successfully, but these errors were encountered:
No print do mapa está reportando "?" pelo que eu venho debugando, está me parecendo ser um problema no ASC2.
Mas eu não tenho dominio completo para aformar. Segue código exemplo:
local astray = require('astray.astray')
-- Initialize generator with desired parameters
-- Note: Astray generates uneven-sized maps (e.g., 39x39 from 40x40 input)
local height, width = 40, 40
local generator = astray.Astray:new(
width/2-1, -- Map width
height/2-1, -- Map height
30, -- Change direction modifier (1-30)
70, -- Sparseness modifier (25-70)
50, -- Dead end removal modifier (50-99)
astray.RoomGenerator:new( -- Room generator configuration
4, -- Number of rooms
2, 4, -- Min/Max room width
2, 4 -- Min/Max room height
)
)
-- Generate dungeon
local dungeon = generator:Generate()
-- Convert to ASCII tiles
local tiles = generator:CellToTiles(dungeon)
-- Print the dungeon
for y = 0, #tiles[1] do
local line = ''
for x = 0, #tiles do
line = line .. tiles[x][y]
end
print(line)
end
Retorno:
The text was updated successfully, but these errors were encountered: