Lucky Day's Wizard War! for Android development thread

Well I just got a job with Intel

Its a long commute so it basically means I have 12 days to complete the App.



Getting to the business side of things.

Dungeon Delvers at $1 has over 10k downloads, I'm not sure I can make mine as complex as Delvers or even what QL is doing with QuestLord.

Some of the free ones and demos have over 100k in downloads and some in the millions. It shows there's a pretty good market out there.

I'm not sure what kind of money can be made from Ad Revenue on a free game. If I do allow banners I want them in a place that doesn't hurt immersion - it would be on the camp pages where players would arrange inventory, save the game, heal themselves, look at the player map etc. It wouldn't be in combat or movement where the player would spend the bulk of their time.

My plan was to release this then leverage my experience releasing a product to market to gather crowd sourcing for a sequel.

The building blocks are there - I have some friends I could hire who would do a great jobs with original artwork and textures and maybe I could hire my brother the musician to do audio. I could even bring in another buddy to code who is a hard worker but so far is only working at Home Depot after college.

One artist is a friend that goes way, way back who I used to PnP RPG with. He's got some children's books and animation to his credit. My other friend is from college. She can code and draw but her style is Anime.

Now I can draw but its been decades since I was really serious and it would take time to get something really professional. This is why I've been using free stuff available off the internet.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
Congrats on the job too. See Toff's question :D

Also, you could work a few hours a week on it still. You could also release it and then just update it once a month... If that's possible on Android devices I don't know.
 
Joined
Nov 13, 2006
Messages
9,177
Location
Manchester, United Kingdom
Thanks! I'm really excited, although it doesn't pay that great. Not yet - these big name companies are typically where you start out because everybody applies there and they know that. But having your name associated with them gets your resume noticed down the line. Its what I want - a development job and maybe I can land there permanently.

I'll be testing directx drivers on their internal GPU's. Right now the big issue Windows 8 compatibility it appears. If I say more I may be violating some privacy agreement I'm finding out about.

--

One of the guys I interviewed with is also writing an Android App. He says he put about 400 hours into after work and on weekends. I 'm still not exactly sure what it does after seeing it (something about starcraft - it does look really nice) and he's got it on hold right now . I'm hoping maybe we can tag team our apps as soon as we start.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
Holy Catacombs Lucky Day! This looks awesome! Can't wait for it!!!
 
Joined
Oct 15, 2012
Messages
29
Location
Houston
got so excited I forgot to give valuable(yeah right) commentary.

I'm not sure I can make mine as complex as Delvers or even what QL is doing with QuestLord.

I wouldn't worry about that. Every game will have its strength and weaknesses. The more that are out there the better. Also nothing is preventing you from going back and doing more. You already got me on the resolution! :D And probably other things I will just stay quiet about before launch. ;)

My plan was to release this then leverage my experience releasing a product to market to gather crowd sourcing for a sequel.

That is an excellent plan to build up a fan base. Players like this a lot because it really helps them feel involved. Count me in as a supporter.
 
Joined
Oct 15, 2012
Messages
29
Location
Houston
got so excited I forgot to give valuable(yeah right) commentary.



I wouldn't worry about that. Every game will have its strength and weaknesses. The more that are out there the better. Also nothing is preventing you from going back and doing more. You already got me on the resolution! :D And probably other things I will just stay quiet about before launch. ;)



That is an excellent plan to build up a fan base. Players like this a lot because it really helps them feel involved. Count me in as a supporter.

that's very true. as it is you are doing things on yours I kind of wish I had done - particularly animation. Anyway, you have any issues porting it over send me a PM. I'm finding out a lot of things the hard way. For instance…

…Just managed to get the background music to turn off when exiting the game (hitting home or running another app) by finally figuring how bound services work and implementing the correct methods. The the service connection Toasts stopped firing which means to me they actually don't fire unless a service is started and not bound. That's interesting. I'll have to file that in the back of my head.

There was a slight problem with it crashing but I realized right away that the service was trying to unbind twice. Can't unbind something that is no longer bound. A simple fix was easy - just wrap all the unbind calls in a boolean flag.

if(mBounded == true) {
unbindService(svc);
mBounded == false;
}


Just when I thought I got it licked I hit the power button on the device but the music kept playing. Argh.

A bit of research found me this:

http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/

which seems like a lot of code to do one silly thing (that the other code should have taken care of) but I managed to implement it. It is very simply.

And it works for about 5 minutes. Grr!

I think what is happening is some internal call to come out of the screen saver is happening (which it doesn't actually) and onResume is kicking in. This may be why someone on that link says that onPause is borqued.

In fact both onPause and onStop events seem to get called when I hit home or start a new Activity. Seems redundant to me.

I might try implementing the code in the Service code itself. This way every Activity doesn't have to have their own implementation of it. (Code example shows it for onStart and onCreate of a service. I'll have to test if it can bind when resuming - getting the onCreate to do that would likely cause a service to bind to itself and not the needed Activity).



