Stencyl 3.4.0 is now out. Get it now!

Isometric View [Outdated]

captaincomic

  • *
  • Posts: 6109
The Isometric View I started a while ago is now on StencylForge.

Use this to show your game in an isometric perspective, while designing the scenes top-down.
(see the sceenshots, the first shows the scene in the scene editor, the second is the scene as shown in the Flash Player.)

The Good. :)
All movement behaviors and collisions will work out of the box as in a top-down game, because everything is simulated as top-down. Only the drawing is done in an isometric perspective. Camera movement works as well.

The Bad. :-[
All the drawing is done manually in the Isometric View behavior. All tiles and actors are sorted every frame based on their position to ensure the correct drawing order. This might have a bad impact on performace.

And the Ugly. :P
If not all actors are the same size, the drawing order cannot be determined correctly. An actor might appear in front of another actor while it should be drawn behind. Therefore all actors should be the same size to prevent this from happening (the same size as the tiles.)

Check out the description of the kit and the behaviors for instructions. If anything is unclear just ask here.

I hope someone finds some use for this. ;)


« Last Edit: April 16, 2014, 09:09:46 pm by rob1221 »

Xietao

  • Posts: 725
Tried the first and ... Good!!
Free Time:
Monday, Wednesday, Friday: 13h
Tuesday, Thursday, Saturday, Sunday: 7h
Loving Linux...

ChunkyMonkey

  • Posts: 430
It seems when I try to make my own scenes with this, everything stays 2d when tested. Is there something I'm missing?

captaincomic

  • *
  • Posts: 6109
Here's what you need to do to make the whole thing work:
1) You need to attach the Isometric View behavior to your scene.
2) Make sure each actor has isometric animations and top-down animations. The name of the isometric animations must be the name of the top-down animations followed by "-isometric" (or you can change the suffix in the Isometric View behavior.)
3) You need to create an actor for the tileset you are using. The default animation of the actor should contain a number of frames equal to the number of tiles in the tileset. The frame with the index with the same tile ID is used for that tile.

Miasmos Games

  • Posts: 878
Does this use code? Either way, after the merge you can probably look at ways to optimise performance and get rid of the "everything must be the same size".

Cupcake Bounce

captaincomic

  • *
  • Posts: 6109
Yes, it uses code in several places: to sort the array, to draw a specific frame of an actor animation, and to loop through the tile layers.

The performance could probably be optimized by using a bucket sort and keeping the buckets between frames (only resorting actors that move). I would like to try it at some point.

Overcoming the "everything must be the same size" limitation is difficult. I'm not even sure if it is theoretically possible to find a correct drawing order in every case for sprites of different sizes without a z-buffer.

Miasmos Games

  • Posts: 878
In any case, it's probably not worth touching till the engine revamp. (But then we should look at maybe creating a comprehensive set of stuff to pre-ship?) And maybe there's some other way to handle sorting that would allow it :P

Cupcake Bounce

captaincomic

  • *
  • Posts: 6109
Yeah, currently this is no pre-ship material, it uses code, and requires complex setup of multiple behaviors. Maybe after 2.5/3.0 we can look into it again.

iKonrad

  • Posts: 6
Brilliant kit. Any suggestions with implementation of own tilesets? I'm looking around for a good solution for isometric tilemaps (have worked in cocos2d so far but i'm not much into programming stuff and would love to focus on design site more). If you have any advice regarding isometric tilemaps I'd be wholeheartedly grateful :)
@jarosinskik

captaincomic

  • *
  • Posts: 6109
If you're looking for artistic advice, you've come to the wrong guy. ;)

If it's about the requirements for this kit, you'd use a top-down tileset, and one actor with one animation with frames containing the isometric sprites corresponding to each tile in the tileset. (Look at the example on StencylForge to see what I mean.)

mikhog

  • Posts: 151
Can't find this on stencylforge after 3.0 release. If you have the time it would be awesome if you could update it and release again.
"It came from the forest!" a zombie defense shooter
http://www.kongregate.com/games/mikhog/it-came-from-the-forest
Also, check out my RPG inventory system on stencyl forge or test it: http://www.stencyl.com/game/play/25268
Current project (hack n slash RPG): http://www.stencyl.com/game/play/25366
I also do Unity development both 2D and 3D