Jump to content
  • Advertisement
Sign in to follow this  
uni2uni2

map generator project

This topic is 5394 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Im a final year student who is undertaking the creation of an intelligent map generator for my final project. i have to create a program in any language (ive chosen java so far), that creates a random terrain map, and places on this a random city (using ai rules) which can be used for a gaming society. Essentially it is a standalone program, in which a GUI appears at the start, allowing settings to be chosen, and the program will use this inputs to create the finished map, using simple 2d graphics. There is an Artifical Intelligence/simulation theme to the project. Something similar could be an AD&D map/city/dungeon generator eg www.mapmage.com, but better :-) i have searched the web and found some information, but there isnt alot, especially on forums. These are the things i would like some help on, if possible, and it would be very much appreciated. Please note, i am not trying to get somebody to do the project, i am after only help and ideas, so i can make progress :-) 1. Is java the best code to use for this? (im familiar with jbuilder 7.0 - What java program(s) would be best?) 2. Do u have any interesting links that would be relevant to my project ? e.g. a forum/a webpage/an article etc 3. Have you any information i could use? Thanks for reading my (first post) and i hope you can help! :-)

Share this post


Link to post
Share on other sites
Advertisement
1. There is no 'best' language to use, but Java is a very capable language that will be up to the task. Make sure you can find a good 2D graphics package for it though. I don't know what Java offers natively.

2. You've been fairly vague about where the artificial intelligence comes in to this project, so I'm not sure what to advise. Obviously there are many existing programs that create dungeons or mazes, and some games create terrain too. Browse open-source game sites, perhaps. Maybe ADOM has a decent terrain representation, for example?

3. The best thing you can do is clearly lay down your specifications for the project so that it's less vague. That will help focus you on what you need to research and implement, and help others to help you.

Share this post


Link to post
Share on other sites
first of all, thankyou for your reply.

It does seem pretty vague so i shall narrow it down a bit for other people.

stage one of the project, which i am concentrating on at the moment, consists of creating a random terrain generator that will perhaps use a tile based system. Each tile will compose of a graphic which is dependant on the type of terrain e.g. Plains/Forest/Mountain/Deep Sea/Beach/Lake. In order to make a realistic map, i have to use AI via a set of rules composed in java. For example, The only tile type a "deep sea" tile can touch (or be beside) is another "deep sea" tile or a "beach tile".

The terrain is not the main issue of the generator ( the main issue is to use AI to create a realistic city on the random terrain using such issues as technology/ecomonics/whether its a village,town,city/tile type eg u cant build a harbour on a mountain etc ) but i cannot proceed until terrain can be randomly generated.

In my paper-based prototype its fairly straight foreward. The user inputs details into a GUI, such as terrain type eg plains/desert/artic. The terrain type will then allow access to another choice. eg. Plains has been chosen, so one option could be "forest coverage" or "mountain coverage", classified as a percentage of the maximum number of squares.

i would basically like help on creating a "blank template" of tiles (which appears in a new window), which can then be randomly filled with different types of terrain, so that a specific tile can be classified as a specific terrain type. At this early stage it does not have to be realistic (ie it doesnt matter that all the "deep sea" tiles are scattered all around the map - i just need to get it up and running - then i can create "rules" to make it more realist, and also to incorporate constraints. The graphical display of this is intended to be simple and 2d. At this stage i intend just to allocate colors to different tile types, although ill later need to add images.

I hope i have been more explanatory on what i am trying to achieve at the moment. If you are able to advise me, then please do :-)

thankyou for reading this.

Share this post


Link to post
Share on other sites
This is not an AI problem, but rather a constraint-satisfaction problem (CSP) (in that your solution - the arrangment of tiles - is constrained by the properties of the tiles). Consider looking at the CSP literature rather than AI literature.

Timkin

Share this post


Link to post
Share on other sites
i dunno bout using java, when generating a map you need every little bit of speed you can get, as what you are calculating would be very repetitive, and any slight slowness adds up!

Share this post


Link to post
Share on other sites
Apart from the very correct note Timkin has provided, I would really like to help you in some way if I could understand your questioning.

As far as I can read you, you are looking for a random generator, where randomness is created by AI rules?

Perhaps you could repeat your questioning in some different and more precise description to make us understand any better what you are on about?

To provide at least some hint for you, there is a lot of literature about terrain generation by noise (ie perlin noise), as there is also many about creating terrain by the use of wang tiles. With Wang tiles it might be kind of challanging to make a choice from very large tile sets?!

A totally different way is that of what geologists might take in simulation. There a certain numerical solutions to apply errosion to some precalculated terrain with certain types of ground which is erroded by wind, water ect. But this may head in direction to finite element solutions which you might not wish to solve with java I guess.

But all of this is actually not related to AI, as far as I can see and Timkin already wrote to you.

The examples you had provided with 'deep sea' tile at the edge of a 'beach' tile and so on, are strongly related to Wang tiles, L-Systems ect. but not to AI...

Good literature about wang tiles you might find the following examples found in a internet search engine:

http://www.csse.monash.edu.au/~jonmc/teaching/honsProj.html
http://www.cgmi.inf.uni-konstanz.de/publications/publications_en.html
http://comp.uark.edu/~strauss/papers/AHT.pdf
http://manip.crhc.uiuc.edu/Wah/papers/TP12/TP12.pdf
http://wscg.zcu.cz/wscg2004/Papers_2004_Short/L31.pdf
http://research.microsoft.com/%7Ecohen/WangFinal.pdf
http://www.computerpflanzen.de/literatur.pdf

I hope some of these links might help you a little...

More links of the above you might wish to find in the internet with search engine keywords like 'wang tiles', 'l-systems', 'terrain generation', 'procedural height field generation'...

With best wishes, Sebastian Gruber.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!