Tuesday, March 26, 2013

Fast RPG Update 6

Saving & Loading!

Changelog:
23/03/13:
- Added mute button
- Improved contrast of UI


24/03/13:
- Added saving/loading game data (inventory, equipment, quests, stash, player stats)
- Start at level 1
- More appropriate equipment at the start
- Made all items & quests serializable for easy loading/saving
- Added save game button in town

- Changed player sprite (still WIP)

25/03/13:
- Removed pole in town
- Improved notification window
- Improved question window
- Added question when saving
- Added clear data button for wiping the saved game
- Changed equipped weapon position and scale
- Multiple items got from chests now don't spawn multiple notification windows, but one with all items listed
- Enemies drop clickable chests


26/03/13:
- Added pages and buttons to stash (150 items can be stored, split into 5 pages)
- Improved quest system
- Updated save/load code
- Fixed huge bug: accessing the player equipment created empty equipment in every empty slot instead of null, resulting in lots of glitches and bugs
- Updated stash position and look
- Adding generic button class for all buttons, with mouse over and press texture changes (5%)

Explanation:

I've left a bigger gap between this update and the previous one because there were some features and changes I really wanted to put in there that were suggested on Reddit by the user NobleKale, a very active user on r/gamedev. Here is my post on Feedback Friday.

His comment inspired me to make some changes, especially the GUI and a mute button.
So I've improved the borders on GUI elements and changed the colors:


And I've added a mute button as you can see under the inventory button:


Another thing I was thinking about ever since the beginning of this project was an effective and easy way to save and load progress. I had to save the preferences anyway so the game would remember if you disabled the sound.
I decided to make a save & load system that collects all the dynamic data and store it with PlayerPrefs  as strings.
This was a bad idea, especially for the inventory and all other item-based collections.  
Luckily I found a very handy script that handles serialization (saving) of custom classes very well and saves it to the playerprefs.
 
This meant I could easily save all items as blobs of data that could be loaded fast at startup.
Everything is saved now if you click the save game button:

Clearing the game data is also possible, although I'm going to move the button somewhere else, probably inside a settings screen. When you press the button you get this lovely warning:

As you may have noticed, notification windows and question windows have been improved, the icon has been placed on top and the information is below it.
Here are some examples:

Notifications can now display multiple icons for showing everything you got from a treasure chest in an instant.

Speaking of treasure chests, all chests are now clickable, even the ones dropped by enemies:
I've also added an animated arrow to make it clear you have to interact with it.
This change is the first towards putting more interactivity in the game besides drinking a potion or two to regain health.

The player sprite has also changed, to a more warrior-like appearance, but there's still a lot of work that needs to be done:
Another thing I've added is stash page browsing, the stash in code was way bigger than could fit on one screen, especially if the target is an Android phone, so I've added navigation to the stash window:


You can now use the full 150 item slots for organizing your stuff!

One last, but very important change I've started on is visual button feedback:
Note the Adventure button color, the cursor is on it
What I mean by this is that buttons light up when you move your mouse/finger over them and press them.

Phew, I hope this update wasn't too big.
Please leave a comment or tweet me if someone has a question/suggestion!
I'll post the save/load code if anyone is interested, it should work with any game.

Cheers!
BlackDragonBE

Friday, March 22, 2013

Fast RPG Update 5


Changelog:

21/03/13:
- Added drag 'n drop from inventory to link bar
- Added background music
- Bug fixed: item shop floor acted as return button
- Updated vendors in town
- Bug fixed: between battles, turn bar can be seen too soon

22/03/13:
- Added drag 'n drop for switching positions in link bar and adding back to inventory

Explanation:
This time I've worked mainly on the action (link) bar on the bottom of the screen.    


It's pretty hard to show the changes in screenshots, but dragging and dropping now also works wonderfully with the action bar. Usable items can be dragged in and out, and can be moved to another slot.  


Some vendors in town have gotten a small visual update, definitely not the final version, but at least they're looking a bit more unique:
Item shop

Inn
I'll be posting to Screenshot Saturday on Reddit this night, I always seem to be late because of the time difference, but this time I'll be prepared! :D

