Day and Night lighting in 001 Game Creator

For this week I figured I’d do a behind the scenes look at how the time of day lighting system works in Tales of Astya.

The first step was creating a huge array in 001, to hold each of the overworld map locations, like so. You can also see that it says Z 1/24. Each of the Z layers holds the color information for that hour.

Setting up the array

Skjermbilde 2017-07-05 21.28.59

Now that’s all fine and dandy, it’s time to delve into the scripting side of it. The system consists of four different events, detailed below.

  • Initialize Sun color
    • Used at launch to fill the array with the correct color info, rather than doing it by hand. Efficient!
  • Set Map Sun Color
    • Sets a specific color for a specific map, at a specific hour.
  • Set Region Sun Color
    • Same as map, but for an entire region.
  • Update Region Sun
    • Updates the sun color to the correct color, with color blending.

The code behind it

Let’s take a closer look at each of them, starting with Initialize Sun Color.

Skjermbilde 2017-07-05 21.37.34.png

A very simple script that allows me to specify a color for each of the hours and fills the array on that Z index with the color code. Nothing fancy about this one.

Set Map Sun Color as well, very simple. It gets which region to use, then applies the proper offset on X and Y. In this screenshot the offsets have not been applied just yet, but it is in the game now. Skjermbilde 2017-07-05 21.41.27.png

The code for Set Region Sun looks pretty much the same, just with two for loops going through the X and Y axis.

Then at last, it’s Update Region Sun Color, the one that took the most amount of time to get working correctly. It consists of two more for loops, going through the X and Y axis of the array. Skjermbilde 2017-07-05 21.48.37.png

The above screenshot is from the X axis loop, where it uses Change Sun Color (built in event to change map lighting) to the specified color inside the array, and then changing the Fog Color to the same color, just a bit lighter to add depth to the scene. The Sub Script in the middle labeled DEFAULT is the legacy lighting system and is no longer being used. It was placed there as a fallback before I got around to making the Initialize Sun Color event in case the lighting value was 0.Skjermbilde 2017-07-05 21.51.23.png It was pretty bad, and would only update four times each day, instead of 24 like the new one.

Updating the lighting at runtime

That’s all for the code part of the system, but what about the implementation? Very simple! In a trigger on the player which is triggered whenever Hour is changed, this code is placed to update the lighting correctly.

Skjermbilde 2017-07-05 21.53.46.png

Benefits of this system

One of the biggest benefits of this system is that it allows for dynamic changing of the sun color, either on a regional or local level based on actions by the player. The sun/night sky could be different colors while the player is on a quest for example, or it could be contstant day all the time. The possibilities are endless.

That’s all for now, make sure to leave a comment, either on this post or Facebook telling me what you think or if you want to read more posts like these 🙂 It was a lot of fun to make, so thanks for reading!

 

Public beta now available on Itch.io

It’s finally here! The public beta for Tales of Astya is now available for download on itch.io! It’s been a long time coming, and now it’s finally here.

Click here to visit the download page

How to help out

If you want to help with the fixing bugs, the best thing you can do is use the in-game bug reporting tool or visiting this page (Google Forms) to report something. Inclusion of screenshots are greatly appreciated and will help speed up fixing considerably.

Update schedule

The plan is to release weekly patches when the most critical bugs have been fixed, with new content being added periodically. I will be making blog posts both here on this website and on itch.io using the new Devblog feature.

I’ve also recently begun streaming some development over on Twitch, and plan to continue doing this when fixing reported bugs and adding new content. Schedule for streaming is currently set to be between 17:00 (UTC +1) to 20:00 (UTC +1), hopefully every day. Join in and listen to some chill music and talk about game development. I will be posting on Twitter 10-15 minutes before starting a stream to give you a heads up.

Other changes/additions

Not too many this week, as most of my time has been spent replacing the old dialogue boxes with new ones.

  • Added safes with number combinations that hold large sums of money.
    • Codes can usually be found in the near vicinity of the safe.
  • Removed all 3D models and went back to using only 2D assets.
  • Some quest improvements

That’s all for now. I really hope you’ll download and try the beta, and report some glitches and/or bugs you come across. Until next time, have a good one.

Quests & Character Generator

For the past two weeks I’ve mostly been working on writing quests and whatnot, therefore no post last week. I’ve also made some other smaller additions of course, more details below. New art and maps aren’t such a high priority right now, as it’s mostly done. The focus forward will be on adding in all the quests and characters, which means posts will be less frequent (not every week, but definitely every two weeks). Let’s jump in.