I should note that memory use has increase 4 or 5x with the added music. I've been warned bound services are prone to memory leaks and I am curious if this is what is going on.

I'm getting a lot of "MediaPlayer finalized without being released" warnings but they appear to mostly come from the sound effects which don't call the service. I added release code but that seems to a) get rid of the sound before you get to hear it; b) not stop the warnings.

A little googling shows that some of it may due to multiple calls to the MediaPlayer - I wonder if the background music service still running is the cause. If it is I'll just have to suppress the warning because this is the functionality I want.

Edit: its sloppy but I think I can prevent the onResume audio bug by requiring the player to touch the screen when the game comes out of hibernation.
 
Last edited:
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
I have very limited knowledge about Android under the hood workings, I sent you a PM as to why this is the case.

But yeah memory management has been a huge issue for me. I did the sounds last, and I knew it would take a hit when I actually added them.

I have had some issues with memory but for the most part since I am doing the 'pixel-graphics look', I haven't had too bad a problem because my footprint is tiny, almost microscopic in comparison to other games because I am scaling my source graphics.

Originally my game wasn't going to involve animations and such. I was just going to have the enemies pop up in their own window ala the Bard's Tale 1. But then when designing them I made it so that they popped up on the screen to look like they appeared in front of the player. Then I was thinking, for craps&giggles, what if I made different version of them at different scales and just set them in the world… That just looked too cool and 'eye of the beholder'-like. So next thing led to another and I was doing the same for objects. And I basically feature creeped myself into my current design during my 'I have no idea what kind of game this is going to be or what I am doing, but this sure is fun' stage of development. :D

The animating thing came really easy for me, as I actually built my system on a series of sprite holders, that are sent a message as to what sprite animations to play based on the map. Most of the sprite animations are just 1 frame, but this allowed me to have animated walls if I choose to make the sprite have more frames. This is how I get animated torches and stuff. Instead of the map telling my display handler what image to show, it tells it what animation to play.

Now making the art, that is a huge time juggle. And later in the game development process, the Evangelizing of the product became another full time job I had to squeeze in between programming and art. Needless to say, when this is done I am going to get some much needed sleep.

(I sent you a PM about the android details)
 
Last edited:
Joined
Oct 15, 2012
Messages
29
Location
Houston
Fun to see this take shape. Great work so far.

You probably already know this but http://www.cgtextures.com/ has a lot of good tileable textures that you can download with a free account. If you get the premium account for $75/year you can get tileable textures in high res. Good stuff, i've used that site for a lot of projects.
 
Joined
Jun 4, 2008
Messages
999
Location
The Great White North
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 http://www.wpclipart.com/

QL here's one way to avoid memory leaks on Android

http://www.curious-creature.org/2008/12/18/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.

AeP9W.png


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

devsr.png


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

mHly1.jpg

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.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
ok, last day before I start my regular job

This past week was spent trying to work out the inventory system. At first I developed a LinkedList and tried to store the items there but it kept crashing. I think the issue is I have instantiated the items on the list - a similar issue exists with arrays in Java I found out the hard way - but I don't know how to correct it. Its not like you can go through each item on an empty list!

So instead I've set the inventory to an array if my custom Item class instead. Weapons and Armor are subclasses of Item - probably scrolls will be later too.

The main issue with inventory is having to get it to work between three activities. A little research found where I can get a result back to parent activity from the child. This allows me to store the player variables from the child activity and then reload them in the parent. This is a good thing.

I was able to equip a new weapon in the Camp Activity so after I had to figure out how to get a drop list in multiple choice after I defeat a monster. Well I managed to do that but had some problems reading the selected. I eventually figured that out.

So now I am able to equip my enemies weapons that they drop. For the first time I am able to kill Skeletons.

For the first time this thing is just barely turning into a real game. I've even got my first design/strategy idea:

The skeletons are so much tougher than the player at first level the best thing to do is take out the Kobold or Goblin for their weapon, and then maybe, just maybe they may be able to take out the Skeleton for its sword.

In the meantime I've also added some nifty images for the weapons during an attack.

HtJMz.png


the sling was from a medieval painting depicting a battle - some of the background was painted with lapis lazuli. the others were modified public domain line art.

I still want to go to a linked list however. The prospect of creating a manual LL out of the array would just be a pain.

This inventory addition has made my loading and storage of the player variable more consistent across activities. I had hoped to make them into single class methods so all the need is a single update in true OO form but they give me fits when I add them to a custom class.

I can't seem to pass back the party object or somesuch - so its a bit of copying and pasting the same methods between activities. I don't have a lot of Activities so its not that difficult.
 
Last edited:
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
I'm rewriting my inventory system. I picked up the app again last week to show a friend and it was borqued due to some streamlining I was trying to do moving inventory between Activities.

