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  
  Map Editor Question  (Read 1110 times)
0 Members and 1 Guest are viewing this topic.
Offline Onatoko

Senior Newbie

« Posted 2011-11-15 22:07:06 »

Hey all,

I'm pretty new to Java gaming in general, and I was starting to make a 2D tile-based map editor. I was going to use a JPanel with GridLayout to contain all of the cells of the map. I was hoping for some feedback from the community to see whether this is the best method of doing this or not. If it is, would the performance bog down a lot for larger maps (such as 1000x1000)?
Offline Nyhm

Senior Devvie

Medals: 3
Projects: 1

Island Forge

« Reply #1 - Posted 2011-11-15 22:15:21 »

Ultimately, JPanel with GridLayout might not do all you'd like. From personal experience, it probably won't. Every time I've tried that approach, I've discarded it.

That said, it's a fine way to start out. Extend JComponent (or even JPanel) for the cell elements. It'll probably melt down at 1000x1000 cells, but I'd give it a try.

Island Forge: Create Islands with Stories for Others to Explore!
Free-to-Play with Membership and Upgrade options!
Offline R.D.

Senior Devvie

Medals: 2
Projects: 1

"For the last time, Hats ARE Awesome"

« Reply #2 - Posted 2011-11-15 22:24:35 »

Stop! before doing anymore think about what you want. Do you need your own Map-Editor or is it okay if you use e.g. Tiled. Trust me, as a Newbie you want to use that. Making your own Map-Editor is fine and all but I bet you want to use that for a game right? Your saving time if you use Tiled instead Smiley
I had to make one for school and it is not as easy as you might think Wink
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Onatoko

Senior Newbie

« Reply #3 - Posted 2011-11-15 22:34:27 »

Yes, I'd like to use these maps for a game I will be making. I have Tiled but I thought that it'd be a good project to start off with making a map editor for myself though so I can get more used to Swing and other graphical components. Also I'd have the freedom to make it whichever way I want.
Offline Fokusas

Senior Devvie

Medals: 3
Projects: 1

« Reply #4 - Posted 2011-11-16 07:00:00 »

I don't know what map you are trying to create, but I suggest to  override JPanel (or whatever you are painting it) paint method for custom painting.
Offline BoBear2681

JGO Coder

Medals: 19

« Reply #5 - Posted 2011-11-16 19:48:45 »

As R.D. noted, if you decide to write your own editor, be prepared to spend *a lot* of time on it.

Like Cas mentioned in another recent thread, doing something like this (making your own tools) is lots of fun for some of us, and appeals to the "engineer" in us.  Just keep in mind that map editors already exist (such as Tiled), almost surely have more features than the editor you'll write, and definitely will have fewer bugs (since they have so many users that can stumble on things, most problems have already been worked out).  Writing one yourself will be fun, but it'll take time away that could be spent writing your actual game.
Offline Cero
« Reply #6 - Posted 2011-11-16 20:02:30 »

coincidentally I have a recent post of mine with screenshots

I just render a 2D array of Images just like in-game

As mentioned - its a hell of a job
Programming an editor is much work and not fun at all - debugging and all... and if someone else has to make maps with it, its even worse
however its often necessary if you have your special needs

but you know - doable with dedication...

Offline Nyhm

Senior Devvie

Medals: 3
Projects: 1

Island Forge

« Reply #7 - Posted 2011-11-17 00:04:03 »

As others have stated, it's all about your motivations. To learn Java/Swing/GUI coding, a map editor makes for a good project, because you can start very simple (colored squares) and keep adding features, all while learning about Swing painting and GUI interaction, etc. I'd say go for it. Make a little grid editor and post a JNLP link here for others to try it. Making anything that others can try is a huge step in the right direction (and is very motivating).

Island Forge: Create Islands with Stories for Others to Explore!
Free-to-Play with Membership and Upgrade options!
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Jesse (12 views)
2015-07-29 04:35:27

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

Riven (18 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 (30 views)
2015-07-25 00:14:37

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

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

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

NoxInc (18 views)
2015-07-22 22:13:39
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!