Author Topic: "The Count's Islet" in Unity [Success]  (Read 9977 times)

Aril

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
"The Count's Islet" in Unity [Success]
« on: March 08, 2016, 06:26:21 PM »
Edit: 7 Day version is uploaded:
Quote
With 12 hours to go I am going to consider myself finished with the challenge. Here is my game in WebGL. I changed the name because there is no way I'm going to make an actual islet, lol.

Let's create a video game. I'm going to log my progress in this thread to force myself to actually finish this thing. I started late, around 15:00 CET March 8th. I'm going to try to finish by the 12th, but if I don't I can keep going with a clean conscience until the 15th.

I don't know how this game will work, honestly. My assets are in pixel art and resemble a mansion, so I stole the name from a 1996 Swedish children's christmas show. I am working with Unity (2D) in C#.


Day 1

I am currently working on level generation. This will probably take a lot of time because I want the levels to somehow feel like an actual mansion, and I've never developed anything procedural before, and designing levels manually felt like cheating. I have never done any pixel art-games before either, which lead me to my first issue, tiles being off by 1 pixel:



My sprites are from a gigantic spritesheet composed of 16x16 tiles. I searched for a solution and found a lot of threads pointing me towards scaling the ortographic size of the camera with the screen height and pixels per unit. This did not solve the issue, although it was definitely a necessary fix. The thread that solved my problem was this guide from reddit. I had to move the x-position of my camera by a very small number, like 0.0001. This fixed it, and I really don't understand why.

My current level generation, after working with the project continously for about 2.5 hours, looks like this:


The lack of outline on the lower walls is intended, I want the final building to look like this. This image, and the assets, are made by Kenney Vleugels from Kenney.nl.

My next task is to connect the rooms, both by applying logic to where they are created, removing redundant walls, and adding entrances at different positions.
« Last Edit: March 22, 2016, 08:22:41 PM by Aril »

Aril

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Re: "The Count's Islet" in Unity
« Reply #1 on: March 08, 2016, 09:25:13 PM »


Generated mansions are starting to look good. I think the easiest way of connecting a lot of rooms consistently is to force the exit to not be on the same wall as the entrance (which I think might be a necessity), and on the opposite wall only if the room is rectangular with the remaining two walls being the longest ones. This example screenshot shows entrances on the right and top side of rooms only. This particular case is random, but it made me think that an easy way of creating long masions without any risk of creating a big cluster would be to force this behaviour. Still a lot of stuff to be done.

Aril

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Re: "The Count's Islet" in Unity
« Reply #2 on: March 09, 2016, 05:33:46 PM »
Day 2


Example randomly generated floor. Brown rooms indicate the main path from start to finish. These rooms cannot be obstructed, because this would prevent progress. Grey rooms are extra rooms, most likely dead-ends with more freedom during generation. The floor colours will not indicate this in the final game, though.


There are still some issues with the wall tile edges. This is due to the tile map registering walls that have been deleted because of obstruction. This calls for a code refactor, as the tile map is being changed all over the place.
« Last Edit: March 09, 2016, 05:38:03 PM by Aril »

Aril

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Re: "The Count's Islet" in Unity
« Reply #3 on: March 09, 2016, 10:26:42 PM »

Wall sprites are now connecting properly.


Added a quick shadowing effect on tiles based on distance from player. Will have to consider the performance of this implementation. The idea is that tiles you have previously been close to (not necessarily on top of) are 10% visible, whereas undiscovered areas are completely darkened. Closer tiles are, as shown in the screenshot, gradually more visible.

Aril

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Re: "The Count's Islet" in Unity
« Reply #4 on: March 10, 2016, 05:07:01 PM »
Day 3

Added character sprites, basic grid-based movement and wall collisions.

You move continously by holding the button down. I want to make the game turn based, with enemies taking turns inbetween your actions, but with semi-fluid movement, like in the gif. Right now I'm checking for collisions with a wall by raycasting towards the desired tile before moving to it.


I also made the characters random. There was no other way.
« Last Edit: March 10, 2016, 05:08:34 PM by Aril »

Aril

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Re: "The Count's Islet" in Unity
« Reply #5 on: March 10, 2016, 09:29:48 PM »
Implemented two types of enemies, the Orc and the Knight. They follow you around a bit.


A simple combat system is in place. Enemies can attack you back on their turn, but the player can't die yet.


Doors are functional now. They disable the collider on the wall tile they are attached to. This means its possible to traverse the level from start to finish. Some doors point to the outside which is a tad problematic, the level generation isn't completely finished yet.


I'm considering some kind of indication of taking damage. I want to avoid animation, so an alternative is to add a smaller sprite on top of the character being attacked for half a second or something. Something involving the equipped weapon of the character, maybe?
« Last Edit: March 10, 2016, 09:36:30 PM by Aril »

Aril

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Re: "The Count's Islet" in Unity
« Reply #6 on: March 13, 2016, 02:47:59 PM »
Progress after Day 4 and 5:
http://gfycat.com/MinorInbornCoelacanth

I didn't get to work on the game that much the last 2 days, so I haven't been able to "finish" in 5 days like I planned. Still, the game is playable. In addition to what is shown in the video, there is also an inventory system in place, which determines the players stats, but it's not showing. The biggest challenge is balancing the stats and quantity of enemies throughout the game.
« Last Edit: March 14, 2016, 11:48:21 AM by Aril »

Aril

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Re: "The Count's Islet" in Unity
« Reply #7 on: March 14, 2016, 11:47:56 AM »
Day 6

Interfaces for inventory, stats, health and experience are complete.
Items are dropped from enemies. I want to add some name generators for them, but it's not the top priority right now.
Here's some screenshots from the end of day 6:





Aril

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Re: "The Count's Islet" in Unity
« Reply #8 on: March 15, 2016, 12:50:51 AM »
With 12 hours to go I am going to consider myself finished with the challenge. Here is my game in WebGL. I changed the name because there is no way I'm going to make an actual islet, lol.

There's still plenty of stuff I want to improve: Items should have a unique apperance, the walls aren't too pretty, I want different floors to have different themes and I want to add some items to the rooms, like chairs, bookcases, etc. I'm also going to experiment with movement and attack animations.