Questlines

For the most part I’ve been working on the questlines related to the Outposts,  one of the primary factions you interact with. To begin either of them, you have to travel to the West Outpost and talk with the commander, telling him a skill you’re most sufficient in, which determines which of the outposts you are sent to (East, North, South). So far I’ve only worked on the North Outpost quests, amounting to six so far. There’ll be more as time goes on, of course.

skjermbilde-2017-02-16-16-43-23

The North Outpost

You might wonder, what are these Outposts? They are the primary quest hubs for advancing the main story and are spread to each of the four corners of Uspya. Each of the Outposts have a commander, a smith, a trainer and some soldiers stationed there. The blacksmiths each specialize in one kind of weapon/armor that they craft better than anyone else, but will only sell their best goods to those of higher rank or after completing some tasks for them. The trainers can help you gain some free experience points by completing their training tasks.

Deeper Character Creator – Homeland and backgrounds

A few posts ago, I wrote about the redesigned Character Creator. I’ve added two more tabs to it, allowing you to set your homeland and create a background for your character. Changing your homeland affects your stats, as each of them provides a +1 bonus to a specific statistic, as well as changing dialogue from time to time. EG people from Sedresh might not like a person coming from Usmor, or they might want to be their best friend and so forth. This can also affect trading to some degree. The background generator allows you to set your parents professions, your aspiration and your previous education. These settings determine what items, stats and money you start out the game with. EG; your father being a blacksmith starts you out with a iron sword.

backgroundgen

Work in progress.

Other changes/additions

  • Added a variety of cloaks to shield the wearer from rain and keep warm in cold environments.
  • Fixed various sprites and item icons.
  • Added magical wards, placeable by the player. Wards are temporary and stationary objects that attack enemies within range.
  • New types of plants and cooking ingredients.
  • Animated banners and flags to ripple in the wind.
  • Started work on some new enemy types
  • Added transition animation when sailing by boats.

That’s all for this week, thanks for reading!

Redesigns, factions & time flow

For the past week I’ve been working on a variety of things, primarily a small faction, changes to how time and quests work as well as interface redesigns.

Time

One of the changes to time is how it progresses. When the player walks from one edge of a map to another, time is currently advanced by 15 in game minutes to give a feeling of traveling a longer distance. It may change until release. Time also plays a role in some quests, requiring you to finish them within a certain amount of days. Some may also automatically fail if you take too long before starting/finding it, the dialogue of the quest giver can be different because no one helped them within a certain time frame or they may simply have moved on to somewhere else or died.

New Journal

In order to increase consistency of interfaces, I also made changes to the Journal, where you’ll now find your current quests and custom notes under proper categories. Creating custom notes requires you to have at least 1 piece of paper. Quest categories are also in, inspired by the Inventory screen. Below is a small example using placeholder quests. It still requires a bit of work, but it’s a proof of concept at least!

questlog3

The categories are as follow: All, Main, Misc, Treasure Hunts, Bounty Hunt, Faction and Custom Notes. The categories are easily switched between either by using gamepad bumpers or clicking with the mouse.

Treasure- and Bounty Hunt are two new quest types that can be found by either reading wanted posters or finding small maps/notes leading to greater loot. Bounty Hunts usually leads to a nice chunk of gold or some unique items, based on who placed the bounty.

New faction: Stargazers

The new faction is a small one and will not be joinable by the player. This new faction is called “Stargazers” and are  a small group of astronomers and munks. Their job is to look at the night sky and try to decipher what the alignment of the starry night sky mean and turn them into blessings for the people and the land. With a little bit of exploring, they may be the first faction the player will meet after starting a new game.

skjermbilde-2016-12-15-22-45-17

Their astronomy tower and living quarters. No lighting effects are applied in the screenshot.

As with all other shrines and sanctuaries, the player may give tribute to the altars found within to receive unique blessings by the gods or just make the faction like them more.

Camera lerping

I also added in some camera movement which can be toggled either on or off in the options menu.
cameralerp

That’s it for this week, until next week I hope to have applied the same changes as the Journal to the Factions screen as well as implementing more quests and fix at least a few bugs. Cya!

Break time is over

For the week I’ve taken a small break from gamedev, instead focusing more of my time on actually playing games and doing some other things instead of spending the usual 3-5 daily hours working on Tales of Astya. Now I’m back for full, refreshed and ready for new challenges. I’ve mostly been playing Rainbow Six Siege and some Watch Dogs 2 in between. The new map and DLC operators are really awesome! If you haven’t played Siege yet, I absolutely recommend you try it out, it’s grown so much since it’s initial launch. Watch Dogs 2 turned out to be a much more enjoyable game than I initially thought it would be judging from gameplay trailers released before the game came out. Good stuff, Ubisoft!

