Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

This was a pretty nice and encouraging reading! I don't even know how I came to discover your game but I'm enjoying it quite a bit. I have the most experience with Unity, I only used Love2D once to create a "falling sand" simulation engine. Now that I barely have time because of my job I might try this again as it can be faster than using Unity and Tiled seems better than manually assembling different prefabs together. 


Are you going to do more devlogs of this game? I'm really curious about how you handle physics, entities and enemy behaviour. Is it hardcoded or some behaviour tree or state machine? I'm amazed that you made such a nice metroidvania in such little time. This gives me a lot of motivation to do gamedev again as I was having a little rough time and this really brought my hopes that I can do something pretty good with "little" if I harness my skill and have patience building my own little engine.

(+1)

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.

(+1)

I would love  technical blog!

I tried porting my Unity game to Love2D and I got the basics pretty quickly. Sadly I will have to finish my current game in Unity since porting would take too much time. I also have to figure out how Lua coroutines work (never used them) and if I can use those in a similar way to UniTask package for async programming as I have a custom physics controller in Unity based on that that is the base of my platformers. Moving 1 unit at a time and checking collision for each step sounds resource intensive but I guess that for small 2D games with little rooms that's not a problem.

Once I finish my Unity game I'll return to Love2D, I already have experience with it, I just need to have some little engine to build games with it. This blog reminded me that Tiled exists and that has already helped me a lot. I was fighting Unity editor, now I'm designing my levels and rooms in Tiled and using a custom importer to generate the prefabs. Having 5 years of Unity experience it will be hard moving to another engine, but Unity just drags me a lot and I have a lot of half baked project just because finishing them would take longer than I can afford. I hope I can finish my current game within 8 months and get back to Love2D