Hello everyone. I want to connect roads in a random generated way so that every time a player goes in that road, it sets the pathway (replayability value). Maps have 2 or 3 exit points and my initial thought was to work as follow:
* Set for every map a variable equal to map number assigned (map 1 -> variable 1 =0; map 2 -> variable 1 = 1; ... ; map 20 --> variable 1 = 19).
* Then track the map sequence which is generated by the path:
e.g Map 1 -> Map 3 -> Map 11 -> Map14
But this would work only in a linear road. However when the Maps splits in three it's way more difficult:
e. g.
Map 1 -> Map 3 -> Map 11 -> Map14 ->
Map 1 -> Map 3 -> Map 4 -> Map 6 ->
How can I store the sequence generated ? e.g. 3, 6, 16, 17, 2, 1, 7, 11 and so on, in the specific order?
My idea was then: instead of tracking the map sequence, it should be set and stored the teleport location connections.
e.g.
Map 3 X,Y (1, 0) & Map 6 X, Y (18, 17);
Map 2 X, Y (5, 6) & Map 11 (11, 10);
.....;
Map 16 X, Y (15, 46) & Map 4 (13, 6);
In this perspective, there's a set of coordinates which are corresponding to teleports in each map and they need to match each other in a logic direction.
* What is the smartest and most efficient way for realize this by just eventing the whole problem?
* How many variables would be needed considering 1-20 Maps can exist at once and 90% of them have just 2 exit while 10% have 3 exits?
Here another approach to the same problem:
forums.rpgmakerweb.com
Another way could exist in:
- generate the sequence from a set (1, 2, 3, ..., 20)
- set teleport based on the sequence generated
But again I find difficult to track threeways back.
Another option:
* create a grid so that every map has three variables associated:
- map ID; grid coordinates; orientation (1-4)
Then another variable would decide the teleport X and Y, based on grid movements.
But still can't figure how to realize it by the least complication possible.
* Set for every map a variable equal to map number assigned (map 1 -> variable 1 =0; map 2 -> variable 1 = 1; ... ; map 20 --> variable 1 = 19).
* Then track the map sequence which is generated by the path:
e.g Map 1 -> Map 3 -> Map 11 -> Map14
But this would work only in a linear road. However when the Maps splits in three it's way more difficult:
e. g.
Map 1 -> Map 3 -> Map 11 -> Map14 ->
Map 1 -> Map 3 -> Map 4 -> Map 6 ->
How can I store the sequence generated ? e.g. 3, 6, 16, 17, 2, 1, 7, 11 and so on, in the specific order?
My idea was then: instead of tracking the map sequence, it should be set and stored the teleport location connections.
e.g.
Map 3 X,Y (1, 0) & Map 6 X, Y (18, 17);
Map 2 X, Y (5, 6) & Map 11 (11, 10);
.....;
Map 16 X, Y (15, 46) & Map 4 (13, 6);
In this perspective, there's a set of coordinates which are corresponding to teleports in each map and they need to match each other in a logic direction.
* What is the smartest and most efficient way for realize this by just eventing the whole problem?
* How many variables would be needed considering 1-20 Maps can exist at once and 90% of them have just 2 exit while 10% have 3 exits?
Here another approach to the same problem:
Random connected maps
Hello, Ok, so here´s what I would like to do: - Connect several maps (around 20, selected out of 25) through teleport events. - Each map could have one, two, three or four exits/teleport events. This info would be defined in each map - Each exit/teleport event would connect to...
forums.rpgmakerweb.com
Another way could exist in:
- generate the sequence from a set (1, 2, 3, ..., 20)
- set teleport based on the sequence generated
But again I find difficult to track threeways back.
Another option:
* create a grid so that every map has three variables associated:
- map ID; grid coordinates; orientation (1-4)
Then another variable would decide the teleport X and Y, based on grid movements.
But still can't figure how to realize it by the least complication possible.