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  
  Map Editor Question  (Read 973 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
http://alchemic-tempest.com/?site=news&id=2937

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.

 

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 (33 views)
2014-12-15 09:26:44

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

BurntPizza (51 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 (59 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!