Cannon recoil!

I took some time today to add a small visual feature that I think really does a lot for the cannons. Upon firing, the canon now has “recoil” meaning the barrel of the cannon is pushed back a little bit when it shoots the cannonball.

As you can see in this update (and a little bit in the previous one), the game has gotten a big visual upgrade as well. Pretty much all the sprites have been replaced with new, custom, ones. I plan to write more on this, and share some more device screenshots, later this week!

Here’s a quick preview how the cannon recoil currently looks:

Level Editor

I spent the past 2 days building an internal tool that will help me a lot in the future. It’s a web app (build in React) that allows me to create levels via a web interface.

From the start I knew I didn’t want to hard-code the levels into the game. It wouldn’t be flexible and would require recompiling the entire app every time a level is changed. Since I’m a web developer mainly, I knew a great way to store data readable in a file is JSON. So that’s what I did, I created a levels.json file and wrote a small Unity parser to convert that JSON data into data objects in the game.

There was one downside however, that I quickly ran into. The JSON file started to get pretty large already, making it hard to read and edit for me (as a human). And I only had created 4 incomplete levels yet. With the hundreds of levels I have planned for All Ships Must Sink, this was gonna be a real issue.

So I decided to create a web-app that allows me to parse a given JSON string, manipulate it via a GUI and then on the fly generate the new JSON. Only thing I now need to do is copy the new JSON string and paste it into my Unity project.

The tool’s been made in React and is directly parsing and storing the json into the browser memory. Here’s a quick video of the tool in action.

Game Menu

It doesn’t do much yet, but I made a game menu. In the future this is the place where options and other things can be set. For now I just liked to add this feature as it wasn’t a lot of work and, for me at least, make the game feel more like a game ūüôā

I’ve been working on a lot of cool other stuff, I’ll make some time soon to write about that as well. Here’s a quick gif of the menu:

Super Early Closed Alpha Run

Yesterday I released a very early alpha version of All Ships Must Sink to a group of close friends. The game is far from anything I will eventually be. Gameplay is very linear, it lacks pretty much all features expect the very basics. I knew it would still have bugs (it did haha). It didn’t feel great to show a product that doesn’t feel finished to people and still I knew this was the right thing to do.

Because even though only a hand full of people played the game yesterday, I got a ton of great feedback already. From small UX things like “double clicking to place a turret doesn’t feel good” to deep questions about story line and level progression.

I don’t know if this is a the case for all developers but I know I get tunnel vision very easily. Having a couple of fresh eyes play the game and give me feedback is so important. It makes me realize I was wrong about certain assumptions. Which is great. Because now I can easily change them instead of continue to build on them for months and months.

I sent out a tweet today with a quick video (with bounce, I’m sorry I’m trying to be hip) showing in the current state, the slowing towers are too OP haha. Although balance is not high on the priority list at the moment, it does need some balancing to have a playable alpha. The tweet got some unexpected attention (12 favorites and 5 retweets as I’m writing this), which feels amazing! Anyway, here’s the tweet:

Quick preview video of the first alpha version on iPad. Sorry about the quality, I recorded this with my phone that was filming my iPad (yikes).

UI Overlay and Dialogs update

As the last part of the UI update I’ve done this week, I’ve updated the overlay and dialog today. These were also using placeholder beach tiles which needed to be replaced for both of those reasons. Anyway, this is gonna be a post short on text, rich on images. Here are some new screenshots.

The new overlay
The new menu
The new build menu

UI Buttons Update

Today I visually updated the UI control buttons (on the top of the screen). The ones I previously used were matching the version of the game which still had beaches. But since the beaches are gone, so are these buttons.

While I was at it, I optimized how the buttons work as well. In terms of code they now share the same class. But they are now also re-clickable and have an active¬†state. This makes it visually clear if a button is pressed / activated. I also added the option to pause the game by clicking the play¬†button again. While the game is paused, towers can’t be build but this does give you some time to think and figure out how you want to solve a wave you didn’t expect.

Again, finishing this devlog with a quick screenshot:

Turret Visual Update & Cannonballs

Today’s been mostly about turrets. I started with updating the sprites to something I hope matches the theme of the game more. The turrets are now cannons used by a person that shoot cannonballs at the ships. To keep things simple, I’ll keep calling this cannon+person combination “turret” on the devlog.

Next up was to make the turret rotate so it is facing the ship it’s shooting. I decided to let the turret continue to rotate the target it is currently focusing as long as that target is in range. So even when the turret only shoots once per 2 seconds, it will continue to rotate around its axis every frame update.

Last up was adding projectiles / cannonballs. These are actual objects that cause damage on hit. So the turret no longer damages the ship, the actual cannonball does. For now, I’ve created this cannonballs in such a way that they will always hit the target it is originally shot at. It will continue to follow¬†the target until it hits it. Visually this isn’t really noticeable because of the speed the bullet travels. I think I will change this behavior later, calculating a cannonball trajectory when shot. This allows the bullet to miss if it’s not fast enough. This will also allow the cannonball to hit a different shit it wasn’t shot at (say ship 1 is too fast but ship 2 is tailing ship 1, causing the cannonball to hit ship 2).

Anyway, enough ideas for the future. Here’s a quick video of the new turrets in action.

Level Progression

Today I worked on the level progression part of the game. Levels that are not playable yet are now locked. Clicking the level icon will not result in loading the level and a lock sprite is added on top of the level icon.

The player progression is stored already being stored on the device as well. So closing the game will not reset your progress. When you’re out of lives, you can restart the game, refilling your lives but resetting your level progression.

Here’s a screenshot of the map screen. In this screenshot I completed the first 2 levels.

Visual Map Update

Following the visual update for the level screen, the map has been updated as well. Like for the level screen, the new visual should reduce noise, creating a map that feels more calm and whole.

Story wise, ships will now attack via the rivers to hit a city / building per level. This replaces the idea of the ships sailing across the beaches to attack. In terms of story this also solves the issue of needing to have beaches on every map.

Here’s a screenshot of the how the map looks at this moment. Next up is player progression so levels that can’t be played yet will be locked.

New look for levels

All Ships Must Sink

I’ve been playing around with the looks / sprites of the levels for the past couple of days. I’ve first experimented with an isometric view, creating a “fake” 3D look by rendering the sprites with an angle and making them overlap a bit. Although this looked very cool, I quickly realized this would hinder gameplay. With an isometric view, object can be in front of (and behind) other objects, much like in a 3D space. For All Ships Must Sink, this would result into not being able to see the ships whenever you build a tower “in front” of it, eventually creating huge blind spots.

So a top down view, like I already had, turned out to be the best choice for gameplay. I wasn’t super happy with the way it looked at the moment. I thought the transition from grass to beach to water and back was too “noisy” (if that makes sense). The game now uses a different grass type tile that transitions into water and back. This creates a much more calm view.

Here’s a quick screenshot of how level one now looks. Next up on the todo is to update the map view so it will no longer use the beach type tiles either.