Search found 446 matches

by yetneverdone
Wed Nov 30, 2022 1:37 pm
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

Awesome! It works correctly now! Thanks a lot. I'll post here again if I have a question or suggestion :)
by yetneverdone
Wed Nov 30, 2022 3:54 am
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

Hi, thanks for the explanation! I used the camera example, but it seems that it's inverted. The sprite follows the mouse in an inverted way.
lovec_UwZdCP9Xya.gif
lovec_UwZdCP9Xya.gif (1.56 MiB) Viewed 6058 times
by yetneverdone
Tue Nov 29, 2022 4:50 pm
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

Hi, I am currently doing this function SceneNodes:create_camera() self.view = Scene.newView() if DEV then self.view:setDimensions(WINDOW_WIDTH, WINDOW_HEIGHT) self.view:setPosition(love.graphics.getWidth()/2 - WINDOW_WIDTH/2, 64) end local w, h = self.view:getDimensions() self.root = self.view:newLa...
by yetneverdone
Tue Nov 29, 2022 3:07 am
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

Question, if i have the main game size (1024, 640), and i want to draw that in the center of the love window (lets say 1408, 800), how would i do that? Should i adjust the position and size of the view or the layer or the camera?
Milton_5s10uhEPgU.png
Milton_5s10uhEPgU.png (30 KiB) Viewed 3872 times
by yetneverdone
Fri Nov 25, 2022 2:12 am
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

I see that `camera` node was added. What would be the example usage of that compared to just using view As per the sprite nodes nesting, i think it's expected to draw the parent behind the children. Anyways i have implemented a way to get around getting the transformation of the parent node in my pr...
by yetneverdone
Tue Nov 22, 2022 1:30 am
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

Why can't sprite nodes be nested though? Perhaps theres a better way to do what I was trying to do which is to have another sprite node (flashlight) attached/nested (so it can easily be translated/offset by the parent node) to the player sprite node.
by yetneverdone
Mon Nov 21, 2022 4:27 pm
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

On the other hand node:setGraphic(img, ox, oy) Wait, is the 2nd and 3rd parameters of setGraphic the offset? I thought thats the position x and y? Another question, can't a sprite be set as another sprite's parent? Something like this errors: local s1 = view:newSprite(0, 0) local s2 = view:newSprit...
by yetneverdone
Mon Nov 21, 2022 1:48 pm
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

This fixed the issue i was having `self.view:setScene(w/2, -h/2)` (the negative height/2). Why though? Difficult to say but setScene(w/2, -h/2) is a perfectly valid line. Please post the rest of your code if you are having further trouble. What i meant was, i was doing `h/2` first, then making it n...
by yetneverdone
Mon Nov 21, 2022 10:21 am
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

This fixed the issue i was having `self.view:setScene(w/2, -h/2)` (the negative height/2). Why though?
by yetneverdone
Fri Nov 18, 2022 10:18 am
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 48
Views: 46839

Re: love.scene (yet another scene graph library)

You are right, this bug was introduced a while ago. I rarely use the scene.newSprite syntax so I missed it. Here is the fixed version: https://github.com/2dengine/love.scene/commit/c590028d02f5d06d906cf5130b8ccdb0338f3a9e https://2dengine.com/?p=scene#node Also, you do not need to call setParent ex...