Random Map Generation

Page 1 of 2 1, 2  Next

Go down

Random Map Generation

Post  scrag_10 on Tue Jun 02, 2009 4:30 pm

How about randomly generated maps? So the game can be never ending?

But major cities can still be custom made.

scrag_10

Posts : 55
Join date : 2009-06-02

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Wed Jun 03, 2009 4:38 am

I like the idea, although we can't use it for normal maps, since it's an online multiplayer game.

But maybe we can make a party quest (or an individual quest) that uses a random map.
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  ricmax on Fri Jun 05, 2009 10:08 am

The idea(s) is(are) good, but it's coding can be pretty hard to get.
avatar
ricmax

Posts : 80
Join date : 2009-05-27
Age : 30
Location : Londrina - PR - Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  scrag_10 on Fri Jun 05, 2009 3:19 pm

I dunno how hard it is, but it seems like it can be pretty easy.
I've been reading about it and using it with tile maps. it looks something like this:

Code:
 
A Non-programmers Psuedo-Code

EarthTile = 1       
WaterTile = 0

then you make a list or array ( I dunno what its called ), with random to generate randomly 1, and 0. then it looks like this:

[ 0, 0 ,1, 1, 0]
[ 1, 0, 0, 1, 0]
[ 0, 1, 0, 1, 1]
[ 1, 0, 0, 1, 0]
[ 0, 0 ,1, 1, 0]

I guess it's called a matrix, right?

there you have a 5 by 5 grid.

Then I guess you just add exceptions, like I dunno, lolz >_>...
and then make another matrix, that layers over top for trees and stuff, but since trees can't grow out of water, compare the matrices and if there is a water tile there, make it so it can't add a tree tile.

or whatever >_>,

I guess it's a bit more complicated then that, but you guys can do it! tere are lots of examples like any rouge-like game, or freeciv, or dwarf fortress.

I'll post links latter.

>_> wut?

scrag_10

Posts : 55
Join date : 2009-06-02

View user profile

Back to top Go down

Re: Random Map Generation

Post  ricmax on Fri Jun 05, 2009 4:06 pm

My fault.

It's not that it's hard to make it work, but it's that "exceptions" that can drive you crazy. Something like:

How to have sure that no tree will block the entire way to advance?
How to have sure that you'll have a way to go on?

And all going on...

So, that matrix idea is correct. Well, it's a free project so, let's give it a try! Wink
avatar
ricmax

Posts : 80
Join date : 2009-05-27
Age : 30
Location : Londrina - PR - Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Fri Jun 05, 2009 8:00 pm

Again, I'm finding weird we're suggesting random map generation on an MMO.

It's impossible to generate random maps for normal events. That could only be made on party quests. IF we do this on party quests, then we should not use a 100% randomly generated map (specially 'cause of the exceptions), but using one of a set of... idk... 50 different PREDEFINED maps randomly chosen.

Creating random maps for usual places is craziness. Imagine if you're training on the map and suddently someone enters and the map redefines itself... Or if it doesn't redefine if there's someone on the map, you could just keep entering the map until you see a good configuration, then you ask someone to keep his character there when he's AFK so the map does not change if you teleport.

Alternatively, we can have maps which have random-place-portals. So when the player enters the portal to another map, it throws him into one of the predefined maps. That would be calculated by the client, not the server, it wouldn't depend on the existance of players already on that map, and is easier to do.


By the way, scrag, your example is correct, but just to clarify, there are two kinds of data that could be used for your example: Arrays and Lists. Arrays are immutable and have predefined sizes. Lists may have a predefined size or not, but if you want to add a new element to it, you may do it at any time.

Arrays are also easier to create than lists. Creating an array is simply defining the size it will have and the type of element it will contain (tiles, folders, balls, dinosaurs, etc). They're very easy to manage, since the elements are identified by a numeric index on the very variable and don't need to be seeked one-by-one like those on a list.

The main difference between Arrays and Lists, as said before, is that Lists may be changed, so a map created with a List is harder to make and manage, but in exchange it may have it's size alterated for some reason. Also, arrays may only contain one kind of element, while Lists may contain ANY kind of element, as long as every kind of element declarates a pointer to the other kind.

