is it possible?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
plz_m0ve
Prole
Posts: 16
Joined: Fri Jan 04, 2013 4:07 pm

is it possible?

Post by plz_m0ve »

Hey,

just wonderet about this idear i had.
I find it very confusing learning lua and then think about the LÖVE commands.

So here comes my quistion (bad spelling is free :3)

Is it possible just to learn löve2D commands and still work with it and make a game? And then, when the commands are learned, you begin to learn some lua? Because i find it very fun to sit down and try the commands because i can make something i think is fun. Like a little simple game with a ball moving around.

Is it possible? :)
LÖVE IS IN THE AIR
- OBEY
User avatar
Saegor
Party member
Posts: 119
Joined: Thu Nov 08, 2012 9:26 am
Location: Charleroi

Re: is it possible?

Post by Saegor »

you can, for exemple, TRY TO write a love game with zero variable but it will be very painfull

you have'nt to learn ALL the Lua language but all you know about it will multiply your efficieny at coding games

but yes, it is possible to learn (read and quick test) every Löve command before learning deep principles of Lua
you can also write a moving ball game without using tables or somewhat complex but it's a big miss because Lua is so fun and easy
Current work : Isömap
plz_m0ve
Prole
Posts: 16
Joined: Fri Jan 04, 2013 4:07 pm

Re: is it possible?

Post by plz_m0ve »

Ok, but can you recommend some tuts that are fun? Because i see some tuts that gives the basic, but just some simple things, but maybe, out in the big world, there is a tutorial that was super good to learn a beginner lua/and maybe fun also.

Do you know any good tuts? I have seen those Programming in Lua, but its just too overhelming after my opinion ^^

But yearh, i need to man me up and sit down and learn the basics. But how long do it takes? Years before i can make something just a little bit fun or months? :) Many quistions, but i hope you guys can LÖVE me out of these quistions.
LÖVE IS IN THE AIR
- OBEY
User avatar
Larsii30
Party member
Posts: 267
Joined: Sun Sep 11, 2011 9:36 am
Location: Germany

Re: is it possible?

Post by Larsii30 »

how long it would take to make something fun depends on your talent to learn it and your creativity.
Even with minimal knowledge you could create something pretty simple that's fun to play ;)
plz_m0ve
Prole
Posts: 16
Joined: Fri Jan 04, 2013 4:07 pm

Re: is it possible?

Post by plz_m0ve »

Whuhu! :D

But do you know any good tuts out there? :)
LÖVE IS IN THE AIR
- OBEY
Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: is it possible?

Post by Santos »

I've been thinking about this a bit recently, and I'm thinking that maybe it's actually a good idea to not learn all of Lua before trying to make fun things with LÖVE.

Lua things that are probably important to know about first are:
  • Lua's number, string, and boolean types
  • Using +, -, / and * with numbers (arithmetic)
  • Comparing numbers with <, >, <=, >=, == and ~=
  • String "concatenation" (adding strings together) with ..
  • if then else
  • math.random :ultraglee:
And useful LÖVE concepts and functions: And with all that, you could make Pong, but not something which has "many things at the same time", like Breakout (which has many bricks) or Snake (which has many snake segments), that's what tables are useful for. You could make a game where you click on a square which is created at a random position, and every time you click on it, it moves. It would seem like there are "many squares", but really you're only storing the position of one square at a time. If you understand all of that Lua stuff above, the most difficult thing will probably be the "logic" of making the game, how to use those tools to make something. And I think that's probably more fun and more important than being overwhelmed with, say, tables, and libraries, and other more advanced things.

And then you could learn about objects in LÖVE, such as Image objects and drawing them with love.graphics.draw, and Font objects, creating them with love.graphics.newFont and using them with love.graphics.setFont. And you could just explore and see what's possible, maybe change the window size by using love.graphics.setMode and the window title with love.graphics.setCaption. And whatever sounds cool. ParticleSystems are pretty cool. :ultrahappy:

