• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Thoughts on implementation of randomized maps in Red/Yellow/Blue or any gen?

200
Posts
10
Years
    • He or They
    • Seen Jun 19, 2022
    You've probably heard that they originally planned to make over 60,000+ different versions of Red and Blue, considering there is an article here about it.

    So that has me thinking. What are the ways we could actually implement map randomization? One relatively easy way would probably be altering the warp code so it sends you to a completely random map each time, somewhat more difficult would be randomizing the warps just once per playthrough so that, like the above concept, each run of your game is a different version and that world is self consistent. A problem is how is the randomization being stored? In memory for each warp? That's a lot of memory for such an old game. A psuedorandom seed could get around that problem using the trainer ID, but then how do you avoid soft locks, like maps that just warp back and forth to each other and no others or orphaned maps? With sufficient space and speed you certainly could handle every case, so my guess is iterating through each map and having a list of number of warps for each one and then, hm, have the map add its number to the 'warp seed'.

    So initial seed giving a 'warp offset' + map number, iterating one by one over every warp in a modulo clock sorta way, could work but might not be quite as random as desired... Let's say you got 'seed offset 4', then map one links to map four warps, map two links map five, etc. But then also you'd have to be careful with the fact not every map has the same amount of warps. This could be fixed by adding more warps to every map that has less than some optimal amount (And probably would help a lot with softlocking or other issues, like accidentally ending up elite four before you get a pokemon and not being able to back out...).

    However, I profess the randomization map methods I'm really interested in are:
    1. Appearance changes of actual maps. Swap in random palettes and image changes depending on 'version', so instead of a forest you get a cave.
    2. Layout changes.
    Layout changes, like super mystery dungeon, are really hard to do right.

    But, there is one advantage we have: the path finding algorithm. If I remember correctly, there is a way of generating mazes from utilizing a path finding algorithm, so Pokemon Yellow would actually be the best bet I think to actually implement random mazes, because it has a fairly good one utilized by Pikachu, I think a version of A*Star. This is actually an advantage it has over Gen III, which does not have a path finding algorithm attached and not yet hacked in either to my awareness (I suppose someone could eventually port from Mystery Dungeon if that gets fully disassembled), leading to all sorts of difficulties in trying to implement Follow-Me - if a character lags and you stop, it stays lagged last I checked on Gen III's follow me progress.
    The basic idea for mazes is that you run the path finding algorithm on an empty map and stop with the first path it finds between two random points (your chosen exits) - a likely suboptimal path, zigzagging, which is perfect for maps. You then draw that path on a map full of obstacles, rinse and repeat, maybe chunk out a few 'rooms' randomly of empty space on one of the paths.
    I don't know if this would really be possible, but it would be cool as heck to have full randomization of maps. If Method Two isn't possible, then Method One (or the warp method) could still be fun, and maybe one could do a very limited randomized dungeon layout by having a few pre-generated maps and simply swapping them out depending on your 'version'. This would involve fiddling with how maps are loaded, probably do a check for a specific map and then override the usual header loaded before anything in the game actually acts on it.
     
    536
    Posts
    4
    Years
    • Seen yesterday
    For gen 1? It's possible to alter the map on the fly by directly writing to VRAM. This is how cut-able trees are implemented.
     
    Back
    Top