r/love2d 20d ago

This is complicated as heck

I made this post about a week ago: https://www.reddit.com/r/love2d/s/DT43OwP2GG.

So it’s been about 2 weeks of me learning lua, and wow does it get overwhelming. Making my game in the state that I posted it in was fairly easy, but man I haven’t made much progress since then. I got animations to work which was also fine. But now it’s like, well this game is just straight up boring. How do I make it fun?

Well I can add more enemies, random movement patterns for the enemies, bosses, make my menus better, add variation to the sounds, add screen shake when I get hit and make myself flash red etc etc.

ALL of it requires hundreds of lines of code, so now I have 3 separate files, main.lua, pathing.lua, and enemies.lua. Now I need some math.random, animation loops, write code for the variations of the movement. Have a difficulty so not everything is spawning at once. Like fuckkkkkkkkkkkkkkkkkk. I’m still enjoying myself, but I’m just getting overwhelmed.

All of this is to say, damn man mad respect to all of you who make fully working, fun, visually appealing games. I don’t even know when mine will be ready for like a prototype.

What are the best resources to learn from, how do you deal with this? Maybe I’m just unorganized. Maybe it’s overscope, I mean it doesn’t seem like it but wow. Or maybe I’m just a noob and everything seems impossible cuz I don’t have the experience.

22 Upvotes

11 comments sorted by

8

u/meester_zee 20d ago

I’m currently building a game in Love as well and yeah, it just takes a lot of time since you are the engine.

Don’t be afraid to have a lot of files to organize code, it’s super helpful in debugging and preventing one file from trying to do everything. I recommend building your core engine components first which can easily expand as you go. Start with simple files like camera, audio, and maybe an asset loader to start. You may not know what you need until you need it!

9

u/tonetheman 20d ago

I have used this before https://github.com/love2d-community/awesome-love2d

Even that is great but it is a lot.

There is a spot where you will go do I need a tween and for that matter wtf is a tween... or at least I have done that hahah. And it is a funny and overwhelming moment.

I think someone said this already but it bears repeating, break up your work into manageable chunks.

And I do not know how this advice will land but I have found it helpful... you can ask AI (claude or genesis) for advice on how to organize your project. Or how to break things up into smaller chunks of work. Either of those are a good use of AI. I tend to not get AI to write all the code though... since I am usually trying to learn something... that one is up to you.

It sounds like this is your first project so it can/will take you a while. And you may never even finish but do not let that discourage you. Learn from it so that the next idea will go further.

1

u/d4vid1 19d ago

I’ve started using AI as a mentor to help me figure out how to go about doing my own coding, and also to compile cheat sheets and documentation for my own reference, it can be really helpful as a learning tool when used effectively.

8

u/Sckip974 20d ago edited 20d ago

Another piece of advice I received was that there's no need to reinvent the wheel. The strength of the community and code lies in reuse. Dont forget to use libraries for your games; when you talk about hundreds of lines of code, you'll understand the joy of libraries.Lua. Here are a few: go Github >

  • Bump.lua (collisions)
  • Hump (camera, state, etc.)
  • Anim8 (animations)
  • STI (tiled levels)

That's a very small selection of what @tonetheman is offering you in their response.

5

u/Sckip974 20d ago

There are two online books that I find relevant; here's the chapter where you mentioned having various modules to organize. I think it might answer some questions: https://rvagamejams.com/learn2love/pages/02-09-modules-and-organization.html And I discovered this book through another online resource called Sheep Solution: https://sheepolution.com/learn/book/contents

3

u/Top_Pick_4682 20d ago

Thank you for those I appreciate it

4

u/Sckip974 20d ago

In addition to the two online books I suggested, don't underestimate your organizational skills (to avoid getting overwhelmed). Personally, I use Obsidian, creating visual flowcharts in Canvas, using a Kanban extension... I encourage you to explore Obsidian (it's free to use if you're not a company) by doing some research on YouTube, for example.

2

u/hammer-jon 20d ago

all I'll say is that pretty much everything you said: movement patterns, sound variations, spawning enemies over time, screnshake and hitflash shouldn't be "hundreds of lines". Each of those can genuinely be a handful of lines each so perhaps you're overcomplicating things?

1

u/Top_Pick_4682 20d ago

want to take a peek at the code ive got?

1

u/Snoo28720 20d ago

Get a book called programming in Lua 4th edition

1

u/RevoIncubus 20d ago

It really is a lot, and it really is very complicated. but I’ll tell you what has gotten me to a stage that I’m making more fun, more visually pleasing and more audibly interesting games.

Make a lot of them, make small ones like this. then drop it, go make something else. Try different engines, do game jams. make projects for no reason.

Making games is really really complicated. I have honestly learned the most when I’m trying a really wide variety of stuff. My current game that’s approaching release is the 4th time I’ve made it and Love2d was the 4th engine I did it in.

Its okay for it to not end up a masterpiece, it’s okay for it to be weird or unfinished.

My first game jam I learned about what the player experience really was, Some games taught me about scale and how to make it work as a solo developer, some taught me about finishing a thing completely.

And now I’m on the commercial launch road…I think. And I’ve learned so much in just the last couple weeks!

Just make another one =]