scripting to create a random map which is not random

Questions and answers about the how and why of making maps.
Post Reply
User avatar
zaphod
Sergeant
Sergeant
Posts: 352
Joined: Sun Jan 23, 2005 3:20 pm
Location: beteigeuze-system
Contact:

scripting to create a random map which is not random

Post 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!



.
.
.
.
Image
tobylane
Private First Class
Private First Class
Posts: 130
Joined: Thu Jan 29, 2009 4:21 pm

Re: scripting to create a random map which is not random

Post 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.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Re: scripting to create a random map which is not random

Post 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
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
zaphod
Sergeant
Sergeant
Posts: 352
Joined: Sun Jan 23, 2005 3:20 pm
Location: beteigeuze-system
Contact:

Re: scripting to create a random map which is not random

Post 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!!!

.
.
.
.
Image
User avatar
SkillDude
Private First Class
Private First Class
Posts: 336
Joined: Sun Apr 01, 2007 4:50 pm
Location: United States

Re: scripting to create a random map which is not random

Post 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.
User avatar
zaphod
Sergeant
Sergeant
Posts: 352
Joined: Sun Jan 23, 2005 3:20 pm
Location: beteigeuze-system
Contact:

Re: scripting to create a random map which is not random

Post 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!



.
.
.
.
Image
User avatar
zaphod
Sergeant
Sergeant
Posts: 352
Joined: Sun Jan 23, 2005 3:20 pm
Location: beteigeuze-system
Contact:

Re: scripting to create a random map which is not random

Post 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! ;-)



.
.
.
.
Image
Post Reply