Hey, I've recently joined JGO after lurking around for a few days and I figured I'd ask a question about one of the ideas that I've been throwing around. Without any more fluff I'll just ask my question.

When creating a map for a 2D top-down RPG what would be the best way to create the game world/the maps?

My idea, which has probably been thought of before, would be to have two 2D arrays which would control which map tiles are where and which tiles you can/cannot walk on. The first array would simply hold a number, say 1 is flat and 2 is a hill, and then when you start up the game it would go through the array and spawn the flat tiles where the 1's are and the hill tiles where the 2's are. After that, when the player moves their character from tile to tile, the second array would be checked to see if the player can/cannot move onto the tile. (I've only learned the very basics IMO of Java so-far, but I figured that I might as well think about ways to get things to work for later on.)

Use a one dimensional array of Tile objects which contain various properties, such as image, rotation, isWalkable, isTrap, damageAmount, etc. The properties would be tailored to your game's needs. Then you would access the array like so:

Well, its not always easy to find when searching. I'm even having trouble ^^Are you using any sort of library, like Slick2D, libgdx or something?

I did this a while ago, and I ended up making a Tile-class. Each tile would have an ID, a "passable"-boolean, and a few other pieces of information. Then my maps would have an int[][] of the IDs, and I'd run through it drawing each tile separately.

I'm just theorizing about how to do this, I'm far from being able to create a game at the moment but I enjoy trying to come up with ways to do things with what I do know. Thanks for all the tips so far!

What he wants to do is perfectly fine. And to speak directly to you: Do it like Nike does. Just do it.In the beginning you'll learn from making 'mistakes'... even if I'd say this is far from being a mistake. This is what many people do in many games. And this is how you start off.

@OP: I'd say you're able to create a game. When I was new to java (about a week or two after diving into it) I'd say I created something which could be called somehow near a game. Tho there was no gameplay...I'm pretty sure one is able to create a game pretty early, as long as it is a small one.

What he wants to do is perfectly fine. And to speak directly to you: Do it like Nike does. Just do it.In the beginning you'll learn from making 'mistakes'... even if I'd say this is far from being a mistake. This is what many people do in many games. And this is how you start off.

@OP: I'd say you're able to create a game. When I was new to java (about a week or two after diving into it) I'd say I created something which could be called somehow near a game. Tho there was no gameplay...I'm pretty sure one is able to create a game pretty early, as long as it is a small one.

Thanks for the advice, I think I might try creating a small game sooner or later but not before I learn even more! ^.^

I have one more, off-topic, question. I've noticed that people have given me 'medals' which I believe to be some sort of 'reputation' and I was wondering how I can give some out to people that have helped me.

You could combine game making with learning (more business related) Swing GUI Programmingand try to create your own tile edior. Look up some 2D tile editors for what features they have.(Placing graphical tiles, entities, triggers in a Gridlevel and arranging this in different layers, template brushes)

This way you learn tool programming (important part of game making) and also Swing GUI progamming (wich might later be useful in a more settled programming career)

With a good tool and optimized workflow your can create content much faster and convenient.(Really needed since RPGs are very content intensive)

I have one more, off-topic, question. I've noticed that people have given me 'medals' which I believe to be some sort of 'reputation' and I was wondering how I can give some out to people that have helped me.

The 'Appreciate'-Button next to the 'Quote'-Button next to the 'Reply'-Button

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