Saturday, June 26, 2010

All-In-One UI Screen

I've been hard at work this week implementing the all-in-one UI screen. This little wonder replaces my old enchant screen and socket screen... It's simply a long list of everything I track in the game. This currently includes the player stats, inventory of items, crystals, and recipes,  players learnt spells.

Here's a screenshot of the stats section while the player has points available for upgrading stats.
I expect I'll add a tab on the right to group different sets of information together,  but for now, the screen is fully functional and I've deleted the old enchant and socket screens. With only one interface doing all this, I can put a single button on the main game UI for accessing it all and hopefully the player will find it easier access to all the features of the game if there is just a single list to scroll through.


The screen is still lacking polish - transitions and general artsie goodness, so it will undoubtedly get some love in the proceeding months, but, for now, it is fully functional so I can leave it and move onto other things.

Apart from working on this,  I bought an iPad this week. I love it  (though its cost me some productivity this week) !! and the kids love it too. Prior to Aug 2008, I owned absolutely no Apple products and thought them rather overpriced for what you get.  Now I have an iPod touch, iPhone 3g, mac mini, iMac, iPad, and I'm queuing up for an iPhone4 as soon as my current contract runs out.  I've got Magelore running as a universal app so it opens up as a fullscreen app on the iPad. Currently, this just means it scales from the 16:9 of an iPhone to the 4:3 aspect ratio of the iPad. I'm still thinking through how I'm going to layout the UI on the iPad. I'd like to take advantage of the extra rez to show more content, rather than to simple uprez. However, this basically means every UI element and backdrop now needs 2 sets of co-ordinates.Once I get some UI sorted on the iPad, I'll send through some new screenshots.

I may lose some dev time soon as I really need to go through all my Wretched Games apps and upgrade them to iPad. Having an iPad myself now,  I'm loathe to download iPhone apps and have them scale and blur to a portion of the play area. Instead I mainly just browse the iPad only games since they will be nice and crisp on my screen.



View on You-Tube - Shows Annotations

Saturday, June 19, 2010

NPCs and Quests - Making progress again...

I've finished my major code refactoring for now. I've even managed to make some content progress again, and have started on a universal inventory screen that can display all stats, ingredients, quests, enchantments, and the bestiary. I was originally planning on having lots of independant UI screens for these things, but it's looking like a single scrolling menu will work better - though probably with some tabs for viewing different subsets of items - scrolling through 300 items would get a bit tedious and noisy...  I think this will also replace the current enchant screen and possibly even the socket screen.  If it works out it will be great because it means the player will have one standard interface to learn to get access to all the games stats and items.  There is a small preview of this screen midway through tonights video, though there is still much to do on it.

I thought I'd go over some of the quest & conversation system tonight.  It's actually been in and working for a couple of months now. Each NPC in the game has a list of conversations they can have with you if particular conditions are met. Missions are generally (but not always) be started and ended in conversations. On any line in a conversation I can run scripts that can control any aspect of the game. Each line also has the option of giving the player multiple possible responses...  This allows the player to control the conversation at key points and will results in minor rewards or punishments to the player. I don't want these choices to have long lasting consequences as I don't want the player to be afraid to experiment with responses. Sometimes a nasty response can give good benefits - intimidating an NPC into giving extra rewards -  and sometimes a friendly response is going to work more in your favour.

In tonights video you can see a clip from the tutorial mission for the game. The setting of the mission will be moved in the final content as you will start in a city and not be allowed to leave the area until you have completed the tutorial. I don't want players getting lost in the world until I've explained some of the basics. Experienced players won't take long to complete the tutorial. I can always slot in some fast-track responses if needed that will skip the tutorial. I've gone with photographed people for the NPCs. Apart from it being a really cheap way to get lots of character art,  the grand plan is to have a mode where people can add their own faces to the actors in the game - effectively you could put all your family and friends into the game.  It's something of a gimmick but I think it could be really well received. Yes, that is myself and my wife as the main characters, but don't tell her I've put her up on youtube :)