Tuesday, March 19, 2013

Fast RPG Update 4

Changelog:

18/03/13 part 2:
- Treasure chests: supports multiple items in one chest now, but animations shows only first one
- Added map background and hiding/showing GUI on map show/leave
- Added Drop/Destroy button for items in inventory
- New question window, for Yes/No questions
- Added question window before destroying item
- Added icon & name to destroy question

19/03/13:
- Changed map background
- Added WIP town icon on map
- Drag n Drop from equipment to inventory drops equipment item at right place now
- Added some equipment


Explanation:
I wanted the world map to look a little better so I made one to use for now:
The world map
World map ingame
It's still a work in progress, but at least it adds a bit to the mood I think.

The items in your inventory can now be discarded by pressing the new trash can icon:
Discard button
When pressed, it opens up this new question window:

Question window

I've made it so it can be used for all yes/no questions I might need in the future.
In this case I thought it was necessary because I don't want players to destroy their hard-earned items by mistake.

Finally, I've added some new items:
Gold armor

Lava armor

Pointed Helm
Small mana potion
Weak mana potion

Wooden shield 1

Wooden shield 2

Wooden shield 3
Cheers!

Monday, March 18, 2013

Fast RPG Update 3

Changelog:

16/03/13:
- Bug fixed: Map -> battle loads battle room too early and it gets destroyed at scene loading time
- Added treasure room
- Added clickable treasure chest for treasure rooms, click on chest to open it

18/03/13:
- Items can be unsellable (for future use)
- Start in town, redesigned battle system
- Bug fixed: - Putting item in inventory from stash doesn't update quests
- Bug fixed: moving item to equipment or stash didn't update quest progress
- Bug fixed: Return to town button above character window in pub
- Bug fixed: backgrounds of bars gone


Explanation :
Lots of bug fixes this time, but some very important ones, because the quests wouldn't get updated when you got an item out of your stash or put it in an equipment slot.

The treasure chest room addition is the first step towards my vision of adventuring in this game.
Treasure room in dungeon

Opened chest
There's a chance of random events when adventuring, and this is the first one, a room containing a treasure chest you can loot by clicking on it. I still have to write a manager for getting random items depending on the room level but it at least it works for now, which I'm quite happy with.
Future rooms will contain other events like a wandering shop that sells rare items.

The best change in this update is that you now start inside the town when the game begins.
This meant my battle system had to be modified because it had a lot of code to start the battle right away which ment a lot of double code. That now has been taken care of.

The backgrounds of the bars are gone in the screenshots, but I've fixed that while writing this.

Saturday, March 16, 2013

Fast RPG Update 2

Changelog:

14/03/13:
- Topbar: enemy lv text and name now also infront
- Drag n drop also working from equipment to inventory now
- Animated windows
- bug fixed: new equipment drag code broke the unequip button and selection
- Started Map

15/03/13:
- Bug fixed: ring drag 'n drop duplicating item
- Notification animation update
- Animated torch added
- Room loading in battles
- Added notification stacking, new notifications will move over old one
- Changed some town room buttons, the text was readable through some windows even while the button is the background
- Improved fader
- Added notification window if you don't have enough gold in inn, previously player would shout it

Explanation:

This update was mostly visual, but I added drag 'n drop from equipment to inventory now as well.  Some weird bug that would allow duplication of rings creeped in, which my girlfriend found and abused immediately of course! So I had to dive in again and make some changes to my equipment code.

I'm really happy already how the window opening animations make everything feel a little better already (you can watch the animations in action in the teaser in my last post).
It might seem like a minor detail, but it really does a lot in terms of game feel. 

I also made a rough torch in Graphicsgale and I added a frame to it so it's slightly animated:
Torch


The torch might not look great, but I'm using it to build some variations of dungeons so I can see when my battle room manager has loaded a new room at the start of a new battle.:

Dungeon variation 1

Dungeon variation 2



Lastly, I've modified the way notification windows pop up on the screen if there's already one present. They now stack over each other so the text doesn't become an awful mess anymore:

