Page 25 of 92
Re: Simple Tiled Implementation - STI v0.9.2
Posted: Mon Sep 29, 2014 6:31 am
by Karai17
¡¡Double Post!!
0.9.2 finally allows for tile objects to be drawn.
Re: Simple Tiled Implementation - STI v0.9.0
Posted: Wed Oct 29, 2014 1:20 am
by Rukiri
Karai17 wrote:¡¡Double Post!!
STI v0.9.0 now supports animated tiles! A big thanks to Clean3d for the patch!
STI is at a point where we are very close to being feature-complete. A few more small things and some bug fixing, micro-optimizations, and unit testing and I might just be able to officially release a "stable" version!
Animated tiles were a big deal for me, awesome it's finally added!
Re: Simple Tiled Implementation - STI v0.9.2
Posted: Wed Oct 29, 2014 2:13 am
by Jeeper
Is the limit to draw range of tiles actually working? When I try to use it, it either draws every single tile or none at all.
Re: Simple Tiled Implementation - STI v0.9.2
Posted: Wed Oct 29, 2014 2:18 am
by Karai17
The draw rangle is not necessarily in pixels, but takes into account the sprite batches within the draw distance. The minimum size of a sprite batch is 20x20 tiles so if your map is smaller than that, then it will draw everything. If you have several sprite batches on screen, it will draw the full batches, even if most of it is off screen. Any batches that are off screen will not be drawn.
Re: Simple Tiled Implementation - STI v0.9.2
Posted: Wed Oct 29, 2014 11:09 am
by Jeeper
Karai17 wrote:The draw rangle is not necessarily in pixels, but takes into account the sprite batches within the draw distance. The minimum size of a sprite batch is 20x20 tiles so if your map is smaller than that, then it will draw everything. If you have several sprite batches on screen, it will draw the full batches, even if most of it is off screen. Any batches that are off screen will not be drawn.
Aha, thank you for clarifying that. I just had a memory of ATL having a similar thing, but it allowed you to draw for an example 3x3 tiles only. Must have mixed it up with STI
Re: Simple Tiled Implementation - STI v0.9.2
Posted: Wed Oct 29, 2014 1:31 pm
by Karai17
I originally had sti doing that but it turned out to be way too slow compared to how it works now.
Re: Simple Tiled Implementation - STI v0.9.2
Posted: Wed Oct 29, 2014 1:53 pm
by Jeeper
Karai17 wrote:I originally had sti doing that but it turned out to be way too slow compared to how it works now.
And there really are few reasons to want to draw anything bigger or smaller than your screen anyway. So yeah, performance > that feature!
Re: Simple Tiled Implementation - STI v0.9.2
Posted: Wed Oct 29, 2014 10:21 pm
by ddfreyne
Karai17: What’s the reason for clearing and re-creating the canvas on every call to draw()? Does it give performance gains over not using a canvas at all?
Re: Simple Tiled Implementation - STI v0.9.2
Posted: Wed Oct 29, 2014 10:24 pm
by Karai17
The canvas isnt recreated every call, it is just reset to blank. Using a canvas allows for customised drawing and fixes some scaling glitches
Re: Simple Tiled Implementation - STI v0.9.2
Posted: Fri Oct 31, 2014 4:04 pm
by pevzi
First of all, thank you for a great library, definitely going to use it in a game of mine. But I'm still unsure about several things related to its usage. Sorry if these are too silly or already answered but I've read the entire thread and these things are still unclear for me.
1. Is it possible to access object's/tile's properties within a collision callback? Like, how do I determine if a player bumped into a door and not a wall?
2. How do I replace a tile or maybe change its state, for example, to make a door opened/closed?
3. This is probably more related to Tiled itself than STI but anyway. Is it possible to make "tall" tiles that overlap the player, nearby objects and the tiles in the upper row (like houses or pillars in JRPG games)?
4. And another thing. I couldn't manage to find the description of Layer and Map properties in the documentation. It would be much easier to get started with the library if the docs said what is inside these objects.
Also yay, it's my first post here, hello everyone.