New Map Generator: BioHazard (MFG)

Lux maps won't make themselves.
User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

New Map Generator: BioHazard (MFG)

Post by RandomGuy » Wed May 09, 2007 3:31 pm

Now available in the plugin manager.

Introducing a new map generator:

Image

Biohazard takes an existing map file and randomly selects countries that are deemed hazardous. These countries are removed from the map and marked with a biohazard icon. The map choice determines the amount of wasteland generated, but does not change the original map size in any way. Version 1.0 supports Classic and Deux. You must have the original map file to use the Biohazard version.

As discussed in this Feature Request thread.

Credit for the initial idea goes to The Archer.

Some screen shots:
Classic - Medium
Image

Deux - Extreme
Image

The current map options are fixed. Hopefully I will be able to support more maps in a future version. There are four choices for each map - light, medium, heavy and extreme. These choices determine the amount of hazardous land generated. This is done by percentage so larger maps get more wasteland countries than would a smaller map at the same level. I think that Classic and Deux are pretty similar though, so it works out to roughly 1, 2, 4 and 8 countries in version 1.

Note that this map generator reads your original map file, so you must have the classic or deux installed and without having changed the file name.

Feedback/enhancement ideas?
Last edited by RandomGuy on Fri May 11, 2007 12:21 am, edited 2 times in total.

BDF
Luxer
Posts: 330
Joined: Fri Apr 06, 2007 5:47 pm

Post by BDF » Wed May 09, 2007 3:36 pm

Really like it, i hope you give some credits to The Archer, who came up with the very first idea. :bang:

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Wed May 09, 2007 3:40 pm

Definitely. Credit to The Archer for first bringing up the idea (and issuing a challenge!) and to everyone else who participated in that feature request thread who provided ideas and feedback.

User avatar
mbauer
Not A Truck
Posts: 3959
Joined: Mon Jun 28, 2004 3:59 pm
Location: Tallahassee
Contact:

Post by mbauer » Wed May 09, 2007 4:03 pm

I love generators, and this one kicks ass RG. I never play classic because it's so dull and monotanous, but this generator fixes that. Excellent! 5 stars all the way!

MB

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Wed May 09, 2007 4:12 pm

just wait for Castle Lux - Biohazard! I already tested it with Arms Race...it can make for some interesting maps. And it will probably slow down all the speedsters with how they path through the map.

User avatar
my wife hates me
Lux Elder
Posts: 2664
Joined: Fri Sep 22, 2006 4:45 am
Location: I TOOK MY BED BACK
Contact:

Post by my wife hates me » Wed May 09, 2007 4:40 pm

Does the possibility ever exist that a country could be isolated? i.e. Siam is hazardous preventing you from reaching oz... etc.

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Wed May 09, 2007 6:10 pm

my wife hates me wrote:Does the possibility ever exist that a country could be isolated? i.e. Siam is hazardous preventing you from reaching oz... etc.
Bomb is right - the generator code checks to make sure no country is isolated. If the random country it picked was Siam, it would detect the map would be invalid and pick again.

Equary_
Luxer
Posts: 34
Joined: Sun Apr 29, 2007 6:01 pm
Contact:

Post by Equary_ » Wed May 09, 2007 7:27 pm

i like it it realy makes for a new elimant of game play. is there a tred some where that explains how to make a map genorator?

User avatar
Kartofile
Luxer
Posts: 255
Joined: Sat Jun 17, 2006 1:30 am

Post by Kartofile » Wed May 09, 2007 8:02 pm

Wow, it's great! I've never really liked Classic until now. It really is interesting to have a different map every time. :D

I assume there's no way to do this, but ideally it would be nice if Biohazard were just one entry in the pull-down list of maps, and then when you clicked New Game it would give you a list of all your maps to choose from, and ask you to select "light" "medium" "heavy" or "extreme"... But I imagine you would have done it like that if it were possible.

