vxlgen, a labyrinth generator

Intended for use on live public servers.
13 posts Page 1 of 1 First unread post
ponce
Deuced Up
Posts: 50
Joined: Wed Apr 24, 2013 8:39 pm


Hi,

I've open-sourced my map generator used for this server http://www.buildandshoot.com/viewtopic.php?f=35&t=5239.

https://github.com/p0nce/vxlgen
Jdrew
Mapper
Mapper
Posts: 4808
Joined: Tue Oct 30, 2012 10:48 pm


mind posting some pics or a download of one of the maps?
learn_more
Coder
Coder
Posts: 891
Joined: Sun Mar 24, 2013 9:59 pm


jdrew wrote:
mind posting some pics or a download of one of the maps?
activate your brain and just look at the topic he linked?
ponce
Deuced Up
Posts: 50
Joined: Wed Apr 24, 2013 8:39 pm


Hi jdrew,
Here is a sample map: https://dl.dropboxusercontent.com/u/541786/sample.vxl
You can find some picture on Github https://github.com/p0nce/vxlgen
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


I take my hat off to you sir.
well done
ponce
Deuced Up
Posts: 50
Joined: Wed Apr 24, 2013 8:39 pm


Thanks. It was very fun to do. Now I have a lot more respect for the people who actually master procedural generation like in brogue or Dwarf fortress.

@Thepolm3, for now the server is a sort-of randomized 1ctf + grenade teleport but I would be interested to hear what game mode idea you come up with. Blue_Tongue
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


Hunted.
each player has only one player he can kill, and only one player that can kill him.
Run away from your hunter and go kill your prey
Been sitting in my mind for a while
ponce
Deuced Up
Posts: 50
Joined: Wed Apr 24, 2013 8:39 pm


O-O should be scary as hell
A variation would be to keep teams so that regular kills are possible, but only prey-killing making points.
For the labyrinth it would need messages "<prey> is at floor Z, coordinates X, Y, you are at floor Z2, coordinates X2, Y2
(EDIT or perhaps better with directions like north/south/west/east)
Last edited by ponce on Sun Aug 18, 2013 11:19 am, edited 1 time in total.
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


:) that would be killer
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


Code: Select all
def intel_spawn_location(self):
    loop = 0
    while True:
        AREA = 24 
        x = randint(255 - AREA, 255 + AREA)
        y = randint(255 - AREA, 255 + AREA)
        lvl = randint(0, 10)
        z = 3 +  6 * lvl
        z = 63 - z
        loop = loop + 1
        if (loop < 1000): # detect infinite loop (never happened yet)
            if self.map.get_solid(x, y, z):
                continue
            if self.map.get_solid(x+1, y, z):
                continue
            if self.map.get_solid(x, y+1, z):
                continue
            if self.map.get_solid(x+1, y+1, z):
                continue
            if self.map.get_solid(x, y, z-1):
                continue
            if self.map.get_solid(x+1, y, z-1):
                continue
            if self.map.get_solid(x, y+1, z-1):
                continue
            if self.map.get_solid(x+1, y+1, z-1):
                continue

        self.send_chat("The intel spawned " + level_to_floor(lvl) + ".")
        return (x, y, z)
Seems quite redundant.
Why not just have
Code: Select all
def intel_spawn_location(self):
    AREA = 24 
    x = randint(255 - AREA, 255 + AREA)
    y = randint(255 - AREA, 255 + AREA)
    lvl = randint(0, 10)
    z = 3 +  6 * lvl
    z = 63 - z
    self.send_chat("The intel spawned " + level_to_floor(lvl) + ".")
    return (x, y, z)
or even
Code: Select all
def intel_spawn_location(self):
    x,y = randint(231, 279),randint(231, 279)
    lvl = randint(0, 10)
    z = 63 - ( 3 +  6 * lvl )
    self.send_chat("The intel spawned " + level_to_floor(lvl) + ".")
    return (x, y, z)
ponce
Deuced Up
Posts: 50
Joined: Wed Apr 24, 2013 8:39 pm


It's not pretty but how would you avoid to spawn the intel in a wall then?
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


Code: Select all
def intel_spawn_location(self):
    x,y = randint(231, 279),randint(231, 279)
    lvl = randint(0, 10)
    z = 63 - ( 3 +  6 * lvl )
    while self.map.get_solid(x,y,z):
        x,y=x+randint(-1,2),y+randint(-1,2)
    self.send_chat("The intel spawned " + level_to_floor(lvl) + ".")
    return (x, y, z)
Kuma
Scripter
Scripter
Posts: 758
Joined: Fri Mar 22, 2013 10:05 am


learn_more compiled it for all of us
https://www.dropbox.com/s/w81l5t28svfzh8o/vxlgen.exe
13 posts Page 1 of 1 First unread post
Return to “Completed Releases”

Who is online

Users browsing this forum: No registered users and 17 guests