Top Down 2D Game Framework by ColonelPanicks - 1

Games & ProjectsFrameworks

Attempting to create the basics of a top down 2D game to be used for creating an actual game with some substance

Unity 2019.3.13f1Unknown LicenseUpdated 136 days agoCreated on April 9th, 2020
Go to source

Top Down 2D Game Framework

This repository contains progress on creating a framework for a top down 2D game.

Features

Currently, this is just a brain dump of all the features/things I want to have working in here before actually trying to develop something with substance.

Thoughts/Things to Change

Note: These things could be bugs or issues that are tracked via GitHub but it’s quicker and easier to manage them through here for now. Things will be deleted when no longer relevant/recent.

  • The decorations layer of tilemaps does not interact properly with the layering (as this is determined from y axis location, which is shared for the tilemap). Find a way of fixing the depth with tilemaps or just concede that decorations that require proper depth (like torches) will need to be separate prefabs (makes sense as torches will most likely have some independent lighting functionality going forwards)
  • ~The camera movement currently uses the bounds of a large Box Collider on the world, this feels clunky and leads to phantom collisions as anything inside the box is technically colliding with it. Change this to something else, perhaps intelligently working out the bounds of the sprites on the edge layer?~
    • This has been addressed by utilising the collision with the map bounds collider to intelligently set which bounds the player is currently within. Allowing the player object to move between scenes and spaces whilst maintaining proper camera tracking functionality.
  • ~Instead of manually setting the position to move players to for building/scene transitions, instead store some sort of global variable that has the “last used” door/movement location. This objects co-ordinates can then be used for spawning the player back to the original point.~
    • Seems somewhat pointless as co-ordinates are only needed for scene transitions, local transitions use the center of the box collider.
  • ~Due to the starting scene having a player in it, there’s a duplication glitch when returning to the original map. This can be addressed by (after adding some sort of global controller above) having some check for an existing player and spawning in if not present (this should spawn a player on first load of the game and then never again as we simply move the game object around).~
    • This has been addressed by adding the GameManager persistent object that checks for an existing player and spawns one if one is not present.

Credit

Assets

Character:

World Assets:

Fonts:

Tutorials/Assistance

This wouldn’t have been possible for me to learn without the help of the incredible tutorial series by CouchFerret, available here.

Also, big thanks to DuckDuckGo and the general existence of the Internet.

Show all projects by ColonelPanicks