-
-
Notifications
You must be signed in to change notification settings - Fork 56
The LevelSprites
The sprites in a 2D game are one of the most important element, without them you couldn't even play !
We will check here how to import sprites in your map.
Remember the project structure ? We had a LevelSprite/ folder !
That's where you need to put all your sprites you want to add in the maps of your project :)
Of course no need to stay at the root of this folder, you can organize the sprites the way you want !
For example let's imagine your project is a Terraria-like game, your folder could look like this :
📂 LevelSprites
├───📂 Tiles
│ ├───📂 Rock
│ │ └───🖼 Rock.jpg
│ ├───📂 Dirt
│ │ ├───🖼 Dirt1Tile.png
│ │ └───🖼 Dirt2Tile.png
│ └───📂 Grass
│ └───🖼 GrassTile.png
├───📂 Weapons
│ ├───📂 Swords
│ │ └───🖼 Sword1.gif
│ └───📂 Bows
│ └───🖼 Bow1.gif
└───🖼 Background.png
LevelSprites supports the following image formats :
- bmp
- png (Except 8-bits PNGs)
- tga
- jpg (No progressive JPEG support)
- gif (No animated GIF support)
- psd
- hdr
- pic
To test the LevelSprite I will provide you a beautiful sprite :
That you can download right there : Sprite
Now create a folder named Eggplants
(not specific at all), in the LevelSprites folder and put the image in it, your folder should look like that now :
📂 LevelSprites
└───📂 Eggplants
└───🖼 logo.png
Now open the map you created previously in My first map.
The interface should look like this :
You should notice an Editor Menu
button on top-right of the Window, click on it to get the following screen :
Now click on the "Sprites" tab on top, if you followed everything correctly you should get that :
Now go in the Eggplants
folder by clicking on it.
Without any surprise we found our little eggplant friend :
Once again, click on it to make it spawn on the map :
If you check carefully the last screen, you can see that the first droplist on top is set on "LevelSprites".
As you can guess, this mode is about manipulating LevelSprites. As it's the current thing we are learning you can click on the DropList and select "LevelSprites".
Now you should be able to move the Eggplant with your cursor by clicking on it, holding the left-click and moving your cursor around.
You can also resize the Sprite using one of the 8 points around the Sprite :
Now you know everything about the LevelSprite, what about learning about the Colliders
- 🖊 My first project
- 🗺 My first map
- 📏 Project Structure
- 🖼 LevelSprites
- 📐 Colliders
- 🔳 EditorGrid
- 🤖 GameObjects
- 🖊 Scripting
- 🔫 Events
- 📜 Read the Docs
- ⌨️ Keyboard and Actions
- 👨💻 Debugging
- 🔉 Sounds and Musics
- 🗄 Vili Format
- 📽 Animations
- ✂️ Using Utils
- ⌚️ Manipulating Time
- 🎨 Using the Canvas
- ✔️ Tasks
- 🖱 Cursor and Constraints
- ⌨️ Keyboard and Actions
- 📁 Mounting and Paths
- 👨🏭 Workspaces
- 📏 Coordinates and Transform
- 📷 Camera
- 🗺 Map files
- 🏭 The ResourceManager
- 🎮 Gamepads and Joysticks