Page 1 of 1

map generator

Posted: Thu Mar 28, 2019 8:57 pm
by mathiaz
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:

Re: map generator

Posted: Thu Mar 28, 2019 10:30 pm
by tainn
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.

Re: map generator

Posted: Thu Mar 28, 2019 11:12 pm
by mathiaz
Some pictures here.

Yellow blocs are shootthrough
Green pyra are drivethough
Red blocs could be use to jump on higher bloc...

Re: map generator

Posted: Thu Mar 28, 2019 11:25 pm
by blast
Could you also pick and include an open-source license for this?

Re: map generator

Posted: Fri Mar 29, 2019 7:21 am
by mathiaz
Sure it is open source, under the GNU General Public License
See http://www.gnu.org/licenses/

I will add it in next post.

Re: map generator

Posted: Fri Mar 29, 2019 10:11 am
by blast
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!

Re: map generator

Posted: Fri Mar 29, 2019 12:37 pm
by mathiaz
Ok thanks for your precision.
The previous code is open source, under GNU AGPLv3.

Re: map generator

Posted: Sat Mar 30, 2019 5:53 pm
by ahs3
Nice Work. Fun Map.

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

Hosted at bzflag.ahs3.org:4036

Enjoy

:)

Re: map generator

Posted: Sun Mar 31, 2019 8:00 pm
by mathiaz
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.

Re: map generator

Posted: Sun Mar 31, 2019 10:30 pm
by ahs3
Updated

Re: map generator

Posted: Mon Apr 01, 2019 7:15 pm
by mathiaz
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")

Re: map generator

Posted: Mon Apr 01, 2019 10:53 pm
by ahs3
updated, thank you

Re: map generator

Posted: Sat Apr 13, 2019 11:11 pm
by mathiaz
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

Re: map generator

Posted: Wed May 22, 2019 11:56 am
by mathiaz
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