66
votes
What is the term for a 3x3 tile set used to create larger areas?
I'd disagree with the accepted answer here.
I'd call this an autotile, and not a 9-slice
"9-Slice" (or 9-patch) is usually used to refer to a system where the content creator slices the image along ...
39
votes
Accepted
What is the term for a 3x3 tile set used to create larger areas?
A name that will give you actual results in Google is 9-slice.
Another way to call it and ask Google about it is 9-patch.
As per this chat discussion, 9-pane seems to also be used, but the almighty ...
36
votes
Accepted
Combinations for tiling two textures together
There's a solid overview of different popular tile combination patterns put together by Boris the Brave, building on some earlier work by Sean Howard.
I'll briefly summarize the main categories these ...
15
votes
Accepted
How can I implement smooth tile-based lighting?
A simple way to achieve smooth lighting in a tile based game, is to draw a "lightmap" to a render target, and then drawing this render target over top your scene while alpha blending it.
Your light ...
11
votes
Accepted
Where to cast light/shadows in a 2.5D view?
Going to try and doodle up what I mean here as soon as I finish typing this, but:
What about merging the two?
Use the second (occlude by base) for everything that isn't a wall and the first (occlude ...
8
votes
Accepted
How can I procedurally find a wall that separates two or more points on a grid-based map?
I will present a general concept and three solutions using that concept.
Concept is an Influence map: For each location in the map, you are going to store a number that represent the distance to each ...
6
votes
Accepted
Efficiently Handling Entity-Interactions in a Tile-Based World
You have 3 major options:
1: Implement some kind of sorting or data structure.
For example: Keep monsters in a list/array (Something you are probably already doing) and sort them by ...
6
votes
Add and remove tiles? Or better to have them all loaded off screen?
In a case like this, you are going to want to Pool your world tiles. The idea is to pre-load a fixed amount of tiles that you will be re-using during the rendering of your world.
When setting a ...
6
votes
Accepted
Should the entity handle his own movement?
There are no right or wrong ways to do things. Only ways which work for you or don't work for you.
There are several competing philosophies in mainstream game architecture.
A: Object-oriented ...
5
votes
Elegant autotiling
I arrived here by Googling this problem myself, read the linked articles, and produced a relatively compact solution which generates the common set of 47 tiles. It requires a 2x3 tileset for the ...
5
votes
Accepted
Combining Many Small Colliders into Larger Ones
I found usefull this algoritm for love2d engine (lua language)
https://love2d.org/wiki/TileMerging
...
5
votes
In a tile-based MMO, how do I decide which players need to receive what updates?
Divide your game world into rectangular chunks which are about half the size of the players screen. Keep track of which players are in which chunk. You can easily do that in the code which handles ...
5
votes
Memory-Efficient, Optimized Terraria-Like 2D Lighting
One option would be to load lighting information only as it appears on the screen. You would get one performance hit at the beginning as the full screen lighting is calculated, but from there you ...
4
votes
Combining Many Small Colliders into Larger Ones
If you are looking to create destructible terrain, the way I did this in Unity, is to only set colliders on the edge blocks of your world. So for example, this is what you would like to accomplish:
...
4
votes
Repeat texture in libgdx
You can use "SetWrap" on your texture and create a TextureRegion based on that Texture.
To Create a 3x3 mirrored image (or axb size)
...
4
votes
4
votes
Accepted
About tiles in games
Per your question, I understand you are not asking for detailed implementation code, since that would be asking for too much more than one single question can offer. So, I understand you are actually ...
4
votes
Accepted
How to generate tile patterns in one dimension, then in a second dimension?
Looks to me like it works like this:
You have different biomes: road, rail, river, grass+trees, etc. Randomise a sequence of these like:
...
4
votes
How can I implement smooth tile-based lighting?
an engine agnostic way to do it is to use average light mapping.
First, you need to generate a black and white map as a 2D array of booleans that is the size of the world where the blocks are True and ...
4
votes
Create a seemless grid-based polygonal tileset
This can be done with a generalization of Wang Tiles or Corner Tiles. These associate labels with the boundaries of a tile, and enforce the constraint that two tiles that meet along a particular ...
4
votes
How can someone make 3D tiles not looking like perfect cubes?
Usually to render a large quantity of gird aligned cubes is to use a method known as "Marching cubes".
Note: the main alternative is to use ray casting and voxels (point cloud data), which is less ...
4
votes
Drawing huge amount of tiles in Monogame (XNA) efficiently
Graphics cards are optimised to draw a few things lots of times rather than the other way around.
In your case, you have a lot of things (different textures) that you want to draw a lot of times (...
4
votes
Accepted
Array-based tilemaps and bounding box (aabb?), how to do efficient tile collisions?
The reason there isn't a standard AABB or partition strategy for tile-based maps is that it's already easier to detect collisions against it than using AABBs.
...
4
votes
Why LineRenderer texture stretching when I set it to tiled?
I know this thread is old but for anyone who happens to have the same problem, all you need to do is go to the image file itself and set wrap mode from clamp to repeat.
https://forum.unity.com/threads/...
4
votes
Accepted
How to avoid rows on screen when cutting spritesheet tiles?
Keep in mind that context.scale does not change the internal resolution of the canvas. It just adds a multiplication factor to all coordinates you pass to the drawing functions. Due to floating point ...
4
votes
Unity 2D animated tiles library: IsSelected variable not working or not present within RuleTileEditor.cs
Open Unity
On top of Unity window, you will see your version number. Will look something like, Unity 2020.3.8f1
Go to: https://github.com/Unity-Technologies/2d-extras
On Unity 2d Extras Github, check ...
3
votes
Accepted
How would i go about implementing portals into my game?
There are several options I can think of for associating each portal with a level, but the one you tried already is worthy of another go. Since you seem to have the Level class sorted nicely with
<...
3
votes
Smoothing edges on procedural terrain
I see 2 possibility :
work on noise function , use less octaves.
after noise generazion , process your map , if a tile A is surraunded by 80% of tile B, transform tile A in B.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tiles × 627tilemap × 157
2d × 125
java × 72
collision-detection × 63
unity × 62
c# × 60
maps × 58
xna × 47
isometric × 46
libgdx × 34
rendering × 30
algorithm × 25
sprites × 25
procedural-generation × 25
path-finding × 25
c++ × 22
javascript × 20
movement × 20
grid × 20
textures × 19
opengl × 16
platformer × 14
hexagonal-grid × 14
3d × 13