However, for the kind of map we're trying to desing, I recommend we use an array of tiles for each map instead of lists. But we may use a List to define each character that's ABOVE a tile, since for an MMO game it's probable that many characters may occupy the same tile.
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  scrag_10 on Sat Jun 06, 2009 12:07 am

Here is an MMO with random maps, but this game generates an entire galaxy >_>
http://www.infinity-universe.com/

There is quite a few Open Source games that use Random Generated Maps, like ALOT!!! I'll get some code examples, and ways of dealing with the ' I can't go anywhere on this map, there is a tree in my way!' problem.



the Usual Places won't be generated. it will be like this:
Code:

1, 2, 3  = Hand crafted towns/special locations
0 = Randomly generated

[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]
[ 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,]
[ 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]
[ 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2,]
[ 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2,]

This is how it is in the Diablo series.

These are just ideas, we don't have to do them Smile, but they keep the game fresh. Makes the game longer too. Diablo also has random generation for Weapons/armour/rings/etc., but sometimes the server messes up and you get a +10 to all skillz item, which you can get alot of money for on ebay (1000$+), I imagine WoW does that too.

http://pcg.wikidot.com/ <---- this

Quests can also be generated too. >_>

scrag_10

Posts : 55
Join date : 2009-06-02

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Sat Jun 06, 2009 9:21 am

As I said before, I can't see a random map happening in an MMO game.

Why and when does the map regenerates itself?

If it regenerates whenever someone enters the map, imagine if you spent a hell of a time to defeat one boss, and suddently, when the boss is at 5% life, someone enters the map and it reloads?

If, however, it regenerates whenever someone enters an empty map, you could merely start re-entering the map until it comes at a good combination, then you keep a character there so that it does not change.

I think this would work for PARTY QUESTS. This is how I figured it would happen: The quest is divided in a group of maps, which can only be accessed by one party at a time. When you enter the first map, all of the random maps are generated. Then, after you complete each step and progress to the following map, if it was a random it had already been generated so it wouldn't cause those "bugs" I said before.
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  scrag_10 on Sat Jun 06, 2009 1:57 pm

If the random maps are only access able to 1 party at a time it should be fine then? or if a person joins the random map, they don't get to kill the boss.

Maybe when you go in to a dungeon it asks:

Go to Existing Dungeon? (to find friends)
Start New Dungeon?

But you would have to Run around on the world map to the location where they entered the dungeon to join, you can't just warp there (unless that is a spell?).

So basically a Dungeon is like a new Room on the server


BUT!!
Maybe the random, map is just for developement, so we don't have to do everything by hand, like when the game is finished everything will be set in stone, from a random generation we got and liked, so now everyone needs to play it.

Or the random map could be generated weekly or monthly?

Maybe

scrag_10

Posts : 55
Join date : 2009-06-02

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Sun Jun 07, 2009 8:22 pm

I loved the idea.

First of all, I was thinking that all of the maps would be interconnected naturally, as in games like MapleStory, Flyff or Runescape, BUT...

Maybe every story (plane) has a set number of dungeons, that have their entrances at defined points on the world map. When someone enters a dungeon, it generates itself as a new map on the server. Each of the generated copies of a dungeon can only be entered by you and your party, but you may invite someone outside to your dungeon (gotta think of how it will happen).

So this is how we may get the dungeon to have random maps, it is singular to your party, and it fades away once you leave it.

This also solves a bad relationship problem that every player face on an MMO game, which is Kill-Stealing. 'Cause with this system you may have your own map for training alone if you want to.


By the way, I think we should also have training grounds outside of dungeons, so that players DO find each other every once in a while, since the best part of MMOs is making friends.
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  ricmax on Mon Jun 08, 2009 11:27 am

Shocked

Man, that's make me think in a HELL of a story!
I like to ask to the admin to create a story Topic, to put some ideas.

I really need to split all then out!