So, anyway, in the video you can see me having a chat to the mage master Mina and she is going to eventually teach me how to do magic. Early in the conversation I am given a choice of response.  If I respond confidently, I jump straight to the harder mission. I am not confident, she gives me an easier mission first (as seen in a second run through at the end of the video).  The final outcome is not affected as I still get to do the hard mission either way, but it is a good example of how the conversation flow can change according to your responses. Other examples would have the NPC giving me additional rewards or puzzle clues.

Thats probably enough reading for one night. Enjoy the video and see you next week.



See it on youtube

Monday, June 14, 2010

Not everything should bend...

The rendering system I use bends tiles so they don't look too linear. I was finding the square old-style tiles just look a little too bland for modern games, so I warped all space.  However, this looks pretty bad on a city wall which really needs to be straight or very subtley bent...  So I've add the ability to remove bending on certain tiles.

I spent some time reworking some of the tiles that were looking particularly bad. I find doing a little art once in a while is good for motivation. After spending most of the week refactoring code that doesn't advance the game at all,  I felt the need to some some change in the game...

That's all for now. I'll keep the mid-week blogs very small, or else I might need to drop them and just concentrate on the end-of-week blog.

Friday, June 11, 2010

Keep it clean or you're doomed...

Just spent the last 2 nights restructuring the code to keep it clean and simple. I had objects like herbs and crystals that were being created by one manager, spells by another, and enemies by a third. So I bit the bullet and made them all derive from a common system. All my xml files are now read by a single system that can create all manner of objects... Of course that means not much glitter for this weeks blog video :( but its just too dangerous to let your code get too messy. The way I program, I tend to rush in and prototype stuff and get it working quickly, then spend a day or two redesigning the code framework. I try not to spend too much time designing up front until I know what the final design needs to be, and there's no way to know that until you've given it some prototyping and play testing.

Also I've switched all my enchants to script driven now, which lets me add an enchant to the game in, literally, a few seconds - though balancing it and choosing how the player will get the recipe takes a lot of thought and time. A script for my lowest level regeneration enchant looks like:

event name="OnTick" script="onPercent 10 (addHealth recipient (power * 1))"

This effectively reads that on every game cycle, we have a 10 percent chance to add power * 1 health to whoever is the recipient of this enchant.  The power is calculated based on the mages skill as well as the socket that the enchanted crystal is placed in.  There are 7 to choose from and they change in power depending on whats happening in the game.  The Life socket has more power if you have more life.  The War socket has more power you are attacking or being attacked.  The Dark socket has more power at night,  etc... The Balance socket is always active but is only half the power of the other sockets. In the video you will see me attack a giant. The first attack goes bad and I'm quite hurt. I back off and socket the regeneration enchant in the Life socket, but since I have few hitpoints, it has little effect.  Moving it to the balance or Spirit socket gives it a huge boost.  In the final game, you'll only be able to juggle sockets at midnight at a special location. This will mean you must live with your choices for a full game-day before you can experiment again.

Also in the video, you can see more of the dynamic lighting system. The distance you can see is reduced in caverns and you see the shadows nicely wrapping to the cave walls.



Watch on you tube

Wednesday, June 9, 2010

Time moves fast when you're having blog

Wow. You really notice time moving fast when you commit to writing a blog every 2 days. At least I made some progress this time. I've reworked the entire damage system so my enchantments and spell effects can patch in at any stage and intercept results. This should make it a breeze to implement any type of stats affecting or damage affecting enchantment. Yay! Too exciting, I know!

Since I don't have "equipment" in the game to upgrade, enchantments have the important role of filling this void. You get 7 slots to fill with enchanted crystals. Each slot has different properties defining when it is effective, such as being more effective at night time, or more effective when your health is full. The player will be able to reconfigure their choices at no cost, though they will need to do it at a particular place and time. We'll see how this goes with play testing. I may make it require gold to access the the screen, or make it only accessible at midnight, etc... Or maybe it should just be accessible at any time for free... It probably won't be clear what works best until I have some real missions and enemies that need specific enchantments to kill.

Here's a teaser screenshot of the socketing screen to tie you over till my end-of-week video..



As a p.s.,  someone told me that h1 tags are important for google searches. So, if I had no scruples and was to imbed something like

MageLore iPhone retro RPG is teh awsomz

then this blog might score higher in a google search. But I guess I'll never know...

Monday, June 7, 2010

Slow weekend...

Well, I got absolutely nothing done on MageLore over the weekend.
Spent most of Friday night doing the video blog, Saturday night catching up on sleep (even with a ring of +3 to awakedness and mug of endless coffee, I still need some sleep), and Sunday night was spent converting Venger to a universal ipad + iphone app - only to have it crash in release mode :( but I'll fix that once I get my hands on a real iPad.

A friend at work put me onto Google App Engine. Looks like it will be a great way to keep stats and power any custom community aspect to the game that Apple's GameCenter (leaderboards/friends/etc) doesn't cover.

So I'll leave this blog uber-short and get stuck into making some actual MageLore progress.

Oh, and p.s., I just found out some friends from work have an XBox Indie game online - Rock a Block - apparently doing quite well at no.#7 on the indie chart. Check it out if you have an x360 on live.

Friday, June 4, 2010

Magic System

Hello again.  I had intended to work on the enchantment system but ended up getting sidetracked into spending a night trying to come up with a nice transition when entering and exiting cities..

Well,  I tried an old style noise dissolve and a rasterline wipe, but they ended up looking more like bugs than transitions. I've settled on a set of random screen warps for now, but I'm still not really happy with them. However, I don't want to get bogged down looking for the perfect transition, so I'll let it sit for a few weeks and come back to it.

SO... I said I'd talk about the magic system today...  It's very important to magelore because I've ditched traditional weapon and armour upgrades and put all the effort into spell and enchantment upgrades.  All spells and enchantments have recipes - lists of ingredients and requirements that need to be met.  You will need to find a recipe for a spell before you can learn it and these can be bought from shops, dropped from enemies, dug up from hidden spots on the map, or (possibly) stolen from npc's.  Once you have all the ingredients there will be some kind of alchemy lab minigame to complete to learn the spell.  Then it is permanently learnt and you can start using it whenever you have free mana.  Some more powerful spells will have a per-cast cost as well... Killing an enemy with a spell can also cause them to drop different items.  In the video below, I had to kill the snake with a fireball in order to collect the charred serpent ingredient needed for the rain-of-fire spell.

ok, that's sounding more like an instruction manual than a blog now...  The main goal here is to keep micro-rewarding the player along the way to learning magic,  and making sure the magic is worth learning but not overpowering... Killing with magic tends to be faster than melee and you're less likely to take damage since its often a ranged attack. Hopefully its just a fun way to kill also...

As well as spells, there are enchantments. I think these need there own blog, but basically you enchant crystals and socket them much like making a gem in WoW. However, once you have your enchanted gem you never lose it and can rearrange them periodically to overcome specific challenges or just to experiment to get the best effect... But more on that later..


That's me for tonight. Here is a little video showing the town transition effect and the rain-of-fire spell.



Watch it on youtube

Wednesday, June 2, 2010

City Tech

Had a productive couple of nights. You can now enter cities from the world map and triggers at the edge of the map will take you back to the world.  I increase the zoom a fraction in cities/towns so it feels like the scale has changed slightly.

I'm going to keep the world mostly persistent. That is, if monsters chase you into a city, they will be waiting for you when you exit back out, along with any treasure chests you may have not picked up yet. I knocked up a quick serializer last night so now all the entities are saved to a file whenever you change maps. I'll still need to ensure that resetting the maps works with the game design because I'll need to do that when I release updates such as new towns and npcs. I think the best approach might be to timestamp the maps so they reset if you haven't been in the map for a game day.

I'm still evaluating what to do with my 'warp' tech in towns.  You'll see in the videos that all the tiles are not square like in other games,  there is a subtle curve through everything. I find this really improves the look of outdoors areas,  but looks really odd on hard structures like town walls.  I've been experimenting with techniques to flatten out the warp selectively, but its a little expensive at the moment on the first gen ipod's. Hopefully I can get some more performance out of it.

Next, I want to get my enchantments working. I'll release another video update on Friday and talk a bit about the game design and magic system.  So long till then.