Looking for help on a lot of things, need some awesome people to assist.-The Dream Of Coding and Knowing Nothing.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
RitzyBit
Prole
Posts: 2
Joined: Sun Jul 22, 2018 1:05 am
Location: Currently Germany, Mainly Colorado.
Contact:

Looking for help on a lot of things, need some awesome people to assist.-The Dream Of Coding and Knowing Nothing.

Post by RitzyBit »

Hey everyone, Long title for a thread, I'm sure it will upset some and I am sorry for that in advance.
So as the title suggest I have no knowledge of programing for anything. Yes I know I should before doing so but I am sure I am not the only one who never had the 60k for school or with a minimum wage job had enough for an engine that was not Love 2d. "Get to the point" just clearing up things so people don't reply in unhelpful ways.

So I chose love, Seems like a great programming language once I read more into it. I have read the wiki's and watched tut's on youtube but there is not much out there for love2d and what is they expect you to know programming in another language, and that one requires the same of another and so on.

Where am I at? Well like most people I looked up with my problem I read a book twice fold called "Love for lua programming" Sadly it seems to be the only Book on the subject I could find. It is also far behind the current love version. As my problem had to do with the out dated drawq and flip: functions. Sadly not a single person who commented on these subjects gave any helpful information, they simply tell the people it is out dated without telling them the new way of writing the same thing in the updated form or even leaving links to do so. The internet am I right?

Now I would like to explain I am very serious about game creation, my whole like I have been creating the concepts and drawing designs and have boxes of it. I was just missing the core part of doing it. Programming. So while reading this book I did not copy past, I actually made my own sprites, I made sure the batch was different in every way and animated it all myself, changed variables and values to fit the eventual feel I wanted my game to be in. forcing me to no be able to copy and paste from the book or just do what they did.

Of course I found out most of it did not work, So I looked up each line of all the codes and searched for alternatives for each, of course being difficult because besides what I had to kinda figure out myself most still feels like learning another language with no help and most of the book goes into no detail about what anything is, means, does so on.

So what do I need help with? Well I could paste my altered codes, but after much reading from people who read the same book, regardless of altering things and changing them it means nothing since most people have said its bad practice. So I am looking for 1 person, 1 awesome person who has as much of a passion for this as I do creating to help me, even better if its more then 1 person. I would even be willing to make a discord. I am constantly working on learning lua for Love2d, when I don't understand something I look up the info, when I still don't I work on sprites and music for it. So if there is anyone out there who wants to be a good teacher, something that is missing in most schools, sites and books. to walk a total beginner through the basics or even work along side me on this I would deeply appreciate it. I understand this is my dream and not yours. but I can't stress enough how much I want to learn this or see one of my many creations come to life for people to enjoy. So please get into contact with me here or anywhere. And if this is the wrong thread I am sorry, I don't use forums often and keep to myself most times even on the net but I needed to come out of that shell for this as well. haha. Anyway thank you if you have took your time to read this and I look foreword to seeing the responses.
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: Looking for help on a lot of things, need some awesome people to assist.-The Dream Of Coding and Knowing Nothing.

Post by pgimeno »

The documentation for old functions is still available. See love.graphics.drawq - it specifies what to use instead.

To the best of my knowledge, it's no longer possible to flip a quad in place, not sure why, but that's why Quad:flip doesn't list any alternatives. You can however flip it at creation time:

Code: Select all

local function newQuad(x, y, w, h, sx, sy, flipx, flipy)
  if flipx then
    sx = -sx
    x = -(x + w)
  end
  if flipy then
    sy = -sy
    y = -(y + h)
  end
  return love.graphics.newQuad(x, y, w, h, sx, sy)
end
Edit: If it is for drawing the quad directly, you can also use a negative scale in love.graphics.draw instead. If it is for flipping it in a spritebatch, you can also set the scale to -1 on either direction when using SpriteBatch:add. If you want to do it in place in a spritebatch, you can use SpriteBatch:set to set the scale to negative. So, there are indeed alternatives, but they depend on how the quad is used.

If you have specific questions, like "what is the replacement for Quad:flip and love.graphics.drawq", I'm sure people here will try and help you out.

Note that you can always use an older version of LÖVE. They are still available for download.
Last edited by pgimeno on Mon Jul 23, 2018 10:27 am, edited 1 time in total.
User avatar
zorg
Party member
Posts: 3436
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Looking for help on a lot of things, need some awesome people to assist.-The Dream Of Coding and Knowing Nothing.

Post by zorg »

pgimeno wrote: Sun Jul 22, 2018 11:15 am The documentation for old functions is still available. See love.graphics.drawq - it specifies what to use instead.

To the best of my knowledge, it's no longer possible to flip a quad in place, not sure why, but that's why Quad:flip doesn't list any alternatives. You can however flip it at creation time:

Note that you can always use an older version of LÖVE. They are still available for download.
Your code demonstrates the exact reason why; flipping can be achieved by simple transformations (-1 on either sx, sy, or both, in either love.graphics.draw or with the separate love.graphics.scale function)