Moving between lists can get very cumberson so I restarted in a fresh application independent of Wizard War and over the next few weeks I will integrate it in.

I had it working but I had two methods I had to copy and paste into every Activity every time there was a change in the item class and subclass because I need the data across them. Ideally I want to write the method in the class OO style and just call the method. That's my goal.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
I got the test app to store my inventory in a single Object Oriented method.

This is a big breakthrough that's solves a fundamental problem in my increasingly large app.

The next test on it is whether the List can store child classes (the Superclass is Item and the Child Classes are things like Weapons and Potions). If it can't handle it I will need to make all the children an actual version of the superclass.

After I add the retrieve I'll add the character data to it and a couple of the systems like spells and then real design in earnest will begin. I'll be able to move on from the fundamental engine.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
Damage to player's hit points is persistent now and I added the rest option to heal up.

It shows up as a progress bar when you aren't in combat.

I'm currently working on the first boss so I will be adding the spells options. I'm not happy with the boss's paperdoll and I'm thinking of moving away from Medieval in look and take the images from Victorian era etchings and such.

I'll have screenshots soon.

On a side note my tablet took a powder. I tested it at work and while working with one of the lab guys we found the backlight burnt out and it actually worked. I tried to take it apart to see about replacing it and I removed one of the ribbon cables from its connector. Trying to put it back in was like needle and thread so I ended up selling it on eBay for parts.

I now feel free and unencumbered but watching TV
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
as promised here are the screenshots of the first boss and the persistent progress bar for hit points. If I didn't already mention each "activity" on an android program is like opening a new program so it gets to be a pain.

BgG9EUf.png
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
First spell is working great. I had an issue where it was double hitting the mana and I tracked it down to an experiment I did in the static spell method in the class (separate from the activity calling it) decrementing it there as well.

I really didn't think this would work and I don't like this functionality at all. Values shouldn't pass back unless you tell them explicitly! Ah well, now I know and this will prove useful from having to repeat a lot of code.

Next is locks then save games and level ups and the in game map and then on to level 2!
 
Last edited:
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
9Z3sJDb.png


here's a big update. I've been coding at night and on weekends.
I created but tracked down many bugs with the updates.

Big updates are the minimap and the multisave. The minimap took a week - a lot longer than I expected. It turns out I had a tile named 0 instead of O, but not before fixing it in a more organized way.

I've re-organized the camp screen. It was getting too large and unreadable. For small screens I may still create new buttons as text doesn't resize. It looks ok on my phone so for now I'll save some work.

You may notice level and a experience now indicators now. The formula took some playing around with but I got it where I want it now.

The progress bars are new too. I had to back out code out of an older copy of the game because that's when I started my new job in November. I hadn't touched and it was in broken state so I had to redo a number of things.

Not shown, I have a credits screen where I give attributions for those who made their work available. I learned scrollviews with that which I will likely need to implement when my map gets larger.

I have a proper title screen. The images there are placeholders of the icon you load the app with. I had a load button but I kept crashing. I may re-add it.

Speaking of loading I wasn't happy with having a single save and load option so I added 5 more! Really, that can be an indefinite number but I think 5 slots are fine. I discovered a bug with it in that the player's state was getting saved but not the map. In about 2 or 3 days work I resolved that.

Speaking of time I woke up the other day lucidly dreaming about how to do secret doors. A quick 1/2 hour before work I implemented them. In about 5 minutes after work the Minimap no longer gives them away!

Last things on the todo:
create the intro
replace title graphics
implement the other levels
endgame

I would also like to put a time stamp on the load game buttons.

PS - I ran into a nasty bug with the inventory. It seems when I dropped something weapon types sometimes got reset as item types so they couldn't be equipped. It had to do with not lining up properly in the inventory list so now there's a correlation with the placement on the drop list to the players inventory. Its not how I wanted it but its minor and now the player can count how many slots they have available.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
enchanter.jpg

here's my current title screen - The Enchanter by Gustave Dore

I might have to add some orange to match the logo, which is on fire. That's animated btw.

I'm tracking down a couple of bugs that popped up: one is death is not resetting the player to restart, which might be easy to fix; the other is the original tile where the player is standing is getting reset. That one is going to take some tinkering.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
Wow looking good for a 1 man project!

thanks! comments like these help keep me going. this is just meant to be a blog to set down my thoughts but it has proven useful. Thanks to that last note I got to remember what the last error message was instead of having to rediscover it the hard way.

Speaking of which I've tracked those down. The original tile bug was caused by not reloading the map when the player loses. It works when the player manually restarts their game but I failed to add the separate map code on death. I keep the player stats and map stats separate because I don't think its necessary to transfer the entire map between activities.

Addition to todo list:
help button.
 
Joined
Oct 19, 2006
Messages
5,212
Location
The Uncanny Valley
Back
Top Bottom