So, thank you Archer and RandomGuy!

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Wed May 09, 2007 8:07 pm

Yeah, I asked about that, but there isn't any point in the process where the map generator can present a screen to the user to make a selection. I've got some ideas though for version 2 that might help.

Equary_ - you write a map generator in java code. You can download the SDK (the same one you download to build a bot) and it has a few examples of map generators included - the built in Lux one, as well as GregM's CastleInfinity, HexInfinity and IslandInfinity. Looking at those helped me immensely.

User avatar
The Archer
Luxer
Posts: 140
Joined: Thu Jan 11, 2007 8:56 pm

Post by The Archer » Thu May 10, 2007 12:03 am

All we gotta do is convince some hosts to use it..

User avatar
Bertrand
Reaper Creator
Posts: 568
Joined: Mon Nov 28, 2005 4:35 pm
Location: Montreal

Post by Bertrand » Thu May 10, 2007 9:03 am

RandomGuy, congrats on your Biohazard generator, it's a real innovation that has lots of potential. I think that it will get lots of gameplay.

I'm sure that Reaper, and the other bots, will like it a lot: they will adapt to the changing landscape much faster than the slow-thinking, slimy humans that are so set in their ways.

While you have your hands in the code, I have a few suggestions to take the idea further. How about a generator that simulates earthquakes and:

- Randomly deletes connections, creating hidden one-way connections?

- Randomly splits countries in two? Or merges two countries in one?

- Randomly splits continents in two (or more), for example creating deux-like maps out of the classic map? Or merges two continents in one?

- Randomly changes the continents bonuses? And perhaps makes some of them negative?

- And finally, how about implementing all of those suggestions in one generator that would randomly combine all of those changes?

User avatar
my wife hates me
Lux Elder
Posts: 2664
Joined: Fri Sep 22, 2006 4:45 am
Location: I TOOK MY BED BACK
Contact:

Post by my wife hates me » Thu May 10, 2007 10:29 am

Dr. Daniel P. Schreber wrote: humans, what need could they possibly serve other then Reaper food...
SLOW DOWN!!! - Seriously though. You suggested some awesome ideas. Is there anyway however, that there would be some type of interface, at least at the map maker level to be able to place variables? I envision somthing along the lines of (using the bonus changing as an example)

Bonus - Max Change +5 / Min Change +2 / Frequency Every 2 Rnds
or
Split Country - Split "x" countries every "x" rounds

Without control of the variables, you may find it hard to tweak for playability. (Though thats kind of the point huh)

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Thu May 10, 2007 11:17 am

Bertrand wrote:- Randomly deletes connections, creating hidden one-way connections?
Wouldn't be hard at all. This would give the bots a HUGE advantage, though. If the connections changed each time and you had no way to know them until you got there, the bots might be unbeatable.
Bertrand wrote:- Randomly splits countries in two? Or merges two countries in one?

This could be difficult - the code to combine two country shapes into one (and make it work in the context of the map) is really tricky. Likewise for splitting the countries. It wouldn't be hard to split them, but it could be hard to determine which countries they should/shouldn't connect to after the split.
Bertrand wrote:- Randomly splits continents in two (or more), for example creating deux-like maps out of the classic map? Or merges two continents in one?
This would be possible. I'd have to figure out where to position the label, how much the bonus should be and what to call the new continent...but all those things can be solved.
Bertrand wrote:- Randomly changes the continents bonuses? And perhaps makes some of them negative?
This would be easy. Adds a new twist to the biohazard - perhaps a nearby continent has "fallout" and gets a negative bonus.
Bertrand wrote:- And finally, how about implementing all of those suggestions in one generator that would randomly combine all of those changes?
Would be interesting - I'd need to provide a config file for setting all the variables for the generator so users could specify which options they want and to what degree.

Great suggestions. And you've given me another idea for a different map generator - Blind Lux Generator. It would mask all the countries with a overground file, relocate all the army indicators and off you go. Any map could be played blind. Any interest in that?

