Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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  
  Make 2D Map without tiles?  (Read 358 times)
0 Members and 1 Guest are viewing this topic.
Offline israelg99

Junior Devvie





« Posted 2014-03-28 17:47:39 »

Hello how can i make a 2D map but without tiles?

Something like this -


Ignore everything, just look at the ground structure. its not tiles i suppose. actually i don't even know how its called.
How can i make something like this?

The character can go only left and right.
Offline opiop65

JGO Kernel


Medals: 161
Projects: 7
Exp: 4 years


JumpButton Studios


« Reply #1 - Posted 2014-03-28 17:49:16 »

Its just a mesh. Basically a bunch of triangles that connect together (generally in a triangle strip). Look into heightmaps or mesh generation. There's no one way to answer your question, so don't expect a clear cut answer.

Offline Spacebeans
« Reply #2 - Posted 2014-03-28 18:02:53 »

There is two ways:
 * Using code
 * Using maps

By using code you have allot easier to make "scripting". By that I mean that calling methods or actions making the map funner for the player, and more interactive.
By using the map it is easy for other people to export maps and load them into the game.

While both are nice, it is better to use both. For example; making a map with a few trees, ground, and the player gets drawn over it. Then adding elements into your XML map file, that are invisible to the player, make it easy to trigger events from the player interacting with its bounding box.

There is a good tutorial on XML parsers here: http://www.mkyong.com/tutorials/java-xml-tutorials/
PS. Parallax Scrolling is awesome for side-scrollers: http://en.wikipedia.org/wiki/Parallax_scrolling
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline israelg99

Junior Devvie





« Reply #3 - Posted 2014-03-28 18:04:55 »

So the program Tiled will be good to create something like it?
Offline Spacebeans
« Reply #4 - Posted 2014-03-28 18:09:19 »

So the program Tiled will be good to create something like it?

Partly. You could render it half in tiled, then the stuff you want off grid, above the tiled map.
Like this:

1  
2  
3  
4  
5  
6  
7  
8  
public void render(){
     tiledmap.draw(sceneX, sceneY);
     imageIWantOffGrid.draw(imageX, imageY);

     player.draw(playerX, playerY);
     
     imageThatsOverThePlayer.draw(imageX2, imageY2);
}
Offline The Lion King
« Reply #5 - Posted 2014-03-28 18:11:09 »

Cut it into tiles anyway, but make seamless tiles so you cant see the "squares." I would make a couple seamless tiles of each type you need (sand, grass, water, etc.), You could add things like trees directly on the textures or draw them separately. To make it look especially good you could make transition tiles or put small tiles that overlap the transition with the transition texture on it.

Point is, mess around and see what works. Be creative with it Smiley and look into how to make seamless tiles.

edit-

looking at past posts i may have misunderstood the question. Or the question is just way to broad. Probably both. You should narrow down your question to ask about the certain effect you are trying to achieve.

"You have to want it more than you want to breath, then you will be successful"
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.

rwatson462 (32 views)
2014-12-15 09:26:44

Mr.CodeIt (23 views)
2014-12-14 19:50:38

BurntPizza (50 views)
2014-12-09 22:41:13

BurntPizza (84 views)
2014-12-08 04:46:31

JscottyBieshaar (45 views)
2014-12-05 12:39:02

SHC (59 views)
2014-12-03 16:27:13

CopyableCougar4 (58 views)
2014-11-29 21:32:03

toopeicgaming1999 (123 views)
2014-11-26 15:22:04

toopeicgaming1999 (114 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!