• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Generating maps?

After a small talk with people on otland discord I managed to rewrite threading system. Now it uses 240MB of RAM instead of 1,4GB (as before) to create tiles (on 1000x1000x2 testing area).

working on reading brushes from RME XML files (including extensions)
(prints things found in my 9.6 extensions file)
IbRPlfm.jpg
 
Last edited:
Hmm sometimes i observe what's happen here with this system. Zbizu is doing a good work with this system. From my observations it wil be a good system for instances.
 
bump
branch detection done
Code:
function isElderBerry()
	for line in io.lines('data/actions/actions.xml') do
		if line:match('<action%s') then
			if line:match('event=') then
				return true
			end
			return false
		end
	end
end

if isElderBerry() then
	-- declare kompots (compats)
end
 
Last edited:
Nice, i was trying to make something like this but got stuck on the simplest task: autoborder/wall
If i remember correctly when i last saw your script it didnt have it either (maybe another version?) You've improved it a lot

Here's another technique in case you havent seen it
https://gamedevelopment.tutsplus.co...sp-trees-to-generate-game-maps--gamedev-12268
I used 2x2 squares to recognize tiles, but it was very limited (16 cases and lots of overlays)
Now I'm working on switching to 3x3 (like RME when you place 1 sqm with autoborder on) but it's still a bit glitchy (256 cases to define manually - it gives an opportunity to use different bordering styles). I still need to improve/fix z-order, though(placing borders on 1 sqm in correct order).
 
I was trying to make it a brush like RME too, for example with buildings:
You set a pallete
You set a position "p" (the tile where you would click on RME)

Then it would just iterate over the 3x3 surrounding tiles
PHP:
local pallete = {3454, 3463, 3473, 3464} -- horizontal, vertical, corner, pole

function draw(cid, brush)
   for i=-1, 1  do
      for j=-1, 1 do
         local p = getPlayerPosition(cid)
         p.x = p.x+i
         p.y = p.y+j
         -- doRemoveItem(getThingFromPos(p).uid)
         local dir = getDirectionTo(p, getPlayerPosition(cid))
         if dir == NORTHWEST then
            doCreateItem(brush[3], 1, p)
         elseif (dir == NORTH) or (dir == SOUTH) or (dir == SOUTHWEST) then
            doCreateItem(brush[1], 1, p)
         elseif (dir == WEST) or (dir == EAST) or (dir == NORTHEAST) then
            doCreateItem(brush[2], 1, p)
         elseif (j == 0) and (i == 0) then

         else
            doCreateItem(brush[4], 1, p)
         end
         doSendMagicEffect(p, 1)
      end
   end
end

of course it doesn't check and remove yet but it seems to work
 
@LaloHao I know. I was working on copying the way rme brushes work.
I just don't have as much time as I used to.
 
Gonna bump this to see if anything more has been done on this project
 
autoborder done, I guess
kJBU6cI.jpg


It's been a while since I have been working on it.

Edit:
To do for autoborder: outer brush only when set outer to "none"
pass custom brushes instead of pre-loaded

Edit 2:
goals in first post updated

Edit 3 (2nd dec):
my autoborder is complete garbage and further copying rme behaviour is hard to code at this point
I have come up with a better solution which will treat tiles with no brush (aka "none" brush) special way
rewriting autoborder and z-order sorting from scratch
(don't worry, it will work as RME)

Edit 4 (6th dec):
Got autoborder to work again. Now it's working as intended (so far).
 
Last edited:
bump
found some cool resources for land and caves generating (I will try them later myself):
http://codereview.stackexchange.com/questions/128557/implementing-the-proper-undeads-cave-generator (looks like hellgate tunnels, doesn't it?)
http://web.archive.org/web/20110809084421/http://properundead.com/2009/03/cave-generator.html (fractal can be pretty good for lands after smoothing)
https://github.com/RhiannonMichelmore/lua-cave-gen (too bad this one has dead cells)
https://love2d.org/forums/viewtopic.php?t=79276 (not really going to check this one, just leaving it here as one of ideas)
http://www.playwithlua.com/?p=13 (this one looks pretty good)
 
Last edited:
Basically I'm looking for ideas to build best possible core for this system, because it's too hard to configure it so far. It doesn't have to be fast, it has to run smoothly.
[/code]
try pixel dungeon from watabou on android :)
 
try pixel dungeon from watabou on android :)
I can't find a file responsible for map generating.
Java is confusing to me.

Going to try fractal today.
 
Last edited:
ok fixed stripes (somehow)
now how to get rid of this effect?
fJuEnGG.jpg


@Crypton3 Midpoint displacement is better (than perlin noise) for online servers as it's easier to slice into events.
 
Back
Top