map generator

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

map generator

Post 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:
Attachments
mapbot.tgz
(16.02 KiB) Downloaded 240 times
<°)))><|
User avatar
tainn
Private First Class
Private First Class
Posts: 278
Joined: Sun Nov 18, 2018 7:25 pm
Location: phantom_zone;

Re: map generator

Post 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.
User avatar
mathiaz
Private First Class
Private First Class
Posts: 64
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post by mathiaz »

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: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: map generator

Post by blast »

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: 64
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post 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.
<°)))><|
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: map generator

Post 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!
"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: 64
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post by mathiaz »

Ok thanks for your precision.
The previous code is open source, under GNU AGPLv3.
<°)))><|
User avatar
ahs3
Private First Class
Private First Class
Posts: 327
Joined: Sun Mar 04, 2007 8:33 pm
Location: Press '/' to search
Contact:

Re: map generator

Post by ahs3 »

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: 64
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post 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.
Attachments
mapbot.1903.tgz
(16.35 KiB) Downloaded 222 times
<°)))><|
User avatar
ahs3
Private First Class
Private First Class
Posts: 327
Joined: Sun Mar 04, 2007 8:33 pm
Location: Press '/' to search
Contact:

Re: map generator

Post by ahs3 »

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

Re: map generator

Post 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")
<°)))><|
User avatar
ahs3
Private First Class
Private First Class
Posts: 327
Joined: Sun Mar 04, 2007 8:33 pm
Location: Press '/' to search
Contact:

Re: map generator

Post by ahs3 »

updated, thank you
User avatar
mathiaz
Private First Class
Private First Class
Posts: 64
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post 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
Attachments
mapbot.1904.tgz
(16.35 KiB) Downloaded 211 times
<°)))><|
User avatar
mathiaz
Private First Class
Private First Class
Posts: 64
Joined: Sat May 27, 2006 11:59 pm

Re: map generator

Post 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
Attachments
mapbot.1905.tgz
(21.68 KiB) Downloaded 199 times
<°)))><|
Post Reply