Thanks for stopping by! I actually used Unity for 4 years or so before I eventually switched to Love2D. If you’re primarily concerned with making 2D games, I highly recommend giving it a try - Love2D’s biggest strength is it ‘gets out of your way’, unlike Unity which I felt like I was constantly wrestling with.
I think I will do more devlogs with this game. I might do a technical blog post on how my engine-code is set up for stuff like what you’ve described, but I can try to give a quick summary:
- I use my own physics and collision, but it’s really simple: The physics is just “velocity = accelerationdt + velocity” and “position = velocitydt + position” with one exception (tile collision, which I’ll explain later).
- For collision, I just use AABB and circle collision
- For tile collision, I use a technique similar to the one described in this article by the celeste devs: https://maddythorson.medium.com/celeste-and-towerfall-physics-d24bd2ae0fc5
- Basically, for the player character, when I compute their position at the end of a frame, I do it by taking their target position and incrementing towards it 1 unit at a time until I hit a “solid tile” in my tile map (at which point I call the player’s onSolidCollision callback).
For enemy behaviors:
- Most enemies just use hard-coded coroutines for their behaviors. i.e the slug boss will always do 2 slams, dash across, 1 slam, and then shoot projectiles.
- The caretaker boss has a tiny bit of behavior-related decision-making that happens based on if you’re behind or in-front of him, but he’s largely hard-coded as well.
I really think Love2D has made me like 10x more productive in gamedev over the last 3 years. Having all of my own little tools and scripts and ‘engine code’ makes it really easy to quickly spin-up games. I also run into far fewer mysterious issues - all issues that I run into are caused by (and solved by) my own code.
Also it feels way easier to re-use stuff in-between games (I remember Unity had some notion of an ‘asset package’ for code re-use between games, but for Love2D my entire ‘Engine’ directory just gets copied wholesale between projects).
I highly recommend Love2D to anyone that likes making their own little tools/engines for gamedev. If you give it a try and run into issues or have questions, feel free to reach out.