FAQ  •  Register  •  Login

BTB - Organic Blocks - Qui - levelgen

<<

Qui

User avatar

Posts: 150

Joined: Thu Mar 11, 2010 12:44 pm

Post Tue Oct 05, 2010 8:13 pm

BTB - Organic Blocks - Qui - levelgen

By no means inspired by a persisting minecraft addiction. This post now with 100% fewer lies, guaranteed. And now back to your previously scheduled verifiable post content. The level is shorter than the levelgen, which is always a good sign. Alright, maybe that second part is totally true as well. Which means it is not, or something. Honest. But seriously, folks, if you can come up with a more efficient levelgen that does the same thing, I will be very, very surprised and incredibly annoyed. Truly this time. Not really.
  Code:
GameType 4 20
LevelName Organic Blocks
LevelDescription
LevelCredits
Script orgo.levelgen
GridSize 255
MinPlayers 0
MaxPlayers 0
Team Bacteriums 0 0.8 0.3
BarrierMaker 50 -0.3 5.6  5.5 5.6  5.5 -0.2  -0.3 -0.2  -0.3 5.6
Spawn 0 0 0.1
Spawn 0 0 5.3
Spawn 0 5.2 5.3
Spawn 0 5.2 0.1
 

And, of course, the levelgen.
  Code:
local rows = {}
local rowsb = {}
for i = 1, 25 do
    rows[i] = {}
    rowsb[i] = {}
    for j = 1, 25 do
        rows[i][j] = math.random(10)
        rowsb[i][j] = rows[i][j]
    end
end

for i = 1, 25 do
    for j = 1, 25 do
        if(i-1 >= 1) then
            rowsb[i][j] = rowsb[i][j] + (rows[i-1][j])/2
        end
        if(i+1 <= 25) then
            rowsb[i][j] = rowsb[i][j] + (rows[i+1][j])/2
        end
        if(j-1 >= 1) then
            rowsb[i][j] = rowsb[i][j] + (rows[i][j-1])/2
        end
        if(j+1 <= 25) then
            rowsb[i][j] = rowsb[i][j] + (rows[i][j+1])/2
        end
        if (rowsb[i][j] >= 19) then
            levelgen:addLevelLine("BarrierMaker 50 " .. i/5 .. " " .. j/5 .. " " .. i/5 .. " " .. (j + 1)/5)
        end
    end
end
Qui ckRime
<<

ZoombeR

Posts: 1036

Joined: Fri Jun 04, 2010 11:56 pm

Post Wed Oct 05, 2011 10:47 pm

Re: BTB - Organic Blocks - Qui - levelgen

Very interesting. I want to encourage other to go to levelgens. Once you figure them out, they're easy as jack from there. We don't have enough levelgens, and our map collection would certainly get better with more.
<<

Quartz

User avatar

Posts: 901

Joined: Thu Jun 17, 2010 12:14 am

Location: Texas

Post Wed Feb 13, 2013 12:58 am

Re: BTB - Organic Blocks - Qui - levelgen

This is good, I like this.
Exploits of Quartz and bobdaduck - Pleiades Maps
19-year-old Quartz mad about lawn removal
raptor wrote:sometimes I think getting Quartz to use plugins is like getting my mom to use a computer

Return to Bitmatch

Who is online

Users browsing this forum: No registered users and 1 guest

cron