Questions tagged [tiles-game]

Use "tiles-game" when referring to tiles based games and not "tiles".

Use "tiles-game" when referring to tiles based games and not "tiles" as the later is reserved for the Apache tiles framework.

29 questions
4
votes
1 answer

Correct tile movement for a 2048 game

I decided to make a 2048 Command Line Edition but I'm having trouble getting the right tile movement... My current structure is that the board is a 2D array (4x4) of ints. When an input is received, it will try to push every tile in that direction…
mnordber
  • 1,143
  • 2
  • 13
  • 18
4
votes
3 answers

Path with least turns in rectangular grid algorithm

I am stuck for last 4 days in an algorithm. I am working on Mahjong Safari type game (http://www.pogo.com/games/mahjongsafari), and I want to develop path between two tiles with least number of tiles. I already applied A* algorithm with Manhattan…
2
votes
1 answer

How to draw thousands of tiles without killing FPS

I've looked everywhere for a workaround to this issue (I may just be blind to see the solutions lying around). My game currently renders the tilemap on the screen and will not render tiles that are not actually within the screen bounds. However,…
Sarkilas
  • 76
  • 7
2
votes
1 answer

Isometric, draw only on screen tiles

I need to draw only the tiles on screen to increase performance. What is a viable way to do this? I tried this that brings me close but end up with a bug i cant seem to solve. //world position to start drawing from int sPosX =…
Madmenyo
  • 8,389
  • 7
  • 52
  • 99
1
vote
1 answer

How can I incorporate modulo arithmetic to allow my tiles to skip over other tiles?

def main(): global FPSCLOCK, DISPLAYSURF, BASICFONT, RESET_SURF, RESET_RECT, NEW_SURF, NEW_RECT, SOLVE_SURF, SOLVE_RECT pygame.init() FPSCLOCK = pygame.time.Clock() DISPLAYSURF = pygame.display.set_mode((WINDOWWIDTH, WINDOWHEIGHT)) …
Super
  • 11
  • 2
1
vote
1 answer

Java, Level Editor Issue

i have ran into a quick problem which i do not know how to do it by myself but i'm sure with your help i will understand more. I've created a level editor for the game engine i am creating and i am trying to make the mouse position snap to a…
NightX
  • 47
  • 7
1
vote
1 answer

How to add square tiles to leaflet map with hovering effect?

I want to split my map into tiles/territories. So i've prepared another layer showing squares. But this layer is full of .png image files so there is no data/object for this squares. I've also tried to draw squares with leaflet's geometry objects.…
Umur Gedik
  • 477
  • 5
  • 12
1
vote
0 answers

Find corner cell of TileMap?

Problem when detecting corner cell of tile map??? private void getTiles(int startX, int startY, int endX, int endY, Array tiles) { TiledMapTileLayer layer=(TiledMapTileLayer)WorldRenderer.map.getLayers().getLayer(0); TiledMapTileLayer…
Neha Agarwal
  • 622
  • 7
  • 24
1
vote
2 answers

Set of tiles - calculate outline path

Problem (psuedo) How to find the outline of a set of tiles? Let's assume we have three tiles, at the x/y coordinates A[20,20], B[20,30] and C[30,30] (this will make a simple L-shape). Those points represent the centers of the tiles. Each tile has 4…
1
vote
4 answers

Removing data safely from an arraylist

I have an array list that contains tiles in it. When I place a new tile down, the new tile is placed over the old one, but the old one is still there and can cause problems. For example, there is a stone tile that the player cannot walk through. An…
user1650305
1
vote
1 answer

How to optimize tile rendering in pygame?

I am making a tile based game, and the map needs to be rendered every frame. Right now, each tile is 32X32, and the visible map is 28X28 tiles. The performance is dreadful. I recently made it only render the visible tiles, but this still did not…
user1735876
1
vote
1 answer

Eclipse - Android App- Square tiles menu

Eclipse- Android app I am trying to make a menu of "square" buttons - 3 buttons in a row - Each button has a background image ... I was able to make the columns of equal weight , but I can't figure out how to make the heights of the buttons to be…
0
votes
2 answers

How to find unconnected room groups?

On the process of building a dungeon generator you need to solve several problems involving unconnected rooms, and I can't find a solution for the last one I found: I can easily detect unconnected rooms, but when it comes to unconnected rooms groups…
0
votes
1 answer

Mismatching between TMX map in Tiled and the one loaded in Andengine

I am creating my own TMX map in Tiled. I've imported some Patterns Set and set them in the corresponding Tile Layer. The map looks good in Tiled but when I load it in my level using Andengine, the images displayed in each tile are different to the…
Barbara PM
  • 512
  • 2
  • 8
  • 29
0
votes
1 answer

getting rectangular coordinates of tiles of a 2D map

I have a 2D tile map (made of 25 tiles, each 30*30 pixels) drawn on a JPanel. How can I get the rectangular coordinates of each tile?
anonymous
  • 448
  • 1
  • 6
  • 25
1
2