All Projects → kkukshtel → SimpleTilemap

kkukshtel / SimpleTilemap

Licence: Unlicense License
A fast, easy way to generate runtime tilemaps in Unity

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to SimpleTilemap

faur
⚒️✨ My personal C games framework. 2D graphics, sound, inputs, states, ECS, and misc utils for data, files, math, memory, strings, time, and more. Builds for Linux, Windows, Web, and embedded devices.
Stars: ✭ 55 (+48.65%)
Mutual labels:  gamedev, 2d-graphics
Blit
👾 Blitting library for 2D sprites
Stars: ✭ 15 (-59.46%)
Mutual labels:  gamedev, 2d-graphics
isosurface
Isosurface extraction using Marching Cubes and pure WebGL.
Stars: ✭ 66 (+78.38%)
Mutual labels:  gamedev
ure
the unRogueEngine
Stars: ✭ 111 (+200%)
Mutual labels:  gamedev
bitECS
Functional, minimal, data-oriented, ultra-high performance ECS library written in JavaScript
Stars: ✭ 372 (+905.41%)
Mutual labels:  gamedev
xtory
a tool for writing branching nonlinear stories.
Stars: ✭ 14 (-62.16%)
Mutual labels:  gamedev
unity-plumber
A component to procedurally generate pipe-like meshes in Unity
Stars: ✭ 55 (+48.65%)
Mutual labels:  gamedev
Pumpkin-Engine
A powerful and capable 2d game engine in Kotlin
Stars: ✭ 1 (-97.3%)
Mutual labels:  2d-graphics
SDL.zig
A shallow wrapper around SDL that provides object API and error handling
Stars: ✭ 102 (+175.68%)
Mutual labels:  gamedev
jfastnet
Fast, reliable UDP messaging for Java. Designed for games.
Stars: ✭ 26 (-29.73%)
Mutual labels:  gamedev
cage
Cage (Ain't a Game Engine) - write 2D games using plain C
Stars: ✭ 40 (+8.11%)
Mutual labels:  gamedev
stochastic sierpinski
A stochastic method to generate an approximation to the Sierpinski triangle
Stars: ✭ 41 (+10.81%)
Mutual labels:  2d-graphics
GLFW-CMake-starter
Use CMake to create a project with GLFW - Multi-platform Windows, Linux and MacOS.
Stars: ✭ 53 (+43.24%)
Mutual labels:  gamedev
Entitas-Java
Entity Component System (ECS) in Java 8
Stars: ✭ 37 (+0%)
Mutual labels:  gamedev
isometric
A lightweight JavaScript library, written in TypeScript to create isometric projections using SVGs
Stars: ✭ 53 (+43.24%)
Mutual labels:  2d-graphics
ToolKit
2d - 3d game and interactive application develepment kit
Stars: ✭ 26 (-29.73%)
Mutual labels:  gamedev
antkeeper-source
💿🐜 Antkeeper source code (GitHub mirror)
Stars: ✭ 23 (-37.84%)
Mutual labels:  gamedev
raylib-nelua
Raylib wrapper to nelua language
Stars: ✭ 27 (-27.03%)
Mutual labels:  gamedev
MySQL Module
MySQL connector to Godot Engine.
Stars: ✭ 30 (-18.92%)
Mutual labels:  gamedev
CategoryTool
Unity Editor tool to create Categories in the Hierarchy. The Categories work as dividers between GameObjects.
Stars: ✭ 47 (+27.03%)
Mutual labels:  gamedev

SimpleTilemap v1.0

SimpleTilemap is a totally free library for generating tilemaps in Unity at runtime. It provides users with a single script that, when used with a tilemap sprite, will generate a custom textured mesh with tilemap-indexed tiles, using a single GameObject. Its intended use is for 2D pixelart games with orthographic cameras, and has not been tested or verified with 3D assets.

Developed for @cantatagame

Usage

All functionality is contained in the single SimpleTilemap script, with an example of full functionality in the two included example Unity scenes and in the APIDemo.cs script. The biggest thing to note with this library is that this script assumes certain import settings on tilemap sprties to work properly, which you can see below.

The big thing to note is that this script assumes that the texture is set to Sprite with a one pixel per unit PPU setting, Point filter mode, and no compression. "Sprite Mode" is also set to "Single", even for tilemaps. I recgonize this is somewhat of a limitation, but I also know this is somewhat standard practice for pixelart games in Unity. If anybody has any ideas/opinions around this, please let me know!

This is also why you need to fill in the tilemap parameters on the script. For more info on the component, see below.

Component parameters

The component is relatively barebones, but displays core parameters to get the script working. In order:

Map Render Type allows you to choose between a Standard Grid map and an Isometric map. The main difference here is that Isometric maps are rendered in a slightly different way than standard maps, which is reflected in the appearance of the "Tile Art Height Fraction" and "Tile Pivot Y" parameters when Isometric is selected.

Map Size allows you to select how wide/tall you map is. Worth noting is that in standard maps, (0,0) is the bottom left corner, and in Isometric maps it is the leftmost corner. The max map size is currently limited to 100 only because that runs up againsts Unity's max vert number for a single mesh. I have ideas about how to make bigger maps, but I'll wait and see if it is a thing people are interested in.

Tile Width/Height is the width/height of a single tile in the tilemap, in Unity units. Note that this isn't how tall the art is in a given tile, but the actual tile dimensions. This should normally be your PPU import setting * dimension in pixels of your tile, but changing these values while maintaining the same ratio between them will result in a small or large rendered tilemap.

Tile Art Height Fraction is only relevant for Isometric maps and determines how to properly draw the map by defining what fraction of your total tile height your tile art occupies. A value of '2' would indicate that the tile base of your art is 1/2 the total height of your tile.

Tile Pivot Y determines where the leftmost point on a given tile in your isometric tilemap is in Y (X is assumed to be 0). This assumes that a given tile's (0,0) is in the bottom left corner, so this should be a positive value, with a maximum at your Tile Height.

Render Spacing controls how much space there is in Z between tiles on different "layers". This setting defaults to 1 and should be fine for most games. This is how the library sorts depth.

Tilemap Material this is the default material used to render the tilemap. It shouldn't be changed, but in actuality is just the Unity default Unlit/Transparent Cutout shader.

Tilemap is your actual tilemap sprite.

Tile Columns/Rows is how many columns/rows are in your provided tilemap.

Where to go from here

I'd love to hear feedback (issues/pull requests/DMs/etc.) on this library! I can be reached on Twitter through @kkukshtel or through my game @cantatagame). The intention is to keep the library as barebones as possible, so if you can think of features almost everyone would want, let me know, or submit a pull request.

License

Do whatever.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].