generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: LÖVE

Previous Thread :: Next Thread 
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
14 Aug 2012 10:24 AM
I was wondering about love.graphics.translate and love.graphics.rotate?

Should I write it before or after I've draw objects on the screen. I want to be sure.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
14 Aug 2012 10:28 AM
doesn't love.graphics.draw already have a rotation parameter?
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
14 Aug 2012 10:31 AM
Maybe so, but if I wanted to translate the whole scene it would be more efficent to do love.graphics.rotate.
Report Abuse
AdvRobot is not online. AdvRobot
Joined: 09 Aug 2012
Total Posts: 172
14 Aug 2012 10:32 AM
I would post your question here you are more likely to get a better answer.
Link: https://love2d.org/forums/

Report Abuse
booing is not online. booing
Joined: 04 May 2009
Total Posts: 6594
14 Aug 2012 10:32 AM
because 2 function calls is totally more efficient than one
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
14 Aug 2012 10:57 AM
It is more efficent becuase :


love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)

Or

--Front
love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)
love.draw(picture, 'parameters', position, rotation)
--Or behind, is my question

Translate scene
Rotate already rotated scene
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
14 Aug 2012 10:58 AM
I guess I see your point though. But my question still stands.
Report Abuse
Vitouliss14 is not online. Vitouliss14
Joined: 18 Mar 2009
Total Posts: 7918
14 Aug 2012 10:59 AM
"Should I write it before or after I've draw objects on the screen. I want to be sure."

I would say after...I mean to me it's kind of obvious.
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
14 Aug 2012 11:01 AM
Are you using canvas/whatever the newest version uses??
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
14 Aug 2012 11:01 AM
you do realize that you can't just "rotate" things you already drew, without clearing them and drawing the in different angle?
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
14 Aug 2012 11:02 AM
>I would say after...I mean to me it's kind of obvious.


love.graphics.rotate
Rotates the coordinate system in two dimensions.

Calling this function affects all future drawing operations by rotating the coordinate system around the origin by the given amount of radians. This change lasts until love.draw() exits.
Report Abuse
Vitouliss14 is not online. Vitouliss14
Joined: 18 Mar 2009
Total Posts: 7918
14 Aug 2012 11:15 AM
Oh...I haven't really touched LÖVE in a long time. So if I do this:

love.draw(parameters blah too lazy to look up)

and then I use

love.graphics.rotate(parameters blah too lazy to look up)

It would affect everything I drew using love.draw? So he would have to clear everything to even rotate it?
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
14 Aug 2012 11:22 AM
uhm, kinda

the love.graphics.rotate affects the "drawing" board (or whatever you call it)

but the parameter for love.graphics.rotate only affects the thing you're going to draw
Report Abuse
Vitouliss14 is not online. Vitouliss14
Joined: 18 Mar 2009
Total Posts: 7918
14 Aug 2012 11:24 AM
Oh derp...I get it now.


I should've read your last post about that you thought that love.draw already had a built in rotation parameter.
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
14 Aug 2012 11:41 AM
So it's before. Thanks su8
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
14 Aug 2012 02:28 PM
Conclusion: LÖVE is stupid but sadly it's the best Lua game engine.

The love.update()/love.draw() functions calling so many times automatically and all this sorcery is just obsolete compared to other language's game engine's.

Actually wait...


ROBLOX IS A GAME ENGINE AND U PUT LUA IN IT YEAH ROBLOX WEE ROBLOX IS THE BEST LUA GAME ENGINE :D:D:D:D

~let le trollin begin~
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
14 Aug 2012 02:43 PM
>the love.update()/love.draw() functions calling so many times automatically

get out.
also
meet the hidden loops.

eet goes laik

while(window.open) {
omgClearscreenlol()
love.draw()
love.update()
}
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
14 Aug 2012 03:15 PM
^

I don't understand what you just said, but let me explain why it's so stupid:

1) slows down the application
2) not needed, while love.timer.sleep(0.02) do would be better
3) lazy coding and misleading for new coders
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
14 Aug 2012 03:19 PM
that was c side pseudo code

now tell me why it slows down the program?

it seems that game loops are new to you, well done roblox

Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
14 Aug 2012 03:29 PM
because you might not want to update it for really long

example: pause

now imagine that on your phone


..left for hours

battery is gone for no reason.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
14 Aug 2012 03:31 PM
everything is done by a loop.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
14 Aug 2012 03:35 PM
*facepalm*

YES YES I KNOW, BUT THAT DOESN'T MEAN THAT ALL OF A SUDDEN while true do end WILL STOP TAKIN' UP SO MUCH CPU JUST BECAUSE OF THE FACT THAT EVERYTHING IS DONE BY A LOOP.

*sighs*
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
14 Aug 2012 03:37 PM
i dont think its a lua-side loop

and loops in c are really fast if they do nothing AKA "pause"
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
14 Aug 2012 03:43 PM
guhghh

so?

ok, judging by ur psuedo-c, it draws and updates allthrething.

imagine this:


(ok, im a little rusty with my love, but stick with me k?)

t = {}
for i = 1, 1000 do
x = love.graphics.newImage("lolliketottalyHDbackgroundyeah.png")
table.insert(x,t)
end
function love.update()
for _, v in pairs(t) do
love.graphics.draw(v)
end
end



LAGGGGG
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
14 Aug 2012 03:45 PM
you can't draw inside love.update
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image