Lucky Day's The Wizard's Grave for Android development thread
In my downtime rather than play Civ 4 all day (or mow my law) I've taken up something more constructive: building an RPG App for Android. For now I call it
edit 11/26/2013: the new name of the game is The Wizard's Grave, later in this thread I discuss the need for a name change due to the name already being taken.
here is a screenshot
Right now its Top-Down design - its not OO yet - because after 6 months of going through the tutorials I decided to strike out on my own for the first time. I really need to get it into OO design before it becomes too bloated.
I have almost finished the FP "3D" view. The images are prerendered rather than OpenGL. I have been stuck on this because I added another layer of visual depth so I have to sort through the appropriate images to choose the correct ones. Perspective can be a real pain and it makes me wish I did it mathematically with OpenGL now.
You can move around great in it and I reluctantly added strafing to it in order to test the visuals.
As soon as this is done I will move onto the combat. I've got the beginnings of a unique system I will hash out with you in the next post.
The plan is to make a simple dungeon crawler then use this to move onto Wizard War! 2. Its an incremental approach.
One of the key issues with Android is there are so many screen resolutions.
This is where I could use your help. If you have a device with an unusual screensize I can try and make it compatible.
The emulator often doesn't match what the device actually displays. For example, the screenshots above show some jagged lines - which there are none on the actual device.
I have the ASUS TF101 tablet - its 1280x800 and 10.1". I also have the HTC Inspire phone - its 480x800.
The latter seems to be a pretty popular screen size. The former is what I am first developing it for.
In return for your help I am also willing to take your advice on input in the game.
I should also mention I'm developing this for Android 2.3.3 because this is what the tutorials I was working on were written in. I understand about 90% of devices are compatible with 2.1. If this is a problem let me know.
As mentioned above here is the system I plan to incorporate. I haven't seen this done before so its fairly unique.
All player stats start at 1
As the player levels up they can put a single point into an attribute of their choice
Strength affects damage in combat, and maybe carry capacity
Toughness affects hit points and checks. I am thinking 10 hit points per point.
Intelligence affects magic ability and number of spells that can be cast
Luck is a modifier for the skills above and and certain events. Each point representing a 10% increase maybe.
Killing a creature gives you their level in experience points. 10 first level kobolds will get you to level 2. Your level acts like a modifier for this. When you reach level two you not only need 20 kills, but first level kills act for half value. So you can either kill 20 second level orcs or 40 first level kobolds, etc.
Armor is designed to absorb damage. In addition weapons and armor have hit points themselves. Any damage over and above the modifier is taken on the player's base hit points.
For example, Tim the wizard is first level and has 10 hit points but wears 100 hit point steel armor that absorbs 10 hit points per strike. A goblin rushes him with a 100 hit point steel sword and does 6 points damage. Since Tim is not in defensive mode (and does not have the parrying skill) the goblin scores an automatic hit.
The goblins luck scores him a critical - double damage! Tim's armor takes 10 points damage and Tim's base hit points is down to 8.
Tim casts "kill annoying goblin", his lone spell, which consumes the goblin from the inside out and leaves it a bloody mess. Tim picks up the sword, which is good, because that was his only spell for the time being.
If Tim can get his armor to a forge he can repair it. The sword, which also took 10 points damage, can also be repaired.
This system would be tedious to play manually but its something which machines can calculate fast and furiously. I got the idea from simple physics and wrote some routines two years ago.
Nice idea even though I'm not big on dungeon crawlers anymore.
Can you explain the combat mechanics again and maybe in a different way ? I didn't get it.
Also, good luck.
This is what they are good for then: extra hit points and damage resistance.
First round: attack. (both players hit automatically; no "to hits")
Goblin has one strength which modifies his 5 damage sword to 6. Goblin rolls its Luck and succeeds. Goblin will do 2x6=12 damage.
Tim has 10 hit points and is wearing steel armor (but not a shield). This is his first line of defense. Armor has 100 hit points has 10 points of damage resistance.
Therefore, the armor takes the first 10 points of the Goblin's sword damage and the next 2 points of damage are past Tim's only of defense. Tim is now down to 10-2=8 base hit points.
The armor now has 100-10=90 hit points from the damage it took. The sword also had 100 hit points. Tim's flesh has no damage resistance to steel so, all things being equal (see Newton above), the sword is also now at 100-10=90 hit points.
Now if Tim did have a shield there is a 50% chance the shield would have taken the first 10 points of damage and the armor the next 2.
Simultaneously, Tim cast "Kill Annoying Goblin". The Goblin fails his Luck and explodes in a bloody mess and Tim now has the option to take the Goblin's sword and whatever other treasure fell out of its stomach.
is that clearer?
That makes sense now :)
Update on graphics. I had thought of leaving the graphics as is and then making the game. I was thinking of redoing it as part of sequel and just move on but then I thought twice about it. Now its almost done. Having a cleaer idea of what I'm doing helped a lot.
The number of images has doubled but they are far easier to organize now. I'm not trying to cram double the depth into one set of images.
That's not a bad idea… About the smart phones I mean.
well I figured out how to get the screen to span the width of the device regardless of resolution!
these are from the emulator - different versions of the same image. the top two are in 10.1" 1280x800 (10:6 aspect ratio) and the bottom two are from 480x800 in portrait and landscape respectively.
the tricks are to place the pictures as a background so they scale then put it into a linear layout and give it weight. I made the ImageViews Buttons instead but I am not sure it did anything except cause a problem (the different objects seem to inherit a lot from the layouts they are in it turns out - at the time I thought the features were inherit in the object itself) - I forgot to change the ImageViews to Buttons in the program itself. In my mind that should have caused a "not found" error and not allow the program to compile , but it did not. Regardless, its figured out.
I played around with the direction images and got them where I want them. Text arrows are out! Now you can move around with one thumb great in portrait. Before you had to break it practically to strafe right (and yeah I added strafing even though I hate it).
I even have some sound effects added and managed to turn off the built in ones.
I am currently working on doors which should I finish in a day or too.
After this I plan to tackle the Z plane and go up and down levels. For this I will add ladders and possibly pits.
I am thinking about layering more images on top of the screen - this would keep me from having to create upteen more images (rather than 3) but doing this I see problems in how how to do this and still maintain the illusion of depth as walls come over them. I think I would have to erase those layered images as the walls are put in place.
Layered images could also work for things like statues and fountains or even monster images and not just elevators. My concern is that seeing the monster would require the monster to chase you and I would have to add some rudimentary pathfinding AI to do it properly.
Doors are done to my liking
while testing it I noticed with the small screen it was sometimes hard to tell why I bumped into walls so I put directions on the ouch! as you see above.
wide angle doors
inside of a door
I was playing around with some free textures and came up with this.
It needs some cleanup but I'll probably implement this tomorrow.
I really need to get this into OO. Its already becoming bloated and I'm relying on global variables :P.
BTW - I'm impressed with this one site that does a lot of free textures. If I don't hand draw them I'll be looking around the web for other assets that are available for commercial use.
"Global variables are like the flu. It's nice to be off work for a day or two, but if it gets out of hand you could get pneumonia and end up in the hospital"
That looks quite good actually. I thought you were leaving the colours as black and red before :blush:
I don't know if it should be single character or I should dive right into a party when it gets that far.
okay, finally finished brick walls and realistic doors
this amount of detail moved the program up from around 50k to 3.5mb.
I actually had to redo it two or three times. this kind of detail is not forgiving visually so it has to be done right or all the details make it look off compared to simple solid color walls.
Additionally, I originally had artificial gaps between the walls which were required with the untextured walls but were a real problem with the brick ones. I realized if I had them bleed to the edge they naturally create an artificial gap between each other.
As you can see I also added a floor. I simply but an image in the background of everything else and it was one of the reasons the gaps were a problem: they blead right into the wall background which made the look like half of them were part of the floor.
The last step is to add door creaking sounds then I will have up and down ladders before I finally move off the map. By using a similar system to the floor I think I can create layered "sprites" to mark the ladders and possibly doing interesting things like pits and fountains.
What 3D engine are you using, or is it your own?
they're pre-rendered 2d images. OpenGL is available for Android and there's even an Android module for the free version of Unity, but I don't have $400 for it.
If I make a sequel I might do OpenGL and maybe even smooth scrolling. My buddy does a lot of 3d so I'm hoping I can convince him to partner up with me.
As far as I´m concerned, now I´m intrigued. Keep it up.
thanks for the kind words
the way I was trying to do them, ladders were proving more difficult than I originally thought. I guess I will just make them like a standard tile and see what happens.
I was showing what I had around to friends (and even my ultrasound tech) and the first thing they did was press the side buttons and then ask "what do I do?" One of my colleagues even did it too and she's a Comp Sci professor. Her excuse was she doesn't play games like this. AFAIK - there are no games that have this kind of interactivity yet.
So now I have a big giant
which disappears the first time you press it.
The other thing that shocked me was some of them were trying advanced touch screen features - that is, one person was trying to swipe it to turn and another was trying to zoom in and out with two fingers. I won't do the zooming feature but swiping makes sense. However, a simple way to do this is not built into android so I will likely have to use someone else code and adapt it.
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 everything 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,
I think you should use another texture for the floor, it'll greatly improve visual experience and reduce headache.
I agree with GG. :) Having the walls and floors look the same makes it fade in together.
GG, how's your game going along ? No updates on your sub-forum anymore …
|All times are GMT +2. The time now is 07:02.|
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright by RPGWatch