psychicsoftware
May 9, 2017
sam
Godkin, Techie
Leave a comment

Faking Shadows and Lights in a 2D ‘isometric’ Game

May 9, 2017
sam
Godkin, Techie
Leave a comment

For the past few months, I have been working on Godkin, a pixel-art online co-op combat RPG. This is a collaboration between Psychic Software and Goblin Portal (our second collaboration, in fact, following up on last year’s release Goblins & Grottos).

Godkin takes a “faked 3D” view (this style is often referred to as isometric, although actually we’re not adhering correctly to the strict viewpoint that would make the game isometric.) Getting the lighting and shadows looking good in this style is somewhat challenging, since there’s no real 3D geometry for the game engine to work with. I’m having a lot of fun programming this game in Unity (it’s my first Unity game) and figured a blog post about shadows and lights was in order!

At the core of my shadowing system are the FakeShadowCaster and LightAnimator components.

LightAnimator

A LightAnimator component is attached to any objects that have lights – camp fires, torches, explosions, etc. These search for nearby objects which have FakeShadowCaster components, and register with them. They also notify the FakeShadowCaster objects whenever changes happen (e.g. the light moving, flickering, brightening, dimming, turning off).

FakeShadowCaster

A FakeShadowCaster component is attached to any objects that we need to cast shadows – basically, anything that should appear to have some 3D ‘height’ – characters, monsters, rocks, trees. This component maintains a list of nearby light sources, and creates a fake shadow sprite to associate with each of them. Whenever a light notifies a change, or if the FakeShadowCaster itself moves, its list of shadows are re-calculated. Each shadow is rotated to face away from the associated light source, and its opacity is set based on distance from the light (plus other variables). I also wrote a ‘shadow skew’ shader which spreads apart the vertices of the shadow sprite which are further away fromTree Shadow the light source – with a stronger effect the closer it is to the light; this adds quite well to the overall feeling of 3D. Another nice touch is that we can use whatever sprites we like for the shadows – so trees, for example, can have their shape baked into their file.

‘3D’ Object Shader

The standard Unity sprite shaders look great for terrain, and sprites which don’t have much ‘height’ – however, since the amount that each of their pixels is lit is simply based on the distance they are from light sources, this starts to look strange for objects that are supposed to be tall. The problem is that the top pixels and bottom pixels of the object will be at quite a different distance from the light – but to look like a proper object with height, the vertical position of all pixels should be considered the same, for lighting purposes. So here we have a shader that attentuates light to all pixels based on the position of the vertically lowest ones. This shader also reduces the brightness of any object which is in front of lights (since in this case the majority of the light should be cast on the non-visible ‘back’ of the objects).

If you’d like to follow the progress of Godkin’s development, here’s our blog. Or why not join us for a chat in Discord?

July 11, 2016
sam
Goblins & Grottos, Rock Paper Shotgun
Leave a comment

Goblins & Grottos – launch day lessons

July 11, 2016
sam
Goblins & Grottos, Rock Paper Shotgun
Leave a comment

We launched Goblins & Grottos on Steam last Thursday. The next couple of days were pretty hectic, as expected, and involved some late nights and early mornings. But overall we’re pleased with how things went and how the game has been received. I wanted to capture here some of the highlights and lessons learned, as these may be useful to other developers.

 

Reddit AMA

We ran a launch-day AMA (‘Ask Me Anything’) thread on reddit which went really well, and I’d recommend this approach to anyone releasing a game. I was very impressed by the very varied and thoughtful questions posed by the /r/pcgaming subreddit community, and we received a nice amount of traffic to our Steam page from this. Our thread sat high up on the first page of the subreddit for the full 24 hour period that it was live, and undoubtedly contributed to the ‘legitimacy’ of our game. In the longer term, it serves as an excellent repository of information nuggets about us and the game – I noticed that the RPS article, for example, used it as a source of info.

 

Local Game Dev Community = Awesome

We received an awesome amount of support from the Galway Game Development community, and also from some of the wider Irish community. My good friends from Galway rallied round, posting and tweeting about the game over the launch period. If you don’t have a local community of mutually supportive game developers, then you’re missing out. In Galway, our community has built up from pretty much nothing to a situation where 10+ studios are actively developing games, running events, meeting socially, and generally helping each other out. If you don’t have a community like this, then make one; that’s what we did.

 

Youtubers

We received enquiries about the game from two very large youtubers. They haven’t yet confirmed whether they will be covering us, but communication lines are open, which is half the battle.

 

Rock Paper Shotgun

We got a nice mention in Rock Paper Shotgun. This lead to a substantial spike in traffic to our page, and was followed 20 minutes later by one of the two youtuber contacts mentioned above. I’m not sure whether RPS noticed us directly on Steam, or whether they saw our press release or tweets that we had tagged them in; possibly all of these. As mentioned above, they made use of information from the Reddit thread, and may indeed have been influenced by it to cover us at all.

 

Mistakes