User avatar
Bertrand
Reaper Creator
Posts: 568
Joined: Mon Nov 28, 2005 4:35 pm
Location: Montreal

Post by Bertrand » Thu May 10, 2007 12:45 pm

happily married guy wrote:Humans = Reaper food
:D

I don't think that a GUI interface to the generator is currently possible, but it should be pretty easy to control a generator through a config file.
RandomGuy wrote:Wouldn't be hard at all. This would give the bots a HUGE advantage, though. If the connections changed each time and you had no way to know them until you got there, the bots might be unbeatable.
And that's a good thing, right?

What could be done is to superimpose a graphic on the country, similar to what you did with the biohazard symbol, that would indicate a one-way connection.

BDF
Luxer
Posts: 330
Joined: Fri Apr 06, 2007 5:47 pm

Post by BDF » Thu May 10, 2007 12:53 pm

Kartofile wrote:Wow, it's great! I've never really liked Classic until now. It really is interesting to have a different map every time. :D

I assume there's no way to do this, but ideally it would be nice if Biohazard were just one entry in the pull-down list of maps, and then when you clicked New Game it would give you a list of all your maps to choose from, and ask you to select "light" "medium" "heavy" or "extreme"... But I imagine you would have done it like that if it were possible.

So, thank you Archer and RandomGuy!
I think the best attempt at something like that would be to perhaps have some sort of text document, where you can throw in some file locations of certain maps you have. Then the generator would pick a map out of that at random. Similar to what Chimera uses to randomly pick bots out of a list.
Or an even better idea....
You have the chatbox in online games don't you? Perhaps make a command for your map generator which you can type in there, such as
/start with,"WWII Europe"
Whatever the user types in the inverted commas, the map generator would search the specified folder in which all the maps are stored under the keyword "WWII Europe", and restart the game, with that map selected.

