Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    9
  • comments
    8
  • views
    776

Development Tips - April 21, 2018 Weekly Update - Untouched Earth Game Development Blog

517 views

***Original blog post can be found by clicking HERE***

***Untouched Earth Website can be found by clicking HERE***

Good day everyone! If you had a chance to read my last blog post, then you’re well aware I had the opportunity to have some very kind individuals play test the game two weeks ago. In addition to discussing the game’s progress, I’d like to use this post and future blog posts to discuss the tips I’m learning as I continue implementing suggestions, fixing bugs, and creating the game.
 
Development Tips
1) Use raycasting to stop character movement instead of relying on colliders.
2) Improve performance and limit excessive calls to the garbage collector by disabling game objects instead of destroying them.
 
Game Updates
1) Improved playability and enhanced visual appeal in level one
2) Created an animation for the maya coin
3) Fixed bugs associated with bullets
4) Implemented object pooling for bullets
5) *See Picture* Created a Boar Character
6) *See Picture* Created a Goat Character
7) Updated combat mechanics to utilize triggers rather than colliders
8) Fixed bugs associated with climbing, hanging, and swinging
9) Fixed bugs associated with Poker obstacles
10) *See Video* Fixed confusion about which walls are climbable through enhanced artistic presentation
11) Fixed confusion about which objects are swingable through enhanced artistic presentation
12) *See Picture* Updated bounceable object
_____________________________________________________________________________________________
 
Tip One: Use raycasting to stop character movement instead of relying on colliders.
 
5adb8e95e08fa_Herorunningtowall(colliders).png.b5b66a6be7457d0ef3fafdc08f3eae0c.png
 
Consider the scenario above. The hero is running toward a wall with the expectation that he will stop when the two colliders meet. From what I’ve found, this method works just fine most of the time and tends to be bug free. However, I’ve also discovered that collision detection can be inconsistent, and the hero occasionally runs through thin walls. The problem is that the code allows the hero to continue moving with the expectation that the collider will stop his forward progression. While it would be possible to stop the hero from moving forward when the colliders collide, I believe the following solution produces better, bug free results.
 
5adb8ee1c67db_Herorunningtowall(raycast).png.7c64aec9999b36263c9a76acbf2e681c.png
 
CheckIfPathPassableCode.png.b8bb445c8e9465bf4af3efcf4221282a.png
 
Basically the raycast detects whether a wall is in front of the character. If it is, and if the hero is close enough to the wall, the code signals to the hero to stop updating his forward motion. This way, the hero isn’t relying on the colliders to stop his movement, but is using code to stop him in his tracks and no collision is even necessary. This solution may be more resource intensive, but I believe it is a worthwhile trade off for the benefits.
_______________________________________________________________________________
 
Tip Two: Improve performance and limit excessive calls to the garbage collector by disabling game objects instead of destroying them.
 
5adb8f079f279_Herocollectingcoins.png.7eb9177e6c1a0f8195b38d104792717d.png
 
5adb8f13c8968_CollectingCoinCode.png.12442760b5caae24c2d954a5d4b66e02.png
 
In the scenario above, the hero is climbing up a wall and is about to pick up coins. If each coin is destroyed when it is collected, it won’t take long before the garbage collector activates to get rid of all the excess, destroyed objects. Considering that a level might have 200-300 coins in it, then the number of destroyed game objects quickly adds up. Rather than destroying each coin when it is collected, simply setting it inactive when the hero picks it up prevents the garbage collector from running as often. The code above is a portion of the coin script, and shows how this solution is implemented. I believe it results in less calls to the garbage collector.
___________________________________________________________________________________
 
Update Pictures & Videos
 
image.png.afa5de511ecd559288d21c840e49c279.png
Original character was purchased in the asset store and updated by me. Thank you Mimu studios!
 
image.png.3bec506b5eeb3c849d80e9d1d80a5cd3.png
Original character was purchased in the asset store and updated by me. Thank you Mimu studios!
 
image.png.a452df867d60cd5f419c30e4c2abbd45.png
Updated Bounceable Obstacle
 
_________________________________________________________________________________________
 
As always, thank you for reading. I would love to hear from you and would love to hear any comments or ideas you have. Feel free to leave a comment or email me at watermoongames@gmail.com.

***Original blog post can be found by clicking HERE***

***Untouched Earth Website can be found by clicking HERE***

________________________________________________________________________________________



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
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!