Hi new here, Love 2d looks nice!

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
jbskaggs
Prole
Posts: 17
Joined: Sat Dec 12, 2020 4:20 pm

Hi new here, Love 2d looks nice!

Post by jbskaggs »

Im a 51 yo man- I have created a ton of games in the past two decades. Gamemaker, Python, VB6, Basic, Gambas, Panda3d, and Godot.

A year ago I was stricken with serious health problems, cancer, sepsis, etc and suffered terrible memory loss and developed difficulty learning new things. Here recently memory has started coming back and I remembered all the roadblocks I I hit with Gamemaker and Godot. Gamemaker I kept finding bugs in the GML, I havent used drg and drop since 2010 or so and the fact they wanted $1500 to export beyond desktop. Godot Gui is very alien to how I have programmed. I mean its a cool program and Python is nice since I know Python. But being reliant on the Gui breaks my learning writing stage.

So I stumbled across Defold and tried it- loved the language but the again the gui bothers me. When lead me to Love2d which thankfully doesnt have a gui.

I mean I enjoy a good level builder, or tilemap editor, visual layout is nice. But the way these are implemented in many game engines there is 4 to 10 steps via a gui system. That could all be done with handful of code.

Unfortunately for me this means almost starting over and hoping chemo and other drugs will allow me to develop. I need to be able to produce tiny 2d fun games I can sell to make a little side money and also to be able to have a good time while Im stuck in this state.

So thank you guys for this engine and this forum. Maybe a fat old man will be successful with it. If you have any suggestions to help speed up learning process or any known pitfalls Im all ears.
User avatar
Felix_Maxwell
Prole
Posts: 24
Joined: Wed Dec 04, 2019 3:15 pm

Re: Hi new here, Love 2d looks nice!

Post by Felix_Maxwell »

If you have a decent amount of programming experience, which it sounds like you do, I very highly recommend this tutorial series by recursor. It's long, like 42 hours or something. He builds a really nice ECS system up from nothing and explains everything extremely well, sometimes does some accents. In the fourth episode, he builds up the standard Lua class module from scratch and explains every line (inheritance doesn't exist natively in Lua, you implement/create your own class functionality). Note that there's an episode 4b where he fixes a small bug created in the class module in episode 4. Sometimes if I'm feeling a little tired, I'll just put on an episode and just let it wash over me before I start it over and code along. Or even watch it twice before I start. Sometimes even watch a couple in a row before I back up and start writing the code, and the code for the end of every episode is linked at the bottom of the video, including the last video in the series.

You can tell I'm a fan. Sorry to hear about your health troubles but glad you're feeling a bit better. Love can do whatever you want it to do, by hand or with libraries mixed in. The series I linked could be a good way to lay down a foundation, and maybe help keep your mind elsewhere when you're not feeling well. It's a step-by-step creation of a really solid/efficient/flexible/extensible technical underbelly for a Love game.
jbskaggs
Prole
Posts: 17
Joined: Sat Dec 12, 2020 4:20 pm

Re: Hi new here, Love 2d looks nice!

Post by jbskaggs »

Thanks! Ill check it out.
jbskaggs
Prole
Posts: 17
Joined: Sat Dec 12, 2020 4:20 pm

Re: Hi new here, Love 2d looks nice!

Post by jbskaggs »

I wrote my first program in love2d- nothing big but it was a breakthru for me. Not a tutorial but my first attempt of only using api documentation.

Just a background, sprite, and sprite follows mouse. But it unlocked the process for me.

I personally have a hard time following tutorials. Though I do watch them and have seen about ten so far and I let them just steep into my mind. Then they influence me while working out tiny pieces, this seems easier for me.
User avatar
Felix_Maxwell
Prole
Posts: 24
Joined: Wed Dec 04, 2019 3:15 pm

Re: Hi new here, Love 2d looks nice!

Post by Felix_Maxwell »

Yeah, I should have also said: Definitely just do little projects/experiments to get comfy with the API and whatnot. I just suggested it because a common pitfall for Love newbies (I think) is that a little game comes together, but without too much structure for different pieces of code it turns into unchangeable, unmaintainable spaghetti-glass, but maybe your mileage will vary. Learning how to use classes in lua is one of the first steps I think, because once you have a class with a constructor you're no longer in this territory:

Code: Select all

local badguy_1 = { bunch of stuff here in this table...}
local badguy_2 = { bunch of stuff in this other table }

function love.update(dt)
	badguy_1:update(dt)
	badguy_2:update(dt)
end

You'll have a lot more flexibility with something like this:
note: in lua, if you put '#' before a table/array, it'll return it's length.

Code: Select all


local BADDIE_CLASS = require('Badguy') -- this loads Badguy.lua if it's in the same folder as main.lua

local entities = {} -- a table to hold all the entities
entities[#entities + 1] = BADDIE_CLASS() -- this creates a new bad guy, OOP style, and adds it to the end of the entities array/table

function love.update(dt)
	for i = #entities, 1, -1 do -- good to iterate backwards through entity lists, because then if you remove one during the loop it doesn't displace the entries after that
	
	    entities[i]:update(dt) -- line updates all entities
	
	end
end

Last edited by Felix_Maxwell on Sun Dec 13, 2020 6:10 pm, edited 1 time in total.
jbskaggs
Prole
Posts: 17
Joined: Sat Dec 12, 2020 4:20 pm

Re: Hi new here, Love 2d looks nice!

Post by jbskaggs »

Thank you for the well written reply. I wasn't criticize your suggestion on tutorial I was simply saying it is hard fore to stay focused that long.


The use of tables and class in interesting. The language of lua is easy to read so hopefully not too difficult.
Post Reply

Who is online

Users browsing this forum: No registered users and 61 guests