Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
8 votes
5 answers
5k views

Designing a flexible tile-based engine

I'm trying to create a flexible tile-based game engine to make all sorts of non-realtime puzzle games, just as Bejeweled, Civilization, Sokoban, and so on. The first approach I had was to have a 2D ...
Vee's user avatar
  • 261
8 votes
1 answer
2k views

Tile-based 2D collision detection problems

I'm trying to follow this tutorial http://www.tonypa.pri.ee/tbw/tut05.html to implement real-time collisions in a tile-based world. I find the center coordinates of my entities thanks to these ...
Vee's user avatar
  • 261
7 votes
2 answers
407 views

What would be the best way to find an open space in a level?

I'm working on a 2D game where you use paint to add tiles to a level and right now I'm working to add warp tiles. I have it set up so certain direction-oriented paints use two points (a start and end) ...
IronGiraffe's user avatar
6 votes
2 answers
1k views

Arrays for a heightmap tile-based map

I'm making a game using in C# and Javascript that uses a map which has tiles, corners and borders. Here's a graphical representation: I've managed to store tiles and corners in memory but I'm having ...
JPiolho's user avatar
  • 315
6 votes
1 answer
4k views

How to make different Rule Tiles interact with each other?

I am using Unity's RuleTiles to automatically change sprites of adjacent similar blocks. For example, when a Dirt tile notices there are two ...
caleidon's user avatar
  • 591
6 votes
5 answers
2k views

Need some advice regarding collision detection with the sprite changing its width and height

So I'm messing around with collision detection in my tile-based game and everything works fine and dandy using this method. However, now I am trying to implement sprite sheets so my character can have ...
Frank Scott's user avatar
5 votes
2 answers
3k views

How do I resolve a collision of a rectangle with two rectangular tiles at once?

I am having some problems with collision detection between a player and the environment in a tile-based game. I have a player objects, Tiles and what I call ...
Androme's user avatar
  • 81
5 votes
1 answer
6k views

How to create a 3D world with 2D sprites similar to Ragnorak online?

As far as I know Ragnorak Online is a 3D game world with 2D sprites overlayed. I would like to use this style in a game I am making in Unity, so I would like the player to be able to select little ...
Dustin Kingen's user avatar
4 votes
2 answers
6k views

Loading and unloading "chunks" of tiles in a 2d tile engine with 2d camera

I am making a 2d tile based game in C# and XNA 4.0. I am having trouble loading and unloading "chunks" of tiles(blocks). The whole world is randomly generated and is infinate on both axis. How would I ...
ceriosNerd's user avatar
4 votes
2 answers
17k views

Fast, simple procedural 2d island generation

I need to generate tile data for an island based rpg, my goal is have something that looks like this (mountains not required): For the past few days I have been trying to figure out a satisfactory ...
Neophyte's user avatar
  • 583
4 votes
3 answers
3k views

Rendering tiles on 3/4 perspective

Using a 3/4th perspective, I'm trying to create a way to render cliffs where nothing is overlapped, and it creates an accurate representation of the elevation. This is a rough mockup of how it might ...
Patrick Moriarty's user avatar
4 votes
1 answer
863 views

Character jittering with this tile based collision code

I have been trying to get my collision code working for hours now but with every resource I have tried my character still jitters. First I tried using the platformer sample but my character still ...
Frank Scott's user avatar
3 votes
1 answer
2k views

2D Camera Acceleration/Lag

I have a nice camera set up for my 2D xna game. Im wondering how I should make the camera have 'acceleration' or 'lag' so it smoothly follows the player, instead of 'exactly' like mine does now. Im ...
Cyral's user avatar
  • 1,039
3 votes
3 answers
615 views

Tile based platformer, using larger tiles?

So for my tile based platformer, It has a grid of tiles Occupying 1x1 block for each one. However, What if I want larger tiles? Maybe doors, tables, etc. They wouldnt fit in a 1x1 tile, so what I ...
Cyral's user avatar
  • 1,039
3 votes
1 answer
750 views

Need some insight on mesh triangulation and geodesic spheres

I am making a game that's going to use a Class 1 (This is (n,0)) Goldberg Polyhedron as the map, that is I'm planning on using the hexagons and 12 pentagons as tiles for a tile-based game. When it ...
Heat Ice's user avatar
3 votes
1 answer
299 views

How do I make an AI that stays at a distance from the player act correctly when cornered?

I am working on a few different AIs for a tile-based game. I'm trying to figure out one where that tries to keep a certain distance from the player. So if distance becomes small, move away. The whole ...
allegroBegin's user avatar
3 votes
2 answers
2k views

