Giter VIP home page Giter VIP logo

Comments (4)

Mark-LaCroix avatar Mark-LaCroix commented on May 18, 2024

Looks like this was me making a typo in the docs, sorry about that. It's supposed to refer to NobleSprite:draw() (not NobleScene:draw()), which is called like any other sprite in the Playdate SDK's update loop.

image

Not sure what's preventing it from working in your case. Can you post some code?

from nobleengine.

JerryVerhoeven avatar JerryVerhoeven commented on May 18, 2024

image
image

This is how I've set it up.
Not sure what else I can say except that if I call draw explicitly on the sprite, it does render as expected.

from nobleengine.

Mark-LaCroix avatar Mark-LaCroix commented on May 18, 2024

You might want to try having the scene be the one to add the NobleSprite directly, instead of the NobleSprite calling to add itself. So, use self:addSprite(testTargetDownSprite) inside your NobleScene:init() function. NobleSprite:add(), which you are using, will call the current scene's self.addSprite(yourSprite) method, but I don't think the current scene has been changed to the new scene yet when NobleScene:init() runs. I think it happens on NobleScene:enter().

Almost certainly unrelated, but you don't need to include the "table-32-32" part of the filename when you create from a spritesheet.

from nobleengine.

Mark-LaCroix avatar Mark-LaCroix commented on May 18, 2024

The documentation typo was fixed in #26. I think the other issue is more a case of "works as designed, but maybe it's designed weirdly?" I'm going to close this issue, but feel free to open a new thread in the discussions tab if I didn't fully address the topic.

from nobleengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.