Lucky Day's Wizard War! for Android development thread
View Single Post
October 3rd, 2012, 00:43
ladders are proving to be a pain.
there are three ways I could do this, two of them I've tried/trying.
the first way is to create a whole new set of imageviews(layout) to overlay over the twelve existing ones. This is the first way I've tried it and it was a mixed bag. It requires the walls that be in front of them to hide them. Keeping this straight proved to be a nightmare so I scrapped it.
I then thought, why not just create a new set of images with ladders in front of the walls. I went to bed then woke up and realized in the morning that it was a real stupid idea. I'd need ladders for every combination of blanks, walls, and doors imaginable. Doors themselves were hard enough.
I've since discovered LayerDrawables but this has not been easy. Basically these are arrays of images that overlap each other. The first problem I had was creating too complex an array. It partly worked for my first test but kept crashing when I approached the ladder from the West and South for some reason. When I made them separate variables of smaller arrays I found success. yay!
But I have new problem: they won't overlay multiple ladders in a row. I've discovered that I'm only drawing one thing or the other. what I need to do is combine the images somehow and what that could mean is changing
to a layerdrawable and post it to the layout once.
if I could get the drawing from the layout itself, add to it, then set the layout again this wouldn't be such a problem but it doesn't look to be possible without forcing some sort of tag on it,
Developer of The Wizard's Grave Android game. Discussion Thread:
Join Date: Oct 2006
Location: The Uncanny Valley
View Public Profile
Send a private message to Lucky Day
Find More Posts by Lucky Day