Connecting, stitching, and rendering your overworld areas together in a 2D RPG.

This is an issue I’m facing right now, and couldn’t come up with a good solution, however bad it may be when compared to old school RPG games that has overworlds.

You have a lot of areas of different sizes and shapes. In each areas there are connection points where two different areas meet. I’m having problems with moving my character to and from any two areas, and couldn’t render them together on the screen with the connection points connected correctly.

For a visual example, I’m trying to do something like this, but with areas broken into separate pieces. That overworld map is the entire world of Pokémon Blue.

Does anyone have clues as to how this was achieved? Thanks in advance.

if your area connection points do not visually match then you cannot directly nicely render them together as you have stated. You may need to render the overworld save it to a file and then manually make pixel-level changes to the image to smooth the transitions and the render that instead.

Do you mean drawing my overworld map into one big file, and then save it so that the game can load all of the overworld and draw only visible portions of it on the screen?

yes, however the critical point is that if the connection points do not line up then manual intervention is required.

cant you just give each map ‘room’ a co-ordinate relative to the center of the world? then make a routine which you can pass a x,y world co-ordinate to, and it will return which room that is in + x&y-room-co-ordinates. also make the reverse of that routine: tell it which room youre in and what room co-ordinates, and it will return world co-ordinates.

theres a bit more to it than that, but once you have a way to tell how each of the rooms relates to one another it becomes much easier.

Thanks moogie.

To LiquidNitrogen:

I have a hard time thinking on how to do that and its reverse.

My game design is based on positional movement, and not using any Cartesian coordinates. The positional movement is used so I can render bitmaps pixel by pixel, and obtain crucial information from each of the pixels.

So, it is really hard for me to rewrite almost everything. I’m going to have to go with moogie, and sacrifice memory to finish the job at hand.

Once I have the whole thing complete, I’ll try rewriting the base code, so that it has Cartesian coordinates incorporated.

Im not sure what you mean by positional movement? It looks like youre using a grid.

Nope, it may look like it is using a grid, but really, the underlying core of the rendering engine depends on positional movements magnified by a factor of 4.

I use tons of layers to create an illusion of gridlike movements. They are achieved by using offsets dependent of the character’s position.

why do you need tons of layers to achieve gridlike movement? Im trying to understand how your game works, with regards to how it can stitch together map areas, since ive tried to do that myself once, but im not sure what youre talking about lol.

Each area is drawn via image editor, such as Paint.NET or GIMP. I use the former to draw sections of the overworld, so that when a character moves from A to B on the overworld, I am just moving the overworld layers.

Stitching together areas require use of multiple layers to create the effect of seamingless transitions between two areas. I use another abstract layer to draw the character and to determine the tile below it the characteristics and properties that may affect the player.

It is a design that uses what emulators can achieve.