Zelda-style top-down RPG. How to store tile and collision data?

I'm looking to build a Zelda: LTTP style top-down RPG. I've read a lot on the subject and am currently going back and forth on a few solutions. I'm using C#, MonoGame, and Tiled. For my tile maps, ...
Delerat's user avatar
  • 33
2 votes
2 answers
2k views

How to calculate the direction a ball must bounce

I have a tile engine I have made. I can detect collision between the ball(the player) and the tiles. When a collision is detected all the colliding tiles are stored inside a list. My question now is, ...
Ziamor's user avatar
  • 181
2 votes
2 answers
1k views

How to store "chunks" of tiles or How to make my implementation work

I asked a previous question about the loading and unload of chunk data and people noted that my way of storing chunks is weird and I was wondering how I would go about doing it properly. @Byte56 ...
ceriosNerd's user avatar
2 votes
3 answers
4k views

Unity 2D animated tiles library: IsSelected variable not working or not present within RuleTileEditor.cs

I have just tried downloading a library which will allow me to add animated tiles to unity. I have been following this tutorial:http://shadowpeakstudios.com/2018/10/22/unity-tutorial-animated-tiles/ ...
DigitalRookie4's user avatar
2 votes
4 answers
3k views

What should I use (controls, methods) to make a 2D tile based map editor?

I'm making a 2d game where each tile is a square and it's viewed at straight angle, no skewing, no rotation, it's pretty simple. Two weeks ago I tried using DataGridView, but as the number of rows ...
user1306322's user avatar
2 votes
2 answers
522 views

Finding nearby tile objects with a certain tag more easily

