Giter VIP home page Giter VIP logo

laugh-little-lamb's Introduction

Laugh-Little-Lamb

Updated Unity 2022.3.17f project for the game "Laugh Little Lamb" from the Global Game Jam 2024.

This project is a "Polished" version of the Original project from the GameJam.

Some changes from the original version are:

  • Removed Paid Assets (OdinInspector)
  • Some animations have been added/or polished.
  • Scripts names and folder structure have been changed making the project cleaner.
  • Bug Fixes:
    • Pathfinding crashed under some circumstances.
    • Do/Undo system sometimes executed in the wrong order when a level had multiple enemies.

Nonetheless the main design decisions of the project have been preserved, and no mayor refactoring was done.

Core objectives

Besides the GGJ24 Theme "Make me Laugh", we also wanted to make a game that could be a "Test ground" for some features we needed to try before adding to our other main project "Legion" (https://twitter.com/PlayLegionGame). Because of that we decided to make a "Turn Based" game where multiple entities could execute "Composed Actions" in order but play their animations in "parallel" (if said animations do not share participants).

On the other hand, I personally, wanted to share an example of how some of this common programming patters could be applied to a "Real Game" instead of the common "Whiteboard examples" that people usually use on classrooms or youtube videos. Something that could have helped me when I started making games on my own 8 years ago. So if you are a beginner or a intermediate programmer this project could be of use for you. Keep in mind, this code is MY interpretation/implementation of these patterns and ideas for this especific game. You will find, bad code and bad design decisions, so take anything you see here with a grain of salt.

Design Patterns and Ideas explored

  • MVC Pattern -Clear separation between, Model, View, Controllers, reinforced with Assemplies, allowing for a faster and scalable script builds. This decoupling makes a lot easier to implement many of the following points.
  • Command Pattern
    • Every "Action" entities can perform(Walk, Rotate, Eat, TurnLightOn,TurnLightOff, etc), are encapsulated in a "Command Instance" that can "o() and Undo().
  • Command History
    • With Do(), Undo() and Redo() functionality
  • Strategy Pattern for the control of entities with the interface IPlayer. -Ai control for the Hyenas (EnemyAiController.cs), -Human control for Sheep (SheepControler.cs). -Ai control for Sheep (AutomaticSheepController.cs,). Only for editor special mode for automated level testing. Doesnt really work, still needs some new heuristic optimizations before it becomes useful, right now is just brute force.
  • Independent Animation System which allows for 3 modes:
    • None: No animation is played. (Useful for automated testing)
    • Sequencial: Every animations goes into a Queue, and start only after the previous animation ends.
    • Parallel: Every animation starts the moment it doesnt have any "dependent" animation running. Each animation instance has an array of Participants, which is used for determining dependencies.
  • 2D Pathfinding
    • Using A*, for multi destination, path finding.
  • UniTask for async programming in some places for convenience.
  • Automated Level Playtesting Work in progress
  • Unity Tilemap System:
    • Levels are designed using the Unity TilemapSystem then a TilemapController, reads the content of the Tilemap, and generates everything it needs from it, making level making really fast and easy.
  • Unity Addressables System.

laugh-little-lamb's People

Contributors

felipeishimine avatar ishimine avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.