[PLUGIN] Roguelike plugin - C2 rot.js interface

Post your work in progress addons and get feedback

Post » Sun Sep 13, 2015 6:14 pm

@Kali
No problems :-)
B
59
S
21
G
14
Posts: 779
Reputation: 13,927

Post » Mon Sep 14, 2015 6:54 am

wuhu - onwards then :)
Image
Get it on Google play or play on papio.nu
B
11
S
2
Posts: 79
Reputation: 786

Post » Mon Nov 27, 2017 3:33 pm

This is an old topic but I was wondering if someone could help out.

Once walls are created, I managed to replace their tile-maps with sprites:

For Each Map Cell->If Roguelike.CurrentCoordinates=#:
Create WallSprite->Walls.TileToPositionX(Roguelike.parseX(Roguelike.CurrentCoordinates))
Create WallSprite->Walls.TileToPositionX(Roguelike.parseY(Roguelike.CurrentCoordinates))

...but what I need is a castle-like looking level so I need for walls to only 'outline' floor and not 'pile' inside or outside the floors and rooms.

In short: is there a way I can determine which wall-sprites are surrounded by all four sides with other wall-sprites and then remove them?

//////////////////////////////////// Found one solution

Once floor sprites are placed I create a little larger sprite (SpriteT) on top of each floor sprite. Then I check what Wall sprites are in collision with SpriteT and delete the rest of them that are not in collision.

In this way only the Walls that are 'outlining' Floors are kept in level.
B
21
S
11
G
3
Posts: 39
Reputation: 3,365

Previous

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest