Questions tagged [tilemap]
Tile map is a technique of re-using small graphic pieces, tiles, over and over again to shape the game field.
719
questions
0
votes
1
answer
136
views
tile map collision with player not working - 2D c# xna
Currently the tile map is drawing fine but I am not sure how to proceed with collisions between the player and some of the tiles. Would it be better to specify certain tiles that the player can't move ...
0
votes
1
answer
904
views
Top down tile based game render order
I'm making a simple top down (like this) tile based game (using JavaScript, for reference)
I use Tiled for making maps. I have sprites that are more than one tile high, and so whenever they are in ...
0
votes
1
answer
283
views
LibGDX - Centering different sized Tile Map Levels
Suppose I have a Level 1 tilemap which is 32 x 16 tiles in size, and when the player exits into another room, which is on 10 x 6 tiles in size, what's the best way to center the viewport. At the ...
0
votes
1
answer
2k
views
Monogame - custom json content importer
I am trying to build a JSON tile map importer for the content pipeline of Monogame but I'm having difficulty doing so. I have been following this tutorial and got something... But now it appears my ...
0
votes
1
answer
555
views
js canvas tiled map - for loop, while, or matrix
I am making a top-down view tiled map in canvas, where player is always in the middle of the screen, and map scrolls depending on where you go, like in moba games. I also want it to loop infinitely in ...
0
votes
2
answers
510
views
2D Animated Tile rendering
The current game I've been working on needs to have animated tiles. I have a code for Tile and TileMap from my previous game ...
0
votes
1
answer
150
views
Tile collision detection
Right. So I was making this simple game. The player is two tiles wide, and four tiles high. My current code is really buggy (it was better before my rewrite)
Here it is:
...
0
votes
1
answer
617
views
LibGDX hexagonal tilemap getting adjacent tiles
How do I get all adjacent tiles to a hexagonal tile, my tile map is using a staggered co ordinate system with an odd stagger index and I am using libgdx java.
...
0
votes
1
answer
1k
views
Tile map collision C++, SFML
My problem with the collision here is more to do with how to decide which tile the player is in. Each quad of the map is 16 pixels squared (Vertex array), and the player moves in 1 pixel jumps. ...
0
votes
1
answer
643
views
0
votes
1
answer
439
views
How can I store tile maps as PNG images?
I want to let players of my top-down game save, load and share worlds as PNG images. How do I read the colors in a PNG file or change them?
I imagine something like this:
...
0
votes
1
answer
6k
views
How to draw the simplest grid map OpenGL 1.0 [closed]
I want to draw a simple black & white grid map, like that:
I have been searching for a way to generate tile, a tile map and tho and I want to draw this map and thats all. I mean that I want to ...
0
votes
1
answer
130
views
Network tilebased game updates design
I have a top/down grid based multi-player game. So I have a 2D array on the server that holds the entire map and a much smaller 2D array on the client that holds only what the client needs to see of ...
0
votes
1
answer
180
views
Tile map only rendering 1 layer when it should be 3 [closed]
I've been working on this for a while and I can not seem to figure it out. I had the fileParser() method in the constructor and it worked fine. Then I was told it's very bad practice to have it in the ...
0
votes
1
answer
131
views
TileMap not not rendering [closed]
I have a tile map that I would like to be able to move while playing the game. In the code you will see the posX and posY variables. I used these variables so that when I complete this, I can have the ...
0
votes
1
answer
391
views
Moving a tiled map in a jframe
I rendered a tiled map, with the help of slick2d, in my JFrame in Java. I can move my main character, but it is just that the character itself moves. I would like to do it that, if the player moves, ...
0
votes
1
answer
2k
views
How do I efficiently display image tiles in Unity 4.3 free
I previously wrote a TileEngine with SFML that I would like to port to Unity3D 4.3, but have not found a way to draw a tile on the screen programmatically in Unity.
All I am looking for something ...
0
votes
1
answer
271
views
updating 2d array to contain chunk of larger 2d array - for 2d tile map
What i need help with is how can i get a chunk of a large 2d char array and update it so i am only drawing enough tiles to cover the screen?
Currently, i load all the chars from a text file and store ...
0
votes
1
answer
1k
views
limits of tiles on tilemap, for mobile devices?
how many tiles are we allowed to add on a Tile map, using softwares like Tiled , to target mobile devices? Some devices cannot load a texture that exceeds 2048x2048, would you know how a tilemap works ...
0
votes
2
answers
3k
views
Simple 2d tile based lighting in xna
I am currently trying to implement simple lighting into my game. My world is represented in a 2d array of numbers, each number being a certain tile. I am changing the color parameter in the ...
0
votes
1
answer
2k
views
Top-Down Tilemap Rendering and Collisions in Libgdx
I'm sorry if this question has been previously answered, but I was unable to find an answer here or through google. I'm trying to make a simple roguelike-like that would feature a top-down tile map, a ...
0
votes
1
answer
230
views
Passing through edges of AABB collision
When I move, I grab the tile in front of the player, but when the player is colliding between two tiles, I grab the wrong tile due to rounding error. I made a video explaining what I mean.
As you can ...
0
votes
1
answer
869
views
Map handling - Indoors/Outdoors and loading large maps
I have two questions regarding the handling of maps.
Question 1. My map will consist of outdoor enviroments as well as dungeons, houses etc. How would I go on about connecting the outdoors with the ...
0
votes
1
answer
598
views
Should I make the Cells in a Tiledmap as null when my player hits it
I am making a Tile Based game using Libgdx. I took the idea from SuperKoalio platformer demo by Mario Zencher. When I wanted to implement Collectables in my game , I simply draw the coins using Tiled ...
0
votes
1
answer
999
views
How can I create a tile-based game map from a large source image?
I'm trying to make a huge tile-based map for my game. I've authored a large source image of the map and saved it, but now I'm unsure how to break this up into tiles and render it as a grid so I can ...
0
votes
2
answers
623
views
Building placement in tilemaps (pattern matching)
I'm building a small RTS and in my code I've given my buildings a pattern, much like you would pieces in tetris, i.e. I want to place irregularly-shaped buildings on a map without overlaps.
The map ...
0
votes
1
answer
265
views
General approach to isometrics
I am currently discovering the world of isometrics, now I found out there are two approaches to creating the tilemap;
Just create 2:1 ratio tile-images and draw those.
Creating squares and ...
0
votes
1
answer
2k
views
How to get tilemap transparency color working with TiledLib's Demo implementation?
So the problem I'm having is that when using Nick Gravelyn's tiledlib pipeline for reading and drawing tmx maps in XNA, the transparency color I set in Tiled's editor will work in the editor, but when ...
0
votes
1
answer
624
views
3d js map rendering
In the past I've done a 2D tile map using HTML, CSS and Javascript. Now I have the task of creating a 3D version using the same technologies - think of it like a space map where all planets have x/y/z ...
0
votes
1
answer
929
views
Google maps layer for strategic game
I found one web site http://e-sim.org/googleMap.html which is similar to my game idea. But I have no experience on game maps developing. Can anyone share ideas how to make similar functionality like ...
0
votes
1
answer
931
views
Moving a sprite over a tile map
I am working on a tile based game in Java. I have a 2D array of tiles (JComponents) in a GridLayout, this is fine for creating the world (I think), but I am stumped at how to move the sprite smoothly ...
0
votes
0
answers
18
views
Missing tiles when rendering an isometric Staggered tilemap in Unity
I'm trying to show tiles on an isometric staggered tilemap in Unity, but some tiles are missing. I think the problem might be with where I'm placing the tiles or some floating-point precision issues.
...
0
votes
0
answers
36
views
Character is stuck between grid cell gap [duplicate]
I started making a D&D-style turn based tactic game. I have a problem with my tilemap.
I made a script to find the location on the tilemap for my character and for the tile I clicked with the ...
0
votes
0
answers
39
views
Only first line/column of level text file gets loaded into tile map
I'm trying to make a map using a text file, but it only does the first line / column and not the rest.
I know the problem is in getTileImage.
...
0
votes
0
answers
39
views
Drag and Drop tile in TileMap
I am new to using TileMaps so I am not sure if this is possible.
How can I add a Drag & Drop option for my TileMap?
I have no problem identifying a click on a tile but don't know how to go about ...
0
votes
1
answer
111
views
How to set GameObject on tilemap through script
In the built in Tile Palette tilemap editor, you can choose a GameObject brush to set custom tile GameObjects. How would I be able to set a gameObject onto a tile through a script?. There is no ...
0
votes
0
answers
131
views
Navigation in a TileMap with 2 types of tile in 1 cell in Godot4
I'm stuck with the navigation in a TileMap based scenario in Godot 4. My intention is to make the enemy (boats) to chase the player while avoiding procedurally ...
0
votes
2
answers
47
views
How to calculate shadow position below arcing projectile in Isometric 2d tilebased grid?
I have an Isometric 2D grid-based tilemap, and am firing a projectile (at Vector P1 in image below) from the player (at Vector A) to a location "above" a target location (at Vector B). This ...
0
votes
2
answers
91
views
Drawing a box using rule tiles in unity
SO I have a tile sprite like so :
I want to use this to draw boxes on a 2d map using rule tiles. But I can't seem to get how to set rules for it in unity.
These are the rules I have :
And this is ...
0
votes
0
answers
383
views
How to draw thin borders / walls on a Godot tile map?
I'm trying to make a map of a home consisting of rooms with thin walls for a simple top-view game. I'm struggling to implement thin walls with the tile set.
Let me explain what I mean: if two cells ...
0
votes
0
answers
453
views
Possible to have Rule Tiles work with Rule Tiles in other Tilemaps in Unity?
I am using Rule Tiles to draw walls for my top down 2D Unity game. I have already been able to implement custom Rule Tiles that will work with each other (ie two different Rule Tile setups that still ...
0
votes
1
answer
603
views
Draw a player in an isometric tilemap in the right order
I'm trying to create an isometric tilemap world in Godot 4 beta 4. The world is made of blocks on top of each other where for every Y level (thinking the world like if its in 3D coords) there is a ...
0
votes
0
answers
265
views
How to render and interact with a seamless wraparound world map, in the style of e.g. Civ 5, in Godot 3?
I asked a similar question on the Godot subreddit but I want to ask here as well in hope of getting more detailed/different answers.
I'm making a world map for a turn-based tile-based 3D strategy game ...
0
votes
0
answers
38
views
Player Camera and Map Scrolling not working as intended
I'm creating a top-down 2D rpg game in c++, and I can't seem to wrap my head around the concept of map scrolling.
My camera system is centered on the player every time my player moves, (cameraPos = ...
0
votes
0
answers
37
views
Unity 2d - Creating Temporary Objects Within the Scope Of the Camera View
I want to create one large tilemap, and want objects placed on it like multiple blades of grass and trees. I want the tufts of grass and tree objects to be placed based on specific placeholder tiles ...
0
votes
1
answer
159
views
How to change the alpha of a tilemap if the player is in it in Unity
I'm working on a 2D game and would like to have it so when I'm entering a building, the roof fades away. This is my current attempt, I'd just like to know how to set the alpha of a tilemap through c#.
...
0
votes
0
answers
81
views
How to quickly calculate the number of tiles between buildings in a tile system
my friend and I are currently working on a city builder game like Anno/Cities Skylines but with some own ideas and tweaks. (of course, on a much smaller scale)
Currently, we are struggling a bit with ...
0
votes
0
answers
130
views
How to determine for every wall in a 2D tilemap where's the "inside"?
I'm working on an ARPG, and I'd like to implement a "fading walls" system similar to Diablo II's.
Let's say I have this tilemap, where
Black tiles are walls,
Brown tiles are floors,
White ...
0
votes
0
answers
52
views
Unity question about tilemap
So if I planning to make big location like for example Stardew Valley with tile size 32x32, should I make all map and just have it, or should I load tiles as player moves to them. I actually new to ...
0
votes
0
answers
141
views
My tilemap is semi-transparent
I am new to Unity, and I am following the following tutorial:
https://code2d.wordpress.com/2020/07/21/tilemaps/
However, my tilemap is semi-transparent. Any way to remove the transparency somehow? See ...