Edit: Oh you edited that info in, how ninja of you :P

Also, to expand on the second part, the wiki has a selector in the top-right corner where you can select which version's docs you want to see; it's basically a filter that hides irrelevant parts of the articles for specific versions.

-------------------------------------------------------------------------------------------------------------------------------------------------------

Also, take what i'm going to say however you want, but people should focus less on the "this prog. language is totally different from this other one, so i need to learn everything from scratch" part, and actually realize that what you should be learning is basic logic and algorithms. (Something that has been said on the discord and i'd wager on IRC quite a few times too :3)

When do i need to branch? When do i need iteration/looping? How should those work to suit my needs for one specific problem? After that, you can check what language constructs you have available and try to code it so it works. With iteration, lua's for loop is different in a few ways from C's for loop, for example. (lua has these 3 parameters: start-value, end-value, step; C has in a much used form of it: start-value, stopping-expression, step; the difference may be subtle, but it's there.)

Also, if the programming part is what's hard for you, then do look up the "Programming in lua" docs from lua's own site; it's for a slightly older version of the language than what Löve uses, but most things are still applicable. (modules are deprecated and to get the number of array-like elements in a table, you now use the # operator as a prefix to the table, like: n = #t, just to list a few more important changes).

I will say though that i'm unfit as a teacher for various reasons, including the fact i have my own tons of things i need to do and finish, so can't help you there; what you could do is join the löve discord and ask for help there if you get stuck on something specific; peeps will help out! :3

Btw, just gonna say that i didn't learn jack shit in elementary/middle(high) school about programming either; it interested me enough to learn by myself. I digress though because i did go to college where i did learn some things, but most of them were algorithms i already knew, just implemented in specific programming languages, as i said above. The interesting things were the algorithms i didn't know, like the many ways of sorting.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
CaptainMaelstrom
Party member
Posts: 161
Joined: Sat Jan 05, 2013 10:38 pm

Re: Looking for help on a lot of things, need some awesome people to assist.-The Dream Of Coding and Knowing Nothing.

Post by CaptainMaelstrom »

Just to add to the conversation -- it sounds like you're on the right track. There are a lot of resources available for lua and LOVE2D. Some are targeted towards beginners, others not. But the main thing is just to always keep learning. I've been programming for about 8 years and 6 or so of those have been with lua/LOVE2D. I still don't know everything and still haven't published a full game!

Game development is a craft that can take a long time to get good at. Don't get discouraged.

Finally, since you've stated in the title that you know nothing of programming, I would recommend Kyle Schaub's Udemy course:
https://www.udemy.com/lua-love/

I haven't taken it, but I really like the Udemy platform and the course has an extremely high rating and good reviews. It seems to be exactly what you're asking for and the $12 price tag shouldn't be impossible for anyone.

Welcome to the LOVE2D community and best of luck!
User avatar
RitzyBit
Prole
Posts: 2
Joined: Sun Jul 22, 2018 1:05 am
Location: Currently Germany, Mainly Colorado.
Contact:

Re: Looking for help on a lot of things, need some awesome people to assist.-The Dream Of Coding and Knowing Nothing.

Post by RitzyBit »

Thank you for all of your replies I am not good at talking to people but I want you to know I am reading and taking everything to heart so thank you. It is much more easy for me to PM then speak in a public forum. xD Alright,

@pgimeno --I understand the code you posted in its stand alone form after much reading about what each thing meant and common sense (that could be wrong) about things I couldn't find. Thank you for your suggestion. But I am currently trying to understand the placement of thing in a chunk or how to get main.lua to pull from other lua and the list goes on. I will continue to read up about things though.

@zorg -- I sent you a private message and I think you for your constructive reply to my original post.

@CaptainMealstrom -- Very uplisting and I think you for that, I will check out udemy course. Thank you for the link.
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: Looking for help on a lot of things, need some awesome people to assist.-The Dream Of Coding and Knowing Nothing.

Post by pgimeno »

RitzyBit wrote: Mon Jul 23, 2018 12:14 am @pgimeno --I understand the code you posted in its stand alone form after much reading about what each thing meant and common sense (that could be wrong) about things I couldn't find. Thank you for your suggestion. But I am currently trying to understand the placement of thing in a chunk or how to get main.lua to pull from other lua and the list goes on. I will continue to read up about things though.
I'm not sure what you mean about placement of thing in a chunk.

To execute another Lua code, you can use require('file') (without .lua). If that Lua file returns something, it will be returned by require() itself. For example, say this is a file called "file1.lua":

Code: Select all

return "Hello, world!"
And this is main.lua:

Code: Select all

local text = require("file1")

function love.draw()
    love.graphics.print(text)
end
Then that code will display "Hello, world!" in the screen. If file1.lua is inside a folder, for example in lib/, you use a dot to separate folders, like: require('lib.file1')

By the way, in the previous snippet I wrote 'lg' where I meant 'love.graphics'. I've edited it.
Post Reply

Who is online

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