Java Tiled Map Game (LibGDX) | Episode 1 - creating Tiled Maps

preview_player
Показать описание
Welcome to my new mini tutorial series in which we're going to create a basic game prototype with tile maps. The popular map editing tool Tiled will be our map editor.

This series will cover:
- creating Tiled Maps
- rendering orthogonal and isometric maps
- creating the Player and applying gravity
- collision detection
- moving the player
- animated tiles
- object layers

You can find the source code, maps (and tilesets) in my repository:

I hope these videos are helpful. Thanks for watching!
Рекомендации по теме
Комментарии
Автор

fantastic - I've just started libgdx and was looking for a good tutorial like this 

thanks !

firstname
Автор

Thanks for the videos, they are very helpful. I just started using LibGDX and like it so far.

TripleBWow
Автор

Thanks for the videos, after watching your tutorial videos, i start loving

ashurajput
Автор

How to center the map after it is created, and how do I not lose resolution for android? Thanks for the tutorials! CONTINUES!!

mmdgamestutorial
Автор

Dermet, i just want to thank you again! you RULE AS A TEACHER AND PERSON YAY!!!

EverlastingSky
Автор

The camera.position is always the center of the screen, so you could just set it to the center of the map (camera.position.x = mapLayer.getWidth() * mapLayer.getTileWidth() / 2;).
You don't have to worry about the resolution, the camera takes care of it (see the viewport width and height in the resize method). On android, things are probably going to be bigger, but you can increase the viewport size to adjust everything to your likings.

dermetfan
Автор

Hello dermetfan I wonder how to do the isometric map appears completely not only a part of it, and like to put character and make him move on this map can help?

mmdgamestutorial
Автор

Just make the camera viewport bigger and move the camera to the center of the map. What you see all depends on the camera.
For the player, most of it is the same as with orthogonal maps like in episode 3. You don't need the gravity though, I can hardly imagine it making sense on isometric maps. To move correctly on isometric tiles, use combinations of velocity.x and velocity.y values (for example, move to top left: x = -speed, y = speed / 2);.

dermetfan
Автор

Transitioning between terrain types seems to require a lot of transition tiles. And objects like the fence in this video would need different tiles for each terrain type it should be placed upon. It seems like this would escalate rather quickly when you are working on a game. How do you best handle terrain transitions and such?

Majskolvenz
Автор

Yo you checking out Birth control or why is it in your bookmarks?

blemint
Автор

Could you please put a download link to the pokemon tileset?
Keep up the tutorials!

superlavago
Автор

I have a question. Suppose You have a map of 800*20 tiles and you have to show 32*20. I have done it by setting cameraToOrtho(false, 30, 20); I was using your code but I am unable to understand what width height should I set to player in your constructor and How can I limit player not to fall from tmx ended or start. Please update your code  fully to understand it..

GaggleAim
Автор

After I installed tiled map editor, the programan cant run, why? 

aldomalaca
Автор

There's only 1 thing that I want to know which No One has addressed for whatever reason that I can't even figure out why.
I want to move around tiles after they have been placed, how do I do that?
Like if there's a section of a stage which I want to place somewhere else without having to delete it and recreate it.

HiddenForbidden
Автор

Can we generate it without the tileset thing? I'm not sure authors would be happy after they find out that somebody's using their copyrighted material for commercial purpose.

LosEagle
Автор

hi dermetfan, i just have a request that would make me very happy and i think not just me, well it's about dialogs in games, i would like to see a small implementacion of you,  of a dialog in this type of game when the player is talking with other character or something like that, well thats it thanks for all this tutorials and to take the time of doing them, well see ya

jorgeasdrielreyespaniagua
Автор

Hi Dermatfan! Thanks for your great tutorial video. However, I've problem when I import your project into Eclipse. It says project "TiledMapGame" is missing required java project "SomeLibgdxTests." I've already checked the library and all your folders but I can't find it. Can you tell me how to resolve it?

wealthgeek
Автор

Oh god :D Sure I'd record this video, but you should think about how useful this would really be because of the bad timing:
The loader is currently broken due to changes in LibGDX. There is a fix made by a guy called Manuel which runs for me, but I get a bit different results than in the editor sometimes. Also, Aurelien Ribon plans to release a new version which is already in development.
For now, maybe what I talk about in episode 7 is enough.
Consider these things and tell me what you think ^^

dermetfan
Автор

Hi, Thanks for your great tutorials. Can you please tell me why I get this error "Texture width and height must be powers of two: 343x410"

nikolamk
Автор

i cant get the grid to pop up in tiled, HELP!

zaf