Lucky Day's Wizard War! for Android development thread
View Single Post
November 5th, 2012, 20:26
Lemon: cgtextures has been great. I got the door from them. I may use some stone textures in the future. Not a lot of variety and I am trying to keep myself on a budget. There's no end of sites that want to hijack the word free off Google and direct you to their royalty free but paid images. Fortunately I'm getting a better catalogue with sites like
QL here's one way to avoid memory leaks on Android
in short he says that drawings on buttons are naturally linked to buttons which are actually a type of (and therefore linked to) TextViews which in turn is referenced to the Context (ie the Activity) that created it. I understood this in theory when I first read this but a few months of working on this I see it a lot more clearly now. Without re-reading it he's saying watchout for garbage and he recommends using Applications instead of Activity. I wish him luck with that. :rollseyes:
We were talking about multiplatform SDK's like Unity. I'm always concerned that 3rd party tools don't watch out for things like that and don't do things as efficiently as possible. Or, if they do, they are at a level of understanding I'm not at yet.
ok, here's a shot of my new camp screen.
One thing a screenshot can't show is the cool campfire animation I figured out how to do. That was inspired by QL.
I developed it because testing music was driving me batty and I eventually worked out a way to turn it off in game. I had a hassle with unbinding services that didn't exist but I eventually worked that out. It turns out I didn't have many commands to bind the service so I was able to wrap the call for the flag to say it was around a flag to check if it was turned off.
Shared preferences is a much better way to track cross activity variables than handing them off with straight intents. I did this with the music on/off flag. This allows me to create activities that call activities several levels deep without the need to pass them in each variable. Only set back will be a slight decrease in speed as it writes to disk. This will also help preventing a certain kind of cheating
The above shows my overhaul of text. What you are looking at are png's of common words. As I mentioned to QL and maybe in this thread Google made the ingenious decision not to be able to change the size of fonts at run time. The workaround then is to change the theme. The popular methods to do this didn't work at all for me leading me to the theory that it doesn't work on LinearLayouts. Of course, I need LinearLayouts to keep everything scaled within the boundaries of any Android device the user has.
The above is one solution for 10.1" screen. The word Creatures at the top and all the button text is is in regular font. The Current HP grid is in large font. Large font looks great on a 10.1" but its terrible on a 780x480 phone which is the most common resolution.
Since there's not a lot of text I decided to create some font pngs that adjust themselves regardless of screensize. That's the Player attacks for 00 damage business. Its not perfect and you have to add a lot of spacers to conform the size but its a lot better IMO than staring at offsize text.
I would like to show you how large fonts wrap badly on the smaller screen but the IDE rendering pretends they don't.
EDIT: nm - here's a screenshot from my phone itself
As you can see what works on one doesn't necessarily work on another no matter what the designer tries to say. My above tests with images should be universal.
Another solution would be to create three activities instead and select them accordingly or give the option to the user to do that. I may still do that, but it means a change in one means a change in all three. Also, doing it with pictures is a fun way to do it even if it means more work.
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