123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|652|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> Love2D

Sun, 31 Oct 2021, 04:30
therevillsgames
Really getting into Love2d at the moment, so here's a platformer example: Linkage
Sun, 31 Oct 2021, 04:30
Kuron
I watched the video. Looks really well done. Only comment is (my opinion only) he seems to jump just a tiny bit too high when he jumps. But well done, goes up inclines perfectly (which is often hard to accomplish). Good job!!
Sun, 31 Oct 2021, 06:29
Jayenkai
I reckon it's the speed of the gravity that's doing it. You can tell when he runs/blops down the hill. He floats as he goes.
Bump up the gravity a bit, and he'll be fine. And don't forget "double gravity when the jump button isn't being held" so he can do the Mario style higher-jump!

-=-=-
''Load, Next List!''
Sun, 31 Oct 2021, 06:39
Jayenkai
My head's already exploded, reading the very start of main.lua!!



Nothing makes trying to read code harder for me, than having the same word used in different contexts.

camera=require 'camera' and, camera = camera()
Aargh!!!!
*headburst*

-=-=-
''Load, Next List!''
Sun, 31 Oct 2021, 18:54
therevillsgames
I'll update that Jay, yeah doesn't read nicely.

camera = require 'camera'
This imports the camera.lua file and assign it to the global variable camera.

camera = camera()
This allocates the function camera overriding the camera global.
Mon, 01 Nov 2021, 03:17
therevillsgames
So playing around with the camera declaration.

Since I'm using the camera module (camera.lua), that module returns itself as a metatable, which is set up to call "new" when calling camera(). I havent used the metatable stuff as yet, no need to really.

I could do this:

instead of

but for readability I totally agree with Jay, so I'll update it to:

Mon, 01 Nov 2021, 03:20
therevillsgames
Using an inspect module, outputting camera from the require('camera'):



and outputting the myCamera:

Mon, 01 Nov 2021, 03:43
Jayenkai
My hatred for "name same as function same as variable same as usage" started with the Blitz2D example for Lists.. took me Far too long to figure those out! And don't get me started on JavaScript AudioBuffers!!

I tend to stick "my" onto things, either that or shorten words where it's still obvious, so I use cam for cameras, lamp for lights, etc.

-=-=-
''Load, Next List!''