A quick one this time. A check for impassable tiles around a location and a collection of shields around the highlighted area shows which directions the player is protected from. Also, created a new player sprite with orientation changes. Added an animator to it which updates based on the orientation to the next tile to improve the sense of movement.
An Evening of Code: Depth Sorting
Whew... This one took way longer than expected. I'm using the 2D Toolkit Unity plugin to handle the tile map with a Unity 2D Sprite for the player character. Arguably overkill for what I need at the moment but I already had the plugin and it let me get up and running really quickly. Whilst it wasn't supported out of the gate I figured that it wouldn't been too difficult to add. Get the z-coords of the current tile and stand the player on it. Done.
Nope, fortunately this had already come up in the forums. That put me on the right track (Transparent Cutout shader on the Sprite - I started writing my own but spotted the Unity Unlit/Transparent Cutout shader before I got too far and it seems to work fine). Modifying the code shown in the forum post and then reviewing the updated scene whilst the game was running showed me how the offsets worked for both tiles and chunks. After some tweakery it was close but not quite right. Eventually, I realised that each chunk was offset by 0.0001 on the z-axis. Just removing that value fixed the problem without causing any issues (I could have accounted for it and if I see a problem in the future I might).
An Evening of Code: Pathfinding
Added A* based path finding to the isometric project. Still needs a little tweaking as there's a couple of places where the scoring doesn't appear to give the most obvious answer. Added a Debug line to visualise the path. Added the rocks on a separate layer for foreground objects to provide the collisions.
Would be nice to correct the z-ordering on the player character relative to the map next.
An Evening of Code: The Eye
Updated the deck layout to be a little more complicated. Added additional buttons for all the existing Components. Plus a new one which animates when it's connected (I'll correct that initial animating state later). Behind the scenes, I've re-written a lot of the code to make it tidier and fix some issues. You now need to solder a component into place before it becomes active. Before it was active as soon as it snapped into place. Some general cleaning and tidy up to simplify adding to this
An Evening of Code: Security
Added the concept of a security check. Components can have different properties, such as 'broken', or 'secure'. The game can check for those as the player adds and removes them. Also added a little bit of UI to make it possible to spawn prefabs and a quick collision on the burn box to destroy them.
An Evening of Code: Isometric
A quick isometric map with (very) basic path finding. Made in Unity with 2D Toolkit. Threw in some quick art. The player can click on an area on the map and the character will 'walk' there. Movement can happen in 8 directions by crossing tiles on the diagonals. The magenta line is a debug line to show where the tile is being checked for.
All graphics were drawn using Piskel.
An Evening of Code: Smoke and Sliders
Spent a couple of hours adding a little smoke animation (a few frames added to the sprite sheet then animated) when you solder a component. Also added checks for broken components. The slider is a temporary visual indicator that the functional state of the hardware has changed. Had a little problem with the sprite animator generating a load of errors after destroying the smoke object (an event on the animator firing a function to the Smoke GameObject). Turned out the animation was set to loop so just unchecking the box fixed the problem.
The rain is a particle system with a pixel style texture applied.
An Evening of Code: Cyberpunk
Building from this.
Not sure if I'll take this further. Basic concept is that you fix people's machines and upgrade them so they can run missions (think The Finn upgrading Case's Ono-Sendai). I have a vague idea for an overarching storyline but I'm not sure if the underlying mechanics are fun enough to carry it. There seems to be scope to balance quality of work with the cost the customer is willing to pay versus your reputation. It could be at the point where I need to close out a few more mechanics to know for sure. It could be that a lack of immediate feedback means it's not matching the expectations I have in my head. If I find the inspiration to go back and hook in a few more systems I'll post a playable version up for feedback.
In terms of implementation, you can drag and drop the different pieces around and they snap into place correctly. You can click on the blobs of solder to remove, or add, them back. If a piece is soldered it can't be removed. The biggest issue I have with this is trying to reconcile the high-tech with the simple components. I can conceive of more complicated innards but then I can't imagine anyway of making it fun. For now I want to keep things simple and recognisable. Alternatively, I could re-purpose the basic mechanics into a more abstract puzzle system and have you as the hacker breaking into systems. That sounds more interesting but I'm willing to spend a little more time with what I have, just to flesh it out a little more, since I can take a lot of it into this other idea.
An Evening of Code: Platforming 2
Updated the platform generation implementation to more reliably generate interesting patterns. Nothing too fancy, just a set of layouts which can be picked consistently. Redid some of the character physics to improve collisions. Added some pick-ups to add a little interest. Also, had a play with Unity's animation system so that the player character goes into an idle animation when they stop.
An Evening of Pixel Art: Cyberpunk
Just messing around with another prototype for a game. Nothing playable yet but I have a few ideas jotted down. I'll try and get something playable this week to determine if the base mechanics will be fun. I'm no artist but pixel art is often forgiving if symmetry is maintained. It also serves the game where realistically I'd have to implement an incredibly complex device that wouldn't be fun. With simplified graphics it requires less work to define . I kind of like the base colour scheme but I'll probably do another pass on it to better serve the mood of the setting if I decide to get more serious with it.
I've been watching a lot of YouTube videos about electronics recently and that's definitely feeding into my ideas for this. I've also always been a fan of Cyberpunk which definitely feeds into the look (those purple hues seem ubiquitous). In terms of laying out the screen, there're two perspectives similar to Papers Please. Having a front on view for the background and top down for the playable area simplifies the control scheme and the burden on the user significantly. I only spent a few minutes with the UI in the same perspective before dismissing it as unworkable. Aside from the complexity there's a lot of wasted space setting up that view in a meaningful way and it doesn't serve the game.
This is a drag and drop into Unity but no logic attached. Whilst it's usually better to get something working, sometimes having some (admittedly crappy) art assets is nice to start. At least it means if I do decide to start adding functionality I've got some distinct parts to work with without having to drop to an editor each time.
An Evening of Code: Platforming
An infinite platformer. No special rules for the platforms except to ensure that the random numbers are always the same. Wrote it in Unity over a few hours with a few rounds of Evolve in the middle. The player sprite is from a sprite sheet Google Images popped up and I couldn't find attribution information for it.
An Evening of Code: Fishing
A simple fishing game. Graphics are just taken from a Google Image Search. Learned a little about collision detection (and particularly how to specify different collision areas). Also, matching the movement of one sprite to that of another. And moving on a sin curve as well, I guess.
An Evening of Code: Flocking
Simple flocking algorithm in Game Maker. Learned a little more about inheritance and functions within GameMaker (and some improved collision detection). The blue boids evade, the red ones move together (and convert blues into reds) and the player is green and can move and shoot freely. The reds and blues interact with each other and the player.