I have generated a grid with hex tiles. I am using two different types of tiles and would like to at some points ask the tiles, how many tiles of each type they have as neighbours (or really, it would ...
Maree's user avatar
  • 21
2 votes
3 answers
1k views

Splitting tileset into individual tiles

I'm trying to split a tileset (from here) into individual tiles. For debugging purposes I wrote some code to split the tileset into individual tiles and display them on screen, but some aren't being ...
Leandro Battochio's user avatar
2 votes
3 answers
868 views

Collision Detection Problems

So I'm making a 2D tile based game but I can't quite get the collisions working properly. I've taken the code from the Platformer Sample and implemented it into my game as seen below. One problem I'm ...
MrPlosion1243's user avatar
2 votes
1 answer
492 views

tiled map - changing textures? (XNA HLSL)

I have successfully created a tiled map of various textures. Right now, i had a Vector4 in my own custom Vertex declaration deciding what texture each of the tiles should be. This is working perfectly....
Joel's user avatar
  • 1,517
2 votes
1 answer
480 views

Collision detection with XNA and TiledLib

I recently started learning XNA and after getting annoyed with creating individuals rectangles each time I wanted to add something I went with TiledLib so I could more easily create levels using the ...
Jespur's user avatar
  • 21
2 votes
2 answers
2k views

How can I achieve smooth animation of sprites between discrete tiles?

I'm currently learning game development with C# and XNA and my current assignment is to create a Pac-Man clone. The game is partially tile based, which means that the level itself is built out of an ...
MateBoy's user avatar
  • 123
1 vote
4 answers
298 views

Cell Lighting Propagation Problem

I have in place a cell-based lighting system that works basically like this: (Not my actual code) ...
ben's user avatar
  • 117
1 vote
1 answer
282 views

Textures have lines between them when zoomed out

These are two screenshots from my new game, a top-down RTS with tiles. The first one is from a normal view with no zoom, the second one is a zoomed out view of the whole map: In the first image, the ...
ApachePilotMPE's user avatar
1 vote
2 answers
746 views

Efficient way to render tilemap

I have set up a tilemap system, and am rendering it in a way that lets me pan through the map using a camera offset. However, I have discovered it is incredibly inefficient, but am unsure of how I ...
user96575's user avatar
1 vote
1 answer
2k views

Best way to load texture2d tiles in xna?

I am making a test xna game as a learning exercise and I have a small question about using 2d textures. Basically the game is a grid of different 'tiles' which are taken from a text map file. I ...
Pectus Excavatum's user avatar
1 vote
1 answer
201 views

How to store unique keys for an infinitely generated, chunked world?

My game is made up of chunks which are identified in world space with and X and Y coordinate. Each chunk contains 16 tiles by 16 tiles by 4 layers. So that I don't have to loop over every single tile ...
propellerhat23's user avatar
1 vote
1 answer
520 views

Scene building for procedurally generated tile based world in Unity

i'm making a procedurally generated side-scrolling and destructible tile based world. So far I've got : - the values generator (for deciding which tile to place where) - a testing scene generating ...
madks13's user avatar
  • 11
1 vote
1 answer
3k views

finding a path from one point to another with obstacles help

Im building a tile based game and im implementing my path finding algorithm. Currently, it can find a path from point A to point B with no problems. However, if there are obstacles between point A and ...
iNFiNiTY's user avatar
1 vote
3 answers
3k views

Designing an entity system for a tile-based puzzle game

I'm developing a tile-based game creation library in C# and along with it I'm creating a game to test all of its functions. This is a screenshot of the game: You've probably never heard of the ...
Vittorio Romeo's user avatar
1 vote
2 answers
863 views

How to tile multiple procedurally generated textures?

I'm trying to develop a procedural tile generator for a game, mostly for the ground tiles, instead of using "hand-drawn" tiles. To achieve this I'm using Perlin noise and a sine wave with multiple ...
Burhuc's user avatar
  • 13
1 vote
1 answer
224 views

Automatic Tile Transitions Not Working Correctly [closed]

I've started writing a tile based game in XNA today using the tutorials here. I'm on the Part 6 - Side Topic - Auto Transitions at the moment. My transitions aren't working correctly as you can see ...
Tom O's user avatar
  • 803
0 votes
2 answers
1k views

Shuffle tiles position in the beginning of the game XNA Csharp

I'm trying to create a puzzle game where you move tiles to certain positions to make a whole image. I need help with randomizing the tiles start position so that they don't create the whole image at ...
GalneGunnar's user avatar
0 votes
2 answers
736 views

How do i get my tilemap to move at the same speed as my character

I have a little problem in my solution, i'm trying to make a pretty big map for the players to walk around in. I decided to use a tile-engine, but when I move my character it moves faster than my ...
Bert 's user avatar
  • 53
0 votes
1 answer
491 views

Color glitch with tilemap.SetColor() in Unity

I've been experimenting with Tilemap to display tiles (with random colors) in script with SetColor() and other methods: ...
silverfox's user avatar
  • 117
0 votes
1 answer
87 views

only one tile being drawn xna c#

I have been looking at tile engines for the past few days and decided to have a go at my own one for educational purposes. I want to use different textures for the tiles of my map, for example 1 = ...
Anonymous5642's user avatar
0 votes
1 answer
3k views

A*, Tile costs and heuristic; How to approach

I'm doing exercises in tile games and AI to improve my programming. I've written a highly unoptimised pathfinder that does the trick and a simple tile class. The first problem i ran into was that the ...
Kevin Toet's user avatar
0 votes
1 answer
240 views

Tile Draw Order

I started working on a tile engine recently and have been trying to get this depth sorting for the tiles right. I am using XNA and the SpriteSortMode.Deferred to get the tiles to sort correctly in the ...
x3zinja12's user avatar
0 votes
1 answer
2k views

How to change size of a SINGLE tile on a tilemap at runtime?

I'm having trouble figuring out how to change the scale (size) of a single sprite (tile) on a Unity Tilemap. In the game, I place trees as tiles on a tilemap, and when they grow over time, I want to ...
caleidon's user avatar
  • 591
0 votes
1 answer
176 views

How to tile a texture

I'm creating a simple program in C# and now i'm trying to slice an image into multiple tiles similar to a grid pattern so it does not get stretched when drawing to different resolutions. What i'm ...
RickS.'s user avatar
  • 51
0 votes
1 answer
2k views

Tiles in the Tilemap dont overlap properly

This is my first try making a "proper" game in Unity. I'm using the latest version (2019.2.2 at the time of writing) and I'm writing with C#. This is a project I'm doing for my studies, together with ...
Christopher's user avatar
0 votes
2 answers
490 views

C# Fastest way to iterate over certain tiles overlapping multiple chunks?

What's the fastest way of iterating over certain tiles overlapping multiple chunks in C#. Ideally without having to iterate over everything, just a specific set of coordinates? (green cubes example ...
Drominus's user avatar
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 ...
Neophyte's user avatar
  • 583
0 votes
1 answer
562 views

Iterating 1D array and getting 2D tile position

I know I'm missing something very obvious here, but I have a 1D array that contains integers.I have a map that is 30 x 30 and the center coordinate is 0,0 (This is actually 3D, but I'm essentially ...
XSL's user avatar
  • 545
0 votes
2 answers
706 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 ...
CodeWizard777's user avatar