Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    13
  • comments
    11
  • views
    1439

March 24, 2018 Weekly Update - Untouched Earth Game Development Blog

WaterMoon

606 views

A lot of exciting updates this week! I spent a good amount of time updating the enemies and creating new challenges for the hero to deal with in the game world. I also fixed a few bugs that were causing some minor annoyances and affecting game play.
 
***This blog post is copied from a post on the game's website. The original post can be found here***
 
Update 1: Added a slider cable
I added a new element to the game that allows the hero to grab hold of a "sliderCable" object in the form of a vine or rope and use it to slide down a longer vine. The mechanic threw a few curve balls at me, but overall didn't take more than about an hour to develop. It still has a few kinks to work out, but is functional and fun. The main challenge was getting the hero to stop abruptly when he reached the end of the vine. As you see from the video below, he was overshooting the vine and falling off the map.
 
 
The mechanic is pretty simple. The long vine has a trigger collider at the end of it called a "stopPoint." When the stopPoint triggered by the hero, it activates all of the RigidBody2D constraints on the sliderCable to instantly stop the sliderCable and hero. Needless to say, it wasn't working that way. The sliderCable was using a SliderJoint2D, so I spent some time researching complications associated with the joint. It turns out the problem was with my code. When the hero initially grabs the sliderCable, the sliderCable code turns off the RigidBody2D constraints in order to allow the SliderJoint2D to take over. This is where the problem developed. The hero was being separated from the sliderCable as it was sliding and then touching it again when it stopped abruptly. By touching it again, the RigidBody2D constraints on the sliderCable were turned off by the code right after they were turned on by stopPoint code. After changing a few lines of code around, it worked great! It's a really fun game mechanic, just has a few more bugs to fix.
_________________________________________________________________________________________
 
Update 2: Made enemies turn red when hit
I wanted to make it more exciting and noticeable when the character strikes an enemy, so I decided to turn the enemy characters red when they get hit by the hero. I thought it would be as simple as adding a coroutine that turned the enemy red, waits a few seconds, and then turns him back to his original color. Turns out it wasn't that simple. Since the character uses bone based animation (meaning tons of little sprites make up the character), I had to load the enemy's original colors into an array in the Start() method and then copy them back at the end of the coroutine. Success!
 
 
file.png
 
The "ren" variable is a reference to an array that holds each sprite's SpriteRenderer component. The "color' variable is a reference to an array that holds the original color of each sprite. I copied the original colors in the Start() method.
_________________________________________________________________________________________
 
Update 3: Added new enemy characters
I created two new enemy characters. They're fantastic! They are both based on the "explorer" enemy - Thank you HQ game assets for making great assets! - I had to do a little creative artwork to make them look unique, and I must say they look great. One of them is a tiny little guy that moves fast, jumps, and evades the hero's attacks. The other is a big, slow enemy that has a powerful attack and doesn't move when hit by the hero. Super exciting!
 
file.png
 
file.png
 
_________________________________________________________________________________________
 
Update 4: Fixed wall jumping bug
There was a very annoying little bug that allowed the hero to jump up any 90 degree wall he wanted to. The bug was definitely exploited by some of my testing team (wife). I wasn't quite sure how to fix it at first, and ultimately had to add some new code to the CanJump() method of the hero's Detection Manager. It turns out the character's detection points were determining that he was eligible to run and jump whenever he was colliding with a wall, regardless of whether he was colliding with the wall while suspended in midair or not. 
 
 
Needless to say this isn't the behavior I was going for. I ended up creating a few conditions that dictate when the hero is able to jump. Basically, he has to be touching a piece of world that has a "Movement tag" (tags for objects that the hero can run on), and, if the front detection point (fp_2) is active, then the front non static ray will check whether there is a wall in front of the hero. If there is a wall, the hero is not eligible to jump unless his fp_Main detection point is active. It works so far, but I'm wondering if another bug might pop up from this fix. I'm open to any suggestions on how to deal with this type of problem.
 
file.png
This code is from the hero's detection manager. Make sure you read the Game Mechanics section of the web page to fully understand what I mean by detection points, detection manager, fp_2 and fp_Main as they are game specific scripts and gameObjects.
_________________________________________________________________________________________
 
Update 5: Fixed standing on enemy bug
I've been having an issue where the hero lands on top of an enemy, and is then able to stay standing on top of him. This glitch allows the hero to safely ride the enemy around the map, and makes it hard to get off of the enemy when standing on his head. It was definitely taking the fear out of the fight.
 
