map generator

User made maps to use on servers.
Post Reply
User avatar
mathiaz
Private First Class
Private First Class
Posts: 44
Joined: Sat May 27, 2006 11:59 pm

map generator

Post by mathiaz » Thu Mar 28, 2019 8:57 pm

Hi,

You will find in attached file the big python script who draw map.

It s not perfect. At the beginning it s was just in idea, and it become a real game to write it. So the script grow bigger and bigger as a golem monster.
I know, It needs to be clean. But this is the end of winter, this season where the need of light make me seat behind a computer.
So i prefer post now a first release, than wait another year.

Anyway it works. Just run it as:
>python3 __init__.py > new_map.bzw

Short description of the files that you could play with :
- __init__.py : some server configuration
- Conf.py : configuration parameter as worldsize , size of the bloc, ...

See you

PS :If someone tell me the command to take an overview snapshot, i will post some.
:wink:
Attachments
mapbot.tgz
(16.02 KiB) Downloaded 29 times
<°)))><|

User avatar
tainn
Private First Class
Private First Class
Posts: 171
Joined: Sun Nov 18, 2018 7:25 pm
Location: zone of the phantoms

Re: map generator

Post by tainn » Thu Mar 28, 2019 10:30 pm

Nice! I'm in the process of creating a randomly generated forest map with python.

If by overview snapshot you mean an in-game screenshot, I would recommend the following; join as an observer, use shift + up/down to move up and down, and ctrl + up/down to change the angle of the view up and down. I would recommend an aerial view while looking down a bit and seeing as many objects as possible. When in the right position, use F5 to take an in-game screenshot. On Linux, it will be located in .bzf (hidden folder) > screenshots.

User avatar
mathiaz
Private First Class
Private First Class
Posts: 44
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post by mathiaz » Thu Mar 28, 2019 11:12 pm

Some pictures here.

Yellow blocs are shootthrough
Green pyra are drivethough
Red blocs could be use to jump on higher bloc...
Attachments
bzfi0012.jpg
(421.01 KiB) Not downloaded yet
bzfi0010.jpg
(442.29 KiB) Not downloaded yet
bzfi0009.jpg
(629.41 KiB) Not downloaded yet
bzfi0008.jpg
(525.84 KiB) Not downloaded yet
<°)))><|

User avatar
blast
General
General
Posts: 4744
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: map generator

Post by blast » Thu Mar 28, 2019 11:25 pm

Could you also pick and include an open-source license for this?
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

User avatar
mathiaz
Private First Class
Private First Class
Posts: 44
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post by mathiaz » Fri Mar 29, 2019 7:21 am

Sure it is open source, under the GNU General Public License
See http://www.gnu.org/licenses/

I will add it in next post.
<°)))><|

User avatar
blast
General
General
Posts: 4744
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: map generator

Post by blast » Fri Mar 29, 2019 10:11 am

Note that there are multiple versions of the GNU GPL license. See the "How to Apply These Terms to Your New Programs" section for how to indicate the licensing and if it allows for using any later version of the GPL. Thanks!
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

User avatar
mathiaz
Private First Class
Private First Class
Posts: 44
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post by mathiaz » Fri Mar 29, 2019 12:37 pm

Ok thanks for your precision.
The previous code is open source, under GNU AGPLv3.
<°)))><|

User avatar
ahs3
Private First Class
Private First Class
Posts: 315
Joined: Sun Mar 04, 2007 8:33 pm
Location: Press '/' to search
Contact:

Re: map generator

Post by ahs3 » Sat Mar 30, 2019 5:53 pm

Nice Work. Fun Map.

A new map is generated every time the server empty's.

Hosted at bzflag.ahs3.org:4036

Enjoy

:)

User avatar
mathiaz
Private First Class
Private First Class
Posts: 44
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post by mathiaz » Sun Mar 31, 2019 8:00 pm

Hi,

I realize that there I forget to activate some good features in first archive released.
So prefer use this version.
I make it run without any problem with python 3.5.

Have good time.
Attachments
mapbot.1903.tgz
(16.35 KiB) Downloaded 25 times
<°)))><|

User avatar
ahs3
Private First Class
Private First Class
Posts: 315
Joined: Sun Mar 04, 2007 8:33 pm
Location: Press '/' to search
Contact:

Re: map generator

Post by ahs3 » Sun Mar 31, 2019 10:30 pm

Updated

User avatar
mathiaz
Private First Class
Private First Class
Posts: 44
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post by mathiaz » Mon Apr 01, 2019 7:15 pm

hi,

if you want make a public server with it.
Edit __init__.py
and comment the line :

ie replace
print(" -advertise NONE")

by
#print(" -advertise NONE")
<°)))><|

User avatar
ahs3
Private First Class
Private First Class
Posts: 315
Joined: Sun Mar 04, 2007 8:33 pm
Location: Press '/' to search
Contact:

Re: map generator

Post by ahs3 » Mon Apr 01, 2019 10:53 pm

updated, thank you

User avatar
mathiaz
Private First Class
Private First Class
Posts: 44
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post by mathiaz » Sat Apr 13, 2019 11:11 pm

Hi,

Same generator with one main modification :
- The high of bloc aren t completly random. So there is less level. It s now easier to shoot tank on a bloc from another bloc.

Some more idea, but later
Attachments
mapbot.1904.tgz
(16.35 KiB) Downloaded 16 times
<°)))><|

User avatar
mathiaz
Private First Class
Private First Class
Posts: 44
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post by mathiaz » Wed May 22, 2019 11:56 am

Here last version of the map generator.

What s new :
- bloc higths are harmonized
- new pattern (big blocs, line ..)
- more colors
- some teleporters
and more...

Just download it and run it with pyton 3:
python3 __init__.py > mymap.bzw
Attachments
mapbot.1905.tgz
(21.68 KiB) Downloaded 19 times
<°)))><|

Post Reply