Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (601)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Connecting, stitching, and rendering your overworld areas together in a 2D RPG.  (Read 1152 times)
0 Members and 1 Guest are viewing this topic.
Offline tom_mai78101
« Posted 2014-03-27 23:53:51 »

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.

Offline moogie

JGO Ninja

Medals: 16
Projects: 6
Exp: 10 years

Java games rock!

« Reply #1 - Posted 2014-03-28 03:48:28 »

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.

Java4k RIP 2014
Offline tom_mai78101
« Reply #2 - Posted 2014-03-28 05:05:43 »

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?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline moogie

JGO Ninja

Medals: 16
Projects: 6
Exp: 10 years

Java games rock!

« Reply #3 - Posted 2014-03-28 05:08:27 »

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

Java4k RIP 2014
Offline LiquidNitrogen
« Reply #4 - Posted 2014-03-28 05:30:50 »

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.

Offline tom_mai78101
« Reply #5 - Posted 2014-03-28 08:24:39 »

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.
Offline LiquidNitrogen
« Reply #6 - Posted 2014-03-28 08:42:07 »

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

Offline tom_mai78101
« Reply #7 - Posted 2014-03-28 23:43:36 »

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.
Offline LiquidNitrogen
« Reply #8 - Posted 2014-03-28 23:50:45 »

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.

Offline tom_mai78101
« Reply #9 - Posted 2014-03-29 01:28:39 »

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.

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Riven (26 views)
2015-07-27 16:38:00

Riven (16 views)
2015-07-27 15:35:20

Riven (20 views)
2015-07-27 12:26:13

Riven (10 views)
2015-07-27 12:23:39

BurntPizza (26 views)
2015-07-25 00:14:37

BurntPizza (39 views)
2015-07-24 22:06:39

BurntPizza (22 views)
2015-07-24 06:06:53

NoxInc (25 views)
2015-07-22 22:16:53

NoxInc (17 views)
2015-07-22 22:13:39

Jesse (39 views)
2015-07-22 03:10:36
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!