Page 6 of 14

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Fri Oct 22, 2021 8:02 am
by Philbywhizz
Great idea for a community project. I'm keen to have a crack at some love2d coding with it.

I just created a fork but noticed that a lot of the required libraries are missing. Do we need to source them ourselves or do you think they should be submodules?

Edit: I've submitted a pull request for the missing files

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Fri Oct 22, 2021 8:32 am
by Gunroar:Cannon()
togFox wrote: Fri Oct 22, 2021 12:39 am I'd like the pixel art to show modules as modules are bought. I expect those to overlay the main sprite so I'm thinking this won't be a problem. Perhaps.
Yep, easy sqeeusy...hopefully.

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Fri Oct 22, 2021 11:19 am
by togFox
Philbywhizz wrote: Fri Oct 22, 2021 8:02 am ... a lot of the required libraries are missing.
Sorry - my bad. They should be in the repository but slipped my mind. I accepted your merge on mobile phone. Hope it's okay now. Thanks for that contribution!

I assume you got the code to work. Hope you have some fun and find a way to contribute!

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Fri Oct 22, 2021 11:51 am
by Philbywhizz
togFox wrote: Fri Oct 22, 2021 11:19 am I assume you got the code to work. Hope you have some fun and find a way to contribute!
Yes I got it working (hence the pull request).

I'm still looking over and studying the code (I'm a love2d newbie) so if I find something I'll add to it.

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Fri Oct 22, 2021 12:15 pm
by togFox
Since you're a github pro I'll suggest you look at the cards/issues on github. There were two projects in the repository.

Maybe pick something small and easy while you get use to the coding style. :)

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Fri Oct 22, 2021 2:14 pm
by Philbywhizz
togFox wrote: Fri Oct 22, 2021 12:15 pm Since you're a github pro I'll suggest you look at the cards/issues on github. There were two projects in the repository.
I'm hardly a pro, but I know my way around git and github to keep myself out of trouble :)

Can I suggest that you move the library files into a seperate sub-folder (such as lib) from the main game code? It might make it easier for people to see what is lander code and what are libraries.

For example, after moving anim8.lua into the lib folder we can change the code from

Code: Select all

anim8 = require 'anim8'
to

Code: Select all

anim8 = require 'lib.anim8'

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Fri Oct 22, 2021 11:58 pm
by togFox
Yep. I'll do that next if that helps collaboration.

Edit: Done. I'm still on mobile. I think it's right now.

Do you think a paragraph or two on coding conventions would help? Is the style/pattern already obvious?

I think I'll put comments at the start of each lander module to explain its purpose and what you can expect in each file.

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Sat Oct 23, 2021 1:04 am
by Philbywhizz
Just merged in your changes to my local repo - that is much nicer looking now. Well done.

A coding convention would be a nice thing to have, especially when you want multiple people working on it.

Comments are a good thing - especially when it comes to reasons why things are done a certain way.

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Sat Oct 23, 2021 1:09 am
by Philbywhizz
togFox wrote: Tue Oct 19, 2021 1:11 pm The code is intentionally written for noobs - not a single instance of SELF keyword. :monocle:
Is there a reason for this? I must have missed something. I find using self allows me to group related data together (not necessarily object oriented)

Re: Mars Lander. Any collaborators? Noobs welcome.

Posted: Sat Oct 23, 2021 2:33 am
by togFox
Noobs don't understand Self, classes, oo and state machines etc. Doesn't mean we can't do that. :)