I struggled with coming up with a good solution, but ultimately decided to make the hero bounce off enemies when he touches them. The solution was relatively simple, and involved the creation of game objects with BoxCollider2D components attached. These game objects create an outline of the enemy and each have a script attached called "BouncePoint." You can see the full script below. When the character hits one of these bounce points, he bounces off the enemy in a direction determined by the BouncePoint script. I was looking at using a physics2D material, but was having trouble getting it to work. Instead I just added a force to the hero when he collides with the collider. So far it works great!
 
file.png
 
file.png
This is the entire BouncePoint script. heroScript and enemyScript reference the scripts attached to the hero and any enemy. The bounceValue is used to determine which direction the hero should bounce in. The direction is dependent upon the direction the enemy is facing.
 
_________________________________________________________________________________________
Any thoughts on how to improve some of these mechanics are welcome! Any questions are also welcome! feel free to comment or contact me at watermoongames@gmail.com. 
 
***This blog post is copied from a post on the game's website. The original post can be found here***
_________________________________________________________________________________________
 

image.png



1 Comment


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By Jamesgz
      Hey my dudes,
      Me and 4 friends are third year compsci students. Three of us are pretty good at drawing. We are hoping to make a 2d roguelite game with unity during the next few months. We are still brainstorming. At the moment, my idea is to create a card roguelite game:
      First, you would need to choose 2 heroes to enter the dungeon with the goal of finding a treasure. The treasure found gives you extra bonus in later runs. You can choose between mage, gunner, rogue, paladin, warrior and fighter. Each hero has their own unique cards. And there are common cards that every heroes can get(like hearthstone).
      The progression system would be like slay the spire’s. You can choose your own path, but every paths leads to the boss. It would use procedural generation. After defeating an enemy, you get to choose a new card out of the three options. There would be shops, random events, elite enemies, etc
      The combat system is where i need some suggestions on. There would be two piles of deck. One for each hero. I can think of two good combat systems:
      1. Before every enemy encounters, you can choose what cards to use from your deck. Cards not used would not get discarded. Cards are drawn from the deck only if they break or due to special card’s effect. Every card have a durability number. Ones the durability reach zero, the card would break and can no longer be used. Events/enemies can modify the durability of the cards.
      2. Card not used this turn would get discarded. Once the deck is empty, the discard pile gets shuffled and copied to the deck. Card/item effects can increase the number of cards you draw.
      How can I make the game more interesting? Any suggestions would be appreciated.
    • By therax1986
      Hi everyone. For the last few months I’ve been working on a simple HTML5 2D side scrolling action game called Theraxius. It's nothing new and revolutionary, it's more like an evolution of different technology (combination of HTML5, PHP, MySQL). The game also includes a level editor so you can create your own levels. The game and the level editor is written almost completely in JavaScript, no download is required. Just load and play. Here are a few screenshots and the link to the page.
      In the next weeks I’ll try to post some videos, try to add registration (for newsletter and later for public test).
      Release date: when it's done
      theraxius.com



    • By horror_man
      Hello, I'm currently searching for a talented and passionate programmer to create a small but great horror game that would take around 3 months to be done.
       
      About the game: The game would be a sci-fi/post-apocalyptic survival horror 3D game with FPS (First person shooter) mechanics and an original setting and story based in a book (which I'm writing) scene, where a group of prisoners are left behind in an abandoned underground facility. It would play similar to Dead Space combined with Penumbra and SCP: Secret Laboratory, with the option of playing solo or multiplayer.
       
      Engine that'd be used to create the game: Unity
       
      About me: I'm a music composer with 4 years of experience and I'm fairly new in this game development world, and I'm currently leading the team that'd be creating this beautiful and horrifying game. I decided that making the book which I'm writing into a game would be really cool, and I got more motivated about doing so some time ago when I got a bunch of expensive Unity assets for a very low price. However, I researched about how to do things right in game development so I reduced the scope of it as much as I could so that's why this game is really based in a scene of the book and not the entire thing (and also that's why it would take 3 months). Also I'm currently learning how to use Unity and how to model things with Blender.
       
      Our team right now consists of: Me (Game Designer, Creator, Music Composer, Writer), 3 3D Modelers, 1 Sound Effect Designer, 1 Concept Artist and 1 Programmer.
       
      Who am I looking for:
      - A programmer that's experienced in C# and with Unity.
       
      Right now the game is very early in its development (GDD is completed and all 3D Items, Music and Sound Effects are completed).
       
      If you are interested in joining, contributing or have questions about the project then let's talk. You can message me in Discord: world_creator#9524
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!