Someone with my amount of experience at game dev should have known better, but despite ourselves we made some small (insignificant, we thought) tweaks to the game in the last couple of days before launch. One of these (removing the ‘black movie bars’ from the top/bottom of the screen during cutscenes on smaller screens) lead to a game breaking bug which I ended up troubleshooting in the middle of the night.

Another mistake was not getting really detailed with the testing of game controls. We had assumed that the early access players (or ourselves) would notice/report unintuitive things, but actually they didn’t. I suppose the lesson is that early access players are fans who expect glitches and don’t necessarily report them, so you can’t expect to treat early access as a rigorous playtesting process, even if hundreds of players are involved. When you have left early access, your userbase switches to being the general public, and if anything doesn’t work exactly how they expect it, their assumption is that the game is ‘broken’ – and they may well give a scathing/damaging review on that basis. Again, this lead to some middle-of-the-night coding

 

Here’s our launch trailer, which was unveiled at the time of launch:

May 27, 2016
sam
Goblins & Grottos
Leave a comment

Goblins & Grottos Nears Full Release

May 27, 2016
sam
Goblins & Grottos
Leave a comment

It has been a while since my last update on Goblins & Grottos. In the last 2 months we have taken on a new team member, Logan – who will be taking over the bulk of our marketing and promotion activities. It’s critical that each role in the development and release of the game is headed up by a ‘champion’ who has commitment and ownership for it. Marketing was an area that we needed someone extra in, to fill that role. Logan has fitted into the team really well and I’m sure he’ll add great value to our publicity!

There have been lots of cool things added since my last post here. The four ‘regions’ are now complete (dungeon, forest, village, mountain/castle) along with appropriate decorations, interactive items, environmental effects and traps. The main bulk of the game’s development is now complete. We have held back some new features to announce on full release, including a fully configurable boss battle editor for final showdowns with the Paladin, as well as a neat minecart system for Indiana-Jones type shenanigans. Apart from this, I have been doing lots of tweaking and clearing up of bugs, and polishing of the user interface and map-making tools… all the glamorous stuff us programmers get up to, y’know. The game’s Official campaign is nearly complete.. kudos to the fantastic creativity of Jonas and Bjorn, who take the map elements I provide and twist and combine them in all sorts of fun ways.

Ian, Bjorn and Jonas have also been making a really slick cinematic trailer which will be unveiled on full release day.. I’m really excited about that!

April 14, 2016
sam
Game Musings
Leave a comment

My first published game – Space Trader [1984]

April 14, 2016
sam
Game Musings
Leave a comment

I first started programming in the early 1980s – my motivation being that I wanted computer games to play and this was the best way to get them (not being able to afford commercial games, and in any case many of them were not very good).

I used to make lots of BBC Micro games, and sent some to Personal Computer World magazine for publication. In 1984 I had a game listing published (this is how it worked back then.. and actually typing in the code was a great way to learn). This was my first publication and first earnings from computer game development, and has really shaped my whole academic career too.

Previous Page
Next Page

Newsletter

Join Email Newsletter

 
We take your privacy seriously and will never give your details to anyone else.

Presskit

Press Kit here

Games in Development

  • The Necromancer's Tale
  • Newby Chinese

Games Released

  • Darkwind: War on Wheels
  • Let's Break Stuff!
  • Musclecar Online
  • Goblins & Gottos
  • Orbs.it
  • Mars Defender
  • Demon Pit
  • Afterburn 2150
  • Block Rockin'
  • More on Gooogle Play
  • More on iOS Appstore

Unfinished Projects “On Hiatus”

  • Zed's Dead
  • Ping Pong Planets
  • Godkin

Archives

  • May 2026
  • January 2026
  • October 2025
  • March 2025
  • August 2024
  • December 2023
  • June 2022
  • April 2022
  • May 2021
  • December 2020
  • November 2020
  • October 2020
  • August 2020
  • May 2020
  • March 2020
  • October 2019
  • October 2018
  • August 2018
  • July 2018
  • January 2018
  • September 2017
  • August 2017
  • May 2017
  • July 2016
  • May 2016
  • April 2016
  • December 2015
  • November 2015
  • September 2015
  • July 2015
  • May 2015
  • April 2015
  • February 2015
  • January 2015
  • December 2014
  • October 2014
  • August 2014
  • January 2014
  • December 2013
  • September 2013
  • July 2013
  • May 2013
  • April 2013
  • March 2013
  • December 2012
  • October 2012
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • March 2006
  • February 2006
  • January 2006
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • December 1995

Categories

  • Afterburn 2150
  • Block Rockin'
  • Conferences & Events
  • Darkwind
  • Dead By Dawn
  • Demon Pit
  • Game Musings
  • Goblins & Grottos
  • Godkin
  • Guest Posts
  • Let's Break Stuff!
  • Mars Defender
  • Monster Melee
  • Musclecar Online
  • Newby Chinese
  • Orbs.it
  • PC Gamer
  • Rock Paper Shotgun
  • Techie
  • The Necromancer
  • Uncategorized
  • Zed's Dead

CyberChimps WordPress Themes

PSYCHICSOFTWARE | Psychic Games Ltd.
Sam Redfern indie games developer and university academic