And there is other stuff which is useful, such as using "command line Lua" (if you're on Windows, Lua for Windows) for testing out Lua things quickly, and knowing how to make a .love file

And then maybe functions would be cool to learn next, even if just for organizing code at first.

And then tables. And then you'll be able to make anything. :ultrahappy:

I dunno, this advice is probably terrible. :ultraglee: I'm not sure what to recommend for tutorials sorry, I made a list a while ago, I guess I'd suggest looking at Headchant's tutorial first, it's quick and comprehensive.
User avatar
Codex
Party member
Posts: 106
Joined: Tue Mar 06, 2012 6:49 am

Re: is it possible?

Post by Codex »

Since I first started learning to program with both LOVE and Lua about six months ago for the FIRST time - ever, I feel as if I can add some valuable input as to what it feels like to be a beginner. A lot of the info that Santos gave was pretty helpful advice. You have to learn some VERY basic things in lua before you can even begin to make anything in LOVE.

Some pretty big problems I came across when I was starting:

1. Where to begin programming a game?

This is pretty straight forward, how do you even start on an idea you have for a game if there are lots of components involved? (dealing with AI, movement, collision, etc. etc.) The short solution. Pick something and start, or at least that's what I did. The long solution would be to plan it out, make a prototype possibly, and have an idea of how everything will work, and then pick an appropriate place to start. It's hard to do the long solution if you have never made anything before.

2. zipping folders and renaming them to a .love file on windows 7

This was a pain in the butt for a week. I couldn't find a video to show me how to do this correctly. Finally after much googling I found some misc. computer article talking about how to change some settings on windows 7 to be able to rename files. (in the meantime, I learned lua)

3. Most of the games made on the forums are beyond a beginners ability to learn from and comprehend

Sorry if this is harsh LOVE2D community, but take this as a compliment. There are a lot of talented programmers here. Trying to grasp what they are coding when starting out was nigh impossible. I could really only understand bits and pieces and reading a lot of their code made me feel confused compared to how simple the LOVE2D tutorials were.

4. DEBUGGING!!!

I just found this out about 2 months ago that LOVE2D had a console (just like the lua exe) that you enable with love.config and set it to true!!! I felt like I struggled for my first four months in vain! Before I knew this, I was practically guessing and editing random things hoping to find the problem in my code when things went wrong. I also used love.graphics.print() to see the state of my globals and variables which was a big hassle.

5. Understanding what local/global are and how they are used

The concept was a little confusing at first, and often at times I wondered if I was using local variables in the right place.

6. Input/output & changing the game state

Learning how to use the keyboards and input to actually do stuff and where to store the game state variables.

7. Making sure everything is where it belongs


At the start I remember, I tried to stick EVERYTHING into love.load(). lol. Good times. There were other mistakes similar to that one. (putting dt, outside of love.update and a lot of others)

8. Converting learned knowledge from lua to LOVE and using it

It took me a while to understand that everything you can do with lua, you can do with LOVE. And that LOVE is basically: lua + a_bunch_of_other_functions() + drawing_graphics_and_playing_sounds() combined into one.

9. Self-confidence

I would say for the first month or so, I couldn't stop asking for help on understanding things. I was so lost and confused... It took me a while before I went off and explored stuff on my own. I know I may have gotten on some peoples nerves on the IRC when I first started, because the most basic things about love and lua I was pestering them about. Now I try to think of it as a who-wants-to-be-a-millionaire lifeline. You should really only be asking for help if you've made enough progress on something that is worth people's time and should do so sparingly. (similar to the show where you only get to use that lifeline once!)

10. Programming Vocabulary

This is a big communication barrier when learning if you don't know what things are called. Later on when you try to read more advanced tutorials or other people's code, they will be using certain terms to reference/explain things and if you don't know what they are talking about then you will be in the dark. (I still don't have a lot of the lingo down, but I get by with the amount I know... :P )



So ta-dah! That is Codex's list of important hurdles to overcome as a lua & LOVE noob. Some parts were very frustrating, especially when you so desperately want to see the result of what you're making, but never give up and eventually you will succeed! There are still a lot of things I don't know, but I feel as if I've learned enough to get by for now making the games I want. Of course, the more you the learn the easier it is to accomplish your goals. (or so it appears)

Also I would definitely recommend that use the lua prompt and do these tutorials. Yes, I'm aware some people have already referenced them, but they have been invaluable as a tool to really understand lua for me. (more so than pil, although pil is pretty damn good too!) I'd say that you should go through and do all the introductory topics, and follow the commands on your lua prompt. (feel free to play with it too!) Then once you get the introductory topics done with and you feel like you have fully grasped/understood them try some of the other topics. In fact, this is the order, I recommend you learn/read through.

Some useful demos that are fairly small and easy to understand that were made by people on IRC when I was first learning are below.

Ball Test - Press enter to resume/pause motion with balls. One ball bounces when it hits the edge of the screen while the other teleports to the opposite axis.

Chat System - Press enter to switch chatbox from true/false. You can chat in the chatbox when it is true. When the chatbox is switching off, the text is erased. (you can erase it with backspace too!)

Coin Demo - Just showing how to use a table and images with love.draw(). Nothing else to it.

Rotated Square Generator - Press enter to spawn squares that are moving and rotating in different speeds and directions.

TechnoCat Tables - Again just showing how to use tables for some stuff.

Kudos to TechnoCat, MauriceG, and another person on IRC (I can't remember his name) for making those .love files or helping me make them. I hope looking through those simple demos helps!

:awesome:
plz_m0ve
Prole
Posts: 16
Joined: Fri Jan 04, 2013 4:07 pm

Re: is it possible?

Post by plz_m0ve »

Thanks for the long good answers!

Always good to hear about what you did when you was a beginner. :-)
I had problems with the zipping too, but now i have found out what to do. Kinda hard like you say, finding a video or something to show.

About the tuts.
I'll try them! . And again,

thanks!
LÖVE IS IN THE AIR
- OBEY
User avatar
Kjell Granlund
Prole
Posts: 33
Joined: Tue Jan 08, 2013 12:39 am
Location: Virginia Beach, VA USA

Re: is it possible?

Post by Kjell Granlund »

Great answers there. I think I will start making some youtube videos to help. I started with no programming experience 2 weeks ago and learned so much. I was in the same boat as you. I downloaded other peoples games and looked at the code to learn. Feel free to message me anytime and look through there forum. A wealth of info in here. When I get home I can expand and tell you my experiences. Ill also start making videos this week. Good luck and welcome to love!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 3 guests