I started working again fully this monday, fixing various bugs that testers have sent me and adding new features to Tales. These are some of the new things;

  • Barber shop, with custom RGB hair color editing and new hair styles
  • Animal husbandry
    • Sheep that can be sheared
    • Chickens that lay eggs
    • Basic animal AI (grazing and walking around)
    • Placeholders for sounds
  • More recipes to cooking and alchemy
    • Wine and beer brewing
    • Small food dishes
    • All potions that can be purchased can now be crafted (except quest/unique ones)
  • New ingredients to go along with the new recipes
  • Made the full world map (not just the region the current game takes place in)
  • Merchant prices based on the player and merchant Cunning statistic
  • New factions that can be joined
  • More unique dialogue for NPC’s that better fit their personalities
  • Thieves and highwaymen trying to rob the player
  • Shields

And as usual, here’s some screenshots and GIF’s

skjermbilde-2016-11-02-15-06-48

An oratory

skjermbilde-2016-11-03-14-35-46

Small personal library

skjermbilde-2016-11-23-08-03-18

Barber shop interface

chickenpeck

Chickens

sheep

Sheep

shields

Shields

 

That’s all for now, more will follow soon-ish! Cheers.

Interfaces & Mini project

For this week I’d like to write about how the interfaces have changed since the last time I posted screenshots of them. Here’s a link to that post and talk a little about a small game I made during my vacation a few weeks ago that I completely forgot to write about in the last post. More on that near the end of this post.

New interfaces

categoryselector

Inventory and store category selector to more easily find items of certain types. From left to right; ALL, WEAPON, CLOTHING, CONSUMABLE, QUEST, BOOKS, REAGENTS, KEYS and last MISC

charscreen

The character screen where you get an overview of your current stats, equipment and can distribute points in stats to improve them.

inventoryscreen

Inventory screen.

messagebox

Dialogue box with the choices laid out below.

newchargen

New character creator

questscreen

Quest interface with your current quests laid out in a list. Hovering a quest shows you the current quest description and state.

mapscreen

Map screen. The overworld is laid out in a 6×6 grid. You must have a map in your inventory to access this screen.

 

That other game – PLAY IT

Like I said in the beginning of this post, I made a small game as a distraction during my vacation this year and uploaded it on itch.io for anyone to play. The game is made in Unity and it’s an endless runner (like we don’t have enough of those already). Here’s a screenshot of it:skjermbilde-2016-09-07-00-25-19As you play you must go through an endless obstacle course, dodging the traps and reach the end. Once you reach the end, the camera pulls back and puts you back at the beginning for you to go again. The levels are also randomly generated and full of colors, with some powerups to pick up as well.

 

Stylistic experiments & change of workflow (eventually)

For the past week I’ve almost not spent any time in Unity, but GG Maker instead. Maybe it was nostalgia, or maybe it was a desire to try something new. Probably nostalgia. Either way, I downloaded and installed it Wednesday last week and have been using it for a few hours almost every day since then. This does not mean that the desert island project is cancelled or put on hold, it’s still alive. It’s just not been my focus for a few days.

However, after using GG Maker for a week, I’ve decided to split my workflow in two; Unity for smaller, more focused prototypes and using GG Maker for creating more adventure games within the same lore-universe as the desert island game. I still plan to finish it before making the final switch,  as cancelling it at this point would just be stupid considering how much time I’ve spent on it. The reason for this change is that GG Maker allows for much faster iteration for RPG’s with more or less all the systems already in place for creating branching dialogue, proper inventory management and lots of flexibility. Instead of rewriting the code I’ve made for the desert island game to work with other games in the future, I’ll use Unity for more experimental projects.

One week in the making

isometricTownIf you follow me on Twitter you may have already heard about this project. I decided to challenge myself with the style of this game by using the NES color palette, and only those colors. It has proven a bit harder than anticipated, but also a lot of fun. The project I’ve been working on has been a isometric adventure game with more focus on the dialogue and level design, encouraging the player to take different choices to reach various goals. It also uses voxels for the various objects throughout the scene, like those trees, except for the characters which are flat 2D sprites. It certainly gives the game a unique look. Below is a test scene inspired by the desert island game.

isometric

That’s all for this week, ya’ll know you’ll get a new post next week.