And about what Bertrand is saying, im not sure I would like random connections added in places where you could just get attacked from nowhere... i would just find that frustrating. I like the idea of splitting countries or continents in two, less the idea of merging them ('cos i like big maps more :) )

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Thu May 10, 2007 1:13 pm

I don't think the map generator is notified of anything during gameplay - it is used to create the map then it is done. So chat commands would have no effect on a map generator - only bots present in the game hear that.

The one-way connections Bertrand wrote about wouldn't just be random. It'd just be existing two-way connections reduced to one way - a broken link, so to speak. So it wouldn't be anything that isn't there normally, just some things that are usually there wouldn't be.

as far as denoting those connections to players, you're right Bertrand, I could put a graphic there - maybe a rockslide or earthquake crack or something on the map...

And a config file is definitely the way I am going to go - people could list maps, sizes and other settings in a file that the generator would read and build a list of map options off of.

BDF
Luxer
Posts: 330
Joined: Fri Apr 06, 2007 5:47 pm

Post by BDF » Thu May 10, 2007 1:51 pm

could ask dustin about the chatbox thing...
the program registers commands such as "/start", and "/boot" or whatever else there is, i was thinking that you could add one through the map generator, like people have done to bots, since both implement Java programming

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Thu May 10, 2007 2:17 pm

the generator is a program that is run and finished before the game starts - it just outputs the map file. The bots have a presence in the game, so they "hear" the chat. So while Lux might hear the command, the map code wouldn't - it'd be up to Lux itself to hear the command and do something.

Since the map generator is no longer loaded, it wouldn't be possible for the biohazard code to hear any chat commands and change anything.

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Thu May 10, 2007 2:42 pm

Some test runs on a few different maps:

Biohazard castle lux:
Image

Some napalm spread throughout vietnam:
Image

and some biohazard blocks:
Image

BDF
Luxer
Posts: 330
Joined: Fri Apr 06, 2007 5:47 pm

Post by BDF » Thu May 10, 2007 3:50 pm

RandomGuy wrote:the generator is a program that is run and finished before the game starts - it just outputs the map file. The bots have a presence in the game, so they "hear" the chat. So while Lux might hear the command, the map code wouldn't - it'd be up to Lux itself to hear the command and do something.

Since the map generator is no longer loaded, it wouldn't be possible for the biohazard code to hear any chat commands and change anything.
That is kind of what im saying. If this is not possible it wont matter too much. The command is entered and... when the map restarts, the generator is run, and the generator could perhaps read the chatbox window. I don't know a lot about programing as i said, but would you say that the bots run in realtime or something like that and the generator does not... beacuse if it doesnt, you could find whatever code it is in the bot which runs it realtime (by that i mean DURING the game), and perahps use that to allow the generator to pick up any chatlog when it is running. Maybe you should talk to one of the fulltime java junkies to check this out. Im just thinking here..., i dont know a lot about this stuff, but i know some very simple basics.
I know the main pourpose of a generator is to make maps, not interact with the player as such like the bot does, but stick whatever bit of the code it is which allows the bot to interract into the generator and see what happens
:|


P.S. and to change the map which the generator tweaks with you change the file name and location in the code, right?

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Fri May 11, 2007 12:21 am

I spent about 20 minutes and tweaked the biohazard code into a "Blind Lux" generator. It is impossible to win against the bots though, and since only the host would see the theme in network play (it would look normal to everyone else) it is more a novelty than anything else.

Here's a screen shot:

Image

Let me know if anyone is interested in inflicting some pain on themselves by trying it...

BDF
Luxer
Posts: 330
Joined: Fri Apr 06, 2007 5:47 pm

Post by BDF » Fri May 11, 2007 11:32 am

the screen shot is not there....

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Fri May 11, 2007 11:54 am

Imageshack may be having a server glitch - hopefully it will come back and be visible soon.

User avatar
blackj3sus
Lux Messiah
Posts: 3223
Joined: Fri May 05, 2006 12:27 pm
Location: sillysoft.net/roman-battles
Contact:

Post by blackj3sus » Sat May 12, 2007 1:33 pm

i love this mod (biohazard) but was wondering...?
could i get one for dragons bane and maybe dark ages map done with black plague instead of biohazards?

User avatar
RandomGuy
Lux Veteran
Posts: 1463
Joined: Mon Mar 05, 2007 12:02 am
Location: Central American Jungle
Contact:

Post by RandomGuy » Sat May 12, 2007 2:08 pm

what would a black plague icon look like?

User avatar
blackj3sus
Lux Messiah
Posts: 3223
Joined: Fri May 05, 2006 12:27 pm
Location: sillysoft.net/roman-battles
Contact:

Post by blackj3sus » Sat May 12, 2007 3:00 pm

Image
or something similar...

User avatar
Sylocat
Lux Veteran
Posts: 1404
Joined: Mon Sep 11, 2006 2:59 pm
Location: Wisconsin
Contact:

Post by Sylocat » Sat May 12, 2007 4:03 pm

I can't play with Biohazard because I'm on Mac OS 10.3.9 and I can't afford an upgrade. :evil: So I guess I can't review this one.

User avatar
The Archer
Luxer
Posts: 140
Joined: Thu Jan 11, 2007 8:56 pm

Post by The Archer » Sat May 12, 2007 11:31 pm

blackj3sus wrote:Image
or something similar...
Wasn't the black plague carrier by rats?

User avatar
Drifter
Semiholy Rambler
Posts: 6770
Joined: Sun Nov 20, 2005 5:06 pm
Location: An undisclosed location... for reasons of security, and therefore... insecurity...
Contact:

Post by Drifter » Sun May 13, 2007 12:14 am

No, the Oriental Rat Flea on rats running rampant due to people killing cats because they were evil familars of Satan.

But I like Biohazard, thanks for the host BarStar and the feature RG.

Post Reply