Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
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 753 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 Knight


Medals: 12
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.
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 Knight


Medals: 12
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.
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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Pippogeek (37 views)
2014-09-24 16:13:29

Pippogeek (29 views)
2014-09-24 16:12:22

Pippogeek (18 views)
2014-09-24 16:12:06

Grunnt (42 views)
2014-09-23 14:38:19

radar3301 (24 views)
2014-09-21 23:33:17

BurntPizza (61 views)
2014-09-21 02:42:18

BurntPizza (30 views)
2014-09-21 01:30:30

moogie (36 views)
2014-09-21 00:26:15

UprightPath (49 views)
2014-09-20 20:14:06

BurntPizza (52 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!