Page 1 of 1
scripting to create a random map which is not random
Posted: Sun Sep 20, 2009 3:22 pm
by zaphod
I would very appreciate the help of a scripting-wizard, who could find a solution to write a script that creates a random world/map based on the layout of the DuPi map ... (001.bzflag.fr:5140)
DuPi is set-up with 4 diagonals crossing out from the center, made of small boxes and pyramids with different rotation, size and height. the distance between them should be fixed and leaving the center and the corners (almost) free of objects.
The 4 fields (that the cross creates) should be filled with random boxes and a pyramid in a "Ducati" style. The two bases should always be identical. (plus on top of each pyramid a transparent/noradar roof for the "special" rico effect ;).
Is this possible?
Is it complicated?
Would the "new" maps have an obvious difference?
Could the server create it after a restart/superkill?
THX in advance for your inputs!
.
Re: scripting to create a random map which is not random
Posted: Sun Sep 20, 2009 3:35 pm
by tobylane
Yeah, far more complicated maps are made in Python/Ruby/etc, this would be simple as there are easy ways to set each of the variables you want. Learn whatever you want, I doubt cmd prompt would be enough but even php would do.
Re: scripting to create a random map which is not random
Posted: Tue Sep 22, 2009 12:55 am
by optic delusion
The Purple Panzer has many map creation tools written in Visual Basic.
http://my.bzflag.org/bb/viewtopic.php?f ... ic#p123039
Re: scripting to create a random map which is not random
Posted: Tue Sep 22, 2009 7:24 am
by zaphod
thx ::: good hint! looks good what the Purple Panzer did!
unfortunately:
The Purple Panzer wrote:... I use Microsoft Visual Basic for the scripting, running on Windows. One reason I've chosen to send this out now is that Microsoft has made "Visual Basic Express" availabel *for free* - so anyone may grab a copy and try it out...
... which doesn't run either on my mac nor linux box!
wait ::: I just found "The Mono Project" for Mac OS X ::: i will try it!
THX again!
nope ::: don't get it to run usefully!!!
.
Re: scripting to create a random map which is not random
Posted: Tue Sep 22, 2009 11:46 pm
by SkillDude
I'll make it for you if you'd like...Very simple compared to some of my scripts I've made before...I do bash scripting so it runs right from the terminal for linux. Send me a message.
Re: scripting to create a random map which is not random
Posted: Wed Sep 23, 2009 9:49 am
by zaphod
BIG thanks for your help guys!
especially to Jefenry and sigonasr2 for offering their help!
it works!
what a great community bzflag is!
.
Re: scripting to create a random map which is not random
Posted: Thu Sep 24, 2009 5:20 pm
by zaphod
well ::: Jefenry did it!!!!
with all the difficulties and keeping the same layout and style ::: he made it work!
big problem (in my point of view as a non-programmer) was to keep a range of sizes to certain elements in the map and that they don't intersect with others ::: he made it work!
good job and many
BIG thanks for the hard work!
at the moment up and running at:
bzbattleground.com:8321
have fun and the /shutdownserver command (only admins can do it atm) lets you create a hole new DuPi map!
.