(I'm some type of a writter, a lazy type to be specific)
avatar
ricmax

Posts : 80
Join date : 2009-05-27
Age : 30
Location : Londrina - PR - Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Mon Jun 08, 2009 5:57 pm

You don't have to ask anyone to create a topic in an open source community... Very Happy
Specially this one.

(Don't feel like anyone here has got more rights than you, because it's not truth)
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  ricmax on Tue Jun 09, 2009 5:42 am

I'm just being lazy! Razz

Can I? (just kidding)
avatar
ricmax

Posts : 80
Join date : 2009-05-27
Age : 30
Location : Londrina - PR - Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  Seshiro on Sun Jun 21, 2009 5:27 pm

I see it difficult. If maps are generated randomly, and I'm in a party, I'd lose all my party members, because they'll be in different maps xD.

If we want to make a random-created map, we should use a system like .Hack//G.U. one, give that game a try and tell me if you like this system or not.

Well, a little explanation (to avoid downloading it). You want to enter to a map to level up, so you get to the portal, and put a phrase, using words you have already unlocked. It's kinda rare, but it's the best way to use randomly-created maps without losing your party members.
avatar
Seshiro

Posts : 47
Join date : 2009-06-19
Age : 27
Location : Cydonia

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Sun Jun 21, 2009 5:45 pm

Actually, my idea of random maps was "generating the random maps all at once when you enter a dungeon". Remember when we discussed that each character would have his own copy of a dungeon to train alone or with a party? At the moment we create a new dungeon object for the character, the maps in it would be randomly selected, and the dungeon object would exist as long as there's someone inside the dungeon.
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  Seshiro on Mon Jun 22, 2009 1:59 am

KaoroSorane wrote:Actually, my idea of random maps was "generating the random maps all at once when you enter a dungeon". Remember when we discussed that each character would have his own copy of a dungeon to train alone or with a party? At the moment we create a new dungeon object for the character, the maps in it would be randomly selected, and the dungeon object would exist as long as there's someone inside the dungeon.
You mean, like pokemon mystery dungeon?
It could be fun Wink, but I'm not sure if it could be suitable for a mmo...

...
...
...
... Who cares!!!
We want to make something "unique" xDDD
avatar
Seshiro

Posts : 47
Join date : 2009-06-19
Age : 27
Location : Cydonia

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Mon Jun 22, 2009 8:12 am

... Who cares!!!
We want to make something "unique" xDDD
Yay... Very Happy

Oh, btw, if we do this, would it be better if the maps are completely random or if the maps only randomly select a predefined version of themselves?

In the first case, we have a lot of diversity at every map, but there are two main problems:

- First, it must run check algorithms to see if no portal was stuck behind a tree or unaccessible because there's a rock in the passageway. On the predefined map, there's no need to, because the maps were already designed by the team.

- Second, it would take much longer for the game to load, since the server would have to generate every map and then send all of the information regarding it to each of the characters on a party. This could also overload the server much easily. On the predefined map, all that the server does is send to it's clients the ID of the selected map.

But the predefined map thing totally loses it's fun if there are just a few versions of a map. For it to become interesting (considering this is an MMO), we should have at least 50 versions of the same map, and that would take a hell of a time to make if we consider all of the maps in all of the dungeons.
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  Seshiro on Mon Jun 22, 2009 11:57 am

As my point of view, we have only 2 options:
- Making all the maps by ourselves, and being selected randomly by the server (Kaoro's second idea)
- Forgetting about the random map system xDDD My head explodes just thinking about ALL we need to validate.
avatar
Seshiro

Posts : 47
Join date : 2009-06-19
Age : 27
Location : Cydonia

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Mon Jun 22, 2009 4:55 pm

Seshiro wrote:My head explodes just thinking about ALL we need to validate.
LOOOOL... Haha...

Well, I think we could have ONE random map - some labirynth inside a dungeon, maybe?
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  Seshiro on Mon Jun 22, 2009 10:10 pm

KaoroSorane wrote:
Seshiro wrote:My head explodes just thinking about ALL we need to validate.
LOOOOL... Haha...

Well, I think we could have ONE random map - some labirynth inside a dungeon, maybe?
It's the same work xDDD
Once you create one random map system, you can re-use the code.
Think that the random map will be a X algorithm, that you're going to save into a library, so you could use it in any map.
But making that algorithm is the real job, then adapting it to any map is not THAT hard.
avatar
Seshiro

Posts : 47
Join date : 2009-06-19
Age : 27
Location : Cydonia

View user profile

Back to top Go down

Re: Random Map Generation

Post  scrag_10 on Mon Jun 22, 2009 11:22 pm

It really depends on how complicated you want the map to be.
water
hills
lava
trees
doors
all with 1 map generator would be easy.

Keep in mind, that you can add not random parts to the map too.

scrag_10

Posts : 55
Join date : 2009-06-02

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Tue Jun 23, 2009 8:29 am

It's the same work xDDD
Once you create one random map system, you can re-use the code.
I meant that if we are going to design each of the maps (to be sure they are clearble and also to ease server work), it's fairly easier to do it for just one map.

Keep in mind, that you can add not random parts to the map too.
That's not hard. Maps could have Tilesets (separating the tiles in groups), so that you cannot add a part of a house inside a volcano.

We're still going with the fully random-generated maps. I think this would work better with randomly selecting pre-generated maps. Specially because the server would have to generate and then send all of the data on a map to each of the characters on a party (which could make for a considerable amount of lag if the server gets too many people), while if it just selects a map, all the work it has is getting a single random number and all the info the client needs is that maps ID number.
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  ricmax on Tue Jun 23, 2009 5:14 pm

Man, just thinking about this random-head-exploding-maps thing I just figured out that I'm wrong in the first.

It's no that it's hard to do the random-generate-map code, but it's still a LOT OF WORK. But the validation for "freedom" can be easier than we thought.

Just checking if you have a path between all the "critical" points on the map will be easy. It's just check if the tiles connect each other. About the server overload we could do like this: once in a while we generate all the maps again. It could be once a day, week or month. Or we could use some low-powered server to do it and just use the real server to do the rest (something like use my PC to generate maps and Kaoro's one be the server, getting all the maps from my PC in a LAN, or better way, MY PC save the maps in the Kaoro's one, doing all the map crap while the server do it's own stuff).

Another thing: in real life not every cave, dungeon or something like this have a logical path or a "good walkable" way. If a rock get in the way of the player he needs to have a PICK with him to remove it. If it was a lake/water, he needs a mage to frozen it up for him/her pass. Magma? Nothing like a good and STRONG blizzard to frozen it up. A tree is blocking your way (like I said before)? BLOW IT UP, CUT IT UP, BURN IT UP! YOU'RE A HERO DON'T YOU?
Wink

I'm with you scrag. But I agreed that it only apply in the dungeons or cave-like places. Nothing to do with citys, tranning areas or BOSS HOME PLACES (except for a mimic boss I think).

What do you guys think about all this cr*p? Very Happy
avatar
ricmax

Posts : 80
Join date : 2009-05-27
Age : 30
Location : Londrina - PR - Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  KaoroSorane on Wed Jun 24, 2009 6:58 am

ricmax wrote:Or we could use some low-powered server to do it and just use the real server to do the rest (something like use my PC to generate maps and Kaoro's one be the server, getting all the maps from my PC in a LAN, or better way, MY PC save the maps in the Kaoro's one, doing all the map crap while the server do it's own stuff).
Generating the maps is not what worries me most. It is sending the whole map to the client every time he goes into that map (even if it's sending just one map for each client). And if we split the work between two servers, aside from the obvious (both must be online and they're IPs must be static), the client would have to estabilish two connections.

Generating the random maps once in a week is more interesting if, instead of sending this information IN the game, the client updated a file once each week. It could be something simple, a .txt encrypted file that contains the information of the random map.

I still think we should create an array of predefined maps that are randomly chosen when the character enters the map.

There's also the possibility that we restrict the access to this map to specific situations (aka, a party quest that can only be accessed by characters within levels 30 and 35, for example), so that the server won't have to generate many maps.
avatar
KaoroSorane

Posts : 152
Join date : 2009-05-23
Age : 26
Location : Rio de Janeiro, Brazil

View user profile

Back to top Go down

Re: Random Map Generation

Post  scrag_10 on Wed Jun 24, 2009 6:59 pm

Well you perhaps could just have to send the random seed # to the clients and each PC could generate it on its own? If they have the same seed they should in theory end up the same.

Also, You can turn Random maps into Static'ness. As in Generated 1000 maps, and then save the generations, and include them in the Game.

So the Maps aren't generated on the fl, but before hand.

scrag_10

Posts : 55
Join date : 2009-06-02

View user profile

Back to top Go down

Re: Random Map Generation

Post  Sponsored content


Sponsored content


Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum