Page 1 of 4

Help me decide what to do next?

Posted: Thu Apr 14, 2011 2:31 pm
by lesslucid
Hi,

Slow but determined beginner here. I've just "finished", sort of, making a pong clone with love. I want to embark on another project in order to learn Love & lua. What should I do next? Improve my pong game (with lives, an intro screen, instructions, &c?) Improve the code of my pong game so it's all well-organised and stuff? Make an arkanoid clone? I'm looking for the next "little" challenge here, that'll help me learn more programming stuff but won't make me give up in frustration...

...also, I'd post the code of my pong game here but I'm not sure what the etiquette is... it's about 200 lines, is that too much to put in a forum post?

Any help of advice greatly appreciated!

Re: Help me decide what to do next?

Posted: Thu Apr 14, 2011 5:02 pm
by nevon
lesslucid wrote:What should I do next? Improve my pong game (with lives, an intro screen, instructions, &c?)
Improve that shit with whatever you can until it becomes an unmanageable blob of spaghetti code. That'll teach you the importance of code structuring for your next project.
lesslucid wrote:Improve the code of my pong game so it's all well-organised and stuff?
Being able to refactor code is great, but I find it's so boring that it's not worth the bother with small projects that you only do for fun and to learn. Better that you keep in mind what a mess your old code was when you start up your next project. Maybe it's just me, but I'd rather associate learning with being creative and having fun, then with tedious and boring work. Unless you find refactoring fun, in which case my point is moot..
lesslucid wrote:..also, I'd post the code of my pong game here but I'm not sure what the etiquette is... it's about 200 lines, is that too much to put in a forum post?
Make a .love out of it and post it as an attachment (check the wiki on game distribution if you don't know how).

Re: Help me decide what to do next?

Posted: Fri Apr 15, 2011 5:22 am
by ivan
lesslucid wrote:What should I do next? Improve my pong game (with lives, an intro screen, instructions, &c?)
In my humble opinion you should focus on whatever you are interested in. That is, try to make a small game that you are excited about. Unless you are pretty excited about what you're working on chances are it won't get finished.

Re: Help me decide what to do next?

Posted: Sat Apr 16, 2011 2:30 am
by lesslucid
Thankyou both for your help!

...I think the problem with trying to make something I'm excited about is that the kind of thing I find firing my imagination tends to be some kind of big, complex, absurdly over-ambitious project, and my technical skills fall a long way short of even starting on something like that. I want to try to restrain my imagination a bit, make some things that are kind of standard, easy, small projects to build up my understanding, so that I can eventually make something I find more interesting. I think even with small projects it's possible to find little ways to make them more appealing (it was fun adding some small wrinkles to the standard "pong" mechanics, for example) but I'm reconciled to the fact that my big ideas - even my medium-sized ideas - are going to have to wait. But it's true, maintaining motivation isn't easy. Hmm.

I will have a bash at adding features to this one and see if I can't "promote" it to the level of "unmanageable spaghetti code". ;) Thanks again for the help!

Re: Help me decide what to do next?

Posted: Mon Apr 18, 2011 8:15 am
by ivan
Hehe, not bad. I tried the game although I couldn't get a single point versus the computer. :)
I think it's kind of hard aiming the puck.
What I mean is that it might be a bit more interesting if it bounced off at an angle when you hit it with the edge of the paddle.
Or maybe the puck could speed up after each bounce.
Anyways, keep at it man.

Re: Help me decide what to do next?

Posted: Mon Apr 18, 2011 9:03 am
by sharpobject
It seems like his paddle is bigger than mine.
Image

Re: Help me decide what to do next?

Posted: Mon Apr 18, 2011 1:01 pm
by lesslucid
Thanks for the feedback! I've added some intro & outro screens and altered the balance a bit to make it easier / possible to win. Maybe I should try to add different difficulty levels now? Hmm.

Re: Help me decide what to do next?

Posted: Fri Apr 22, 2011 4:27 am
by lesslucid
Ok, now with variable difficulty levels. I don't think it's quite reached the status of unmanageable spaghetti but I can see it's headed that way.

I've beaten level 4, I suspect level 5 is completely impossible. Hmm. I think my next project will be to try to use the middleclass module to create a brick-breaking game, with each brick being created as an instance of a brick class and stored in a table... but, uh, any advice or suggestions as always deeply appreciated. :)

Re: Help me decide what to do next?

Posted: Fri Apr 22, 2011 8:09 am
by Robin
.Neat! In the first difficulty I could just do nothing and wait for the computer to miss 7 times. :P

A breakout clone next? Good idea. You already have part of the code anyway. ;)

Re: Help me decide what to do next?

Posted: Fri Apr 22, 2011 2:37 pm
by lesslucid
Thanks! I could probably afford to make the easiest level a little tougher than that...

At this point this is just curiosity rather than a real problem, but... should everything except the other callback functions be inside the love.load function? The explanation in the tutorial says:

"This function gets called only once, when the game is started, and is usually where you would load resources, initialize variables and set specific settings. All those things can be done anywhere else as well, but doing them here means that they are done once only, saving a lot of system resources. "

So, does that mean that if I require modules, write helper functions, declare global variables, creates classes, &c &c, outside the love.load function, these are getting processed over and over again? I've been putting all my helper functions elsewhere because it just seems "neater", but I'll put them inside the love.load function if it actually affects how the game works.