4 stacked notification windows

Cheers!

Friday, March 15, 2013

Teaser

Teaser on YouTube:


A few things went wrong in the video for some reason, like the monster spawning in town, but I think this shows pretty well what I have up to now.
Not everything is shown either, like the treasure chest animation when getting an item.
I'll save that for a later post.

Cheers!

Thursday, March 14, 2013

Fast RPG Update 1

Changelog:

13/03/2013:
- Much more accurate drag code (was using the 3d camera as reference instead of the 2D one. d'oh.)
- Drag n drop working from inventory to equipment

14/03/13:
- Topbar: enemy lv text and name now also infront
- Drag n drop also working from equipment to inventory now

Inventory to equipment drag 'n drop and vice-versa

After I implemented this feature in the inventory code I noticed it was really inaccurate.
I know I've had some problems like this before with the stash<->Inventory drag code but this time I couldn't fix it by moving the UI further back or front so I checked the drag code for mistakes.  

Well, it seems I was using the wrong camera for determining where the player mouse/finger is.
I use 2 cameras in the game for achieving a 2.5D effect, one that renders the 3D parts and one that renders the sprites.
The one I was using until now for dragging was the 3D one, so the positions in the game world it gave me didn't correspond to the sprites rendered.

More accurate drag 'n drop everywhere

Because of the fix, drag 'n drop is working better than ever!

Screenshots

Not much I can show except the enemy level and name text in the topbar and me dragging a sword from the equipment window to inventory:




Cheers!

Tuesday, March 12, 2013

Time to post again!

Revenge of the gamedev

I'm back again, I've got some time to post and I realized this blog should be used for keeping up with my development!
I've got a twitter account set up by the way, on which I'll link to this blog posts from now on!
A lot has happened (again), I've been using Unity ever since my last post and I have to say, it's been great!
I've upgraded from 3.5 to 4.0 and I've bought an Android license from Unity and I registered as an Android developer on the play store.

To celebrate I'll start with the games and unfinished projects I've made this past year:

The Past

Coin Machine

Gameplay

Title screen

One of the first games I've actually finished, and the first one on Unity.
I've recently cleaned it up and made it a bit prettier and released it on Kongregate and the play store for free.
This is kind of a simulator for a coin machine, you drop coins on the table, which then pushes other coins and prizes off the table which you then collect and get points.
Very simple game, but I've learned some things about PhysX from making this, especially that it isn't a good idea to load lots of mesh colliders on a mobile phone.

To my surprise it did OK, I had a few installs on the play store and some people were playing it on Kongregate too!

Boru Bounce

Title

Help screen

Start of game

Almost finished level

Another game I've released on Kongregate and the play store!
You shoot a ball with a cannon and try to achieve massive score with the help of special orbs in more than 30 levels.
I've used a xml file to load levels from Tiled, this was really fast on all devices and it was quite easy to edit and create new levels. I've let my girlfriend make some levels in it too and she enjoyed the process.

Project 2 Player






First try at a 2 player game in Unity, it failed miserably because I wasn't experienced enough.
Trying to make a 2 playerco-op action rpg was a little more than I could chew and way too complicated.
It also didn't help I wasn't good enough with Blender to make decent models.

I used pathfinding for the enemies which worked ok, except it dropped the framerate every so often to update the grid.
I stopped developing it after a while.


Project Run! 

Attacking a demon

Running

Killed a demon

A simple runner game for Android, which was never released.
You have to time your jumps to cross the platforms and kill demons along the way.
This was quite a fun project but it was quite hard to play.

I've uploaded a web version and an android version to my dropbox if you want to try it.
You can use the buttons or space to jump & ctrl to attack.


Techno Ninja

Adventure prototype room

Adventure prototype explosions, cam-ball

Adventure prototype looting

Final game title

Final game

Final game

This started out as an adventure game but my scope was way too big so I managed to save the game by turning it into an arcade game with 3 1 levels and 4 2 weapons. As you can see, I even had to shrink the arcade game down.

This was actually a good decision, because it would have been another unfinished project otherwise.
I decided to release it alongside the others on Kongregate because one of my colleagues and friends said it was pretty fun .
There were a few comments about it being laggy on some machines so I've put in a quality button to toggle the graphics and I've set the default lower than before.

Even with the changes, there were very few people playing it.
I'm glad I finished this one though!

The Present

Project Fast RPG

First version
Battle Screen
Inventory & equipment screens

Showing the description windows

Town

Blacksmith

Character & iventory selection

Quest board, completed a quest

Quest board: looking at an accepted quest

Available quests

Looking at an unique weapon

Finished fight, player is running towards exit

This is what I have been working on the past month or so, I've also posted it to screenshot saturday on Reddit.
I'm planning on releasing it for Android, the web, PC, Mac OSX and linux.

I'm enjoying myself making this and it's working out great!
I've got a lot of stuff in there already, like an inventory system, shops, equipment, quests, etc. and I've decided to use a 2.5D style.
The graphics aren't all final yet, I'm focusing on gameplay for now and getting all systems working, but they do a pretty good job.

I'm not using any plugins or libraries for the 2D in unity, every sprite you see is a simple plane with just 2 triangles so the poly count is kept down.
I've also done some small optimizations and I get a solid 60fps on the android devices I've tested except for my old HTC Desire, which got between 20 and 25 fps. (8 fps before the optimization!)

The game is a long way from being finished, but I feel I'm getting there eventually.
I'm also planning on updating this blog and my twitter account every time I add content.

I'll end this post with the changelog up to now, I've done more but anything before 25/02/13 isn't documented:
25/02/13:
- Changed front camera to orthographic, much easier to get UI elements right
- Shop progress: can now select and inspect items, can't buy yet, button has been placed
- improved dragging code, now works instantly, no need to hold down anymore
- Changed UI backgrounds

26/02/13:
- Changed backgrounds to blue for less brown
- Buying possoble by double tapping, button not working yet
- Improved bar code in battle system so the bars can be scaled and it still works
- Improved UI of equipment
- Added icon to description window, added black bar to title
- Converting top bar to orthographic for better layering (30%)
- Buying in shop fully working
- Centered UI for better multi-res support
- Adding black backgrounds for bars

27/02/13:
- Made topbar more compact
- Converting top bar to ortho (100%)
- Black backgrounds added in tob bar
- Added weapon visual
- Added true turn based combat, no more attacking at the same time
- Fixed bug: Using action other than attack, pauses time
- Updated description window
- Double tap use sound in inventory
- Hiding enemy bars & turnbars when out of battle
- Added black title bars to all windows


28/02/13:
- Added item shop
- Modified shop code for shop types
- Enabled item shop button in town
- Added code in topbar to show/hide the bottom bar, needed for the map system to have more screen space, etc
- Converting the town buttons to dynamic buttons (15%)

02/03/13:
- Converted town buttons
- Optimized scenes, now runs at 60 fps on tested devices (30fps -> 60 on one X)
-
3/03/13:
- Level up notification
- Added selling
- Sell and buy price differ now : sell price is 20% of value
- Starting quest system base

4/03/13:
- Expanding quest system
- Quest visual started

5/03/13:
- Visual quests

6/03/13:
- Pub started
- More visual quests

7/03/13:
- Pub papers on quest board sprites
- Pub finished
- Quest code almost finished
- Working on quest system (Getting reward)

9/03/13:
- Quests take needed items out of inventory now
- Added notification window + icon
- improved loot system
- Added Bone item
- Fixed Description window button show code
- Updated Bone icon
- Notification window

10/03/13:
- Updated notification window
- Adding stash (100%)
- Click on quest board opens quest board
- Adding more drag n drop (starting with stash <-> inventory)

11/03/13:
- Quest Window: change background for selected quest
- Changed way description windows work
- Added comparison for equipment
- Added vial of slime (common)
- Slime drops vial of slime now
- Added new item type: Monster Item (drops from monsters, used for quests, crafting?)

12/03/13:
- Updated drag code, same for android/other now
- Removed compare window bug, compare windows would instantly close and not be visible in some cases


 Cheers!