Comments (4)
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.
Not sure what's preventing it from working in your case. Can you post some code?
from nobleengine.
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.
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.
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)
- Scene:enter() is called twice once in a while (rare) HOT 2
- frame rate dip after the system menu closes
- documentation is scarce for functions in the utilities folder
- using settings.setup with an empty dict results in bad data written to disk HOT 4
- Provide better instructions for using this repo as a submodule with the Project Template HOT 2
- Use lists instead of positional arguments to supply optional parameters to methods HOT 6
- Introduce releases and versioning HOT 2
- Typo in Sequence.lua file HOT 2
- Add support for custom scene transitions HOT 2
- Add support for debugDraw in scenes HOT 1
- Add support for terminating/locking/unlocking/sleep callback HOT 3
- NobleSprite issue with animation HOT 1
- Japanese font problems in NobleSans HOT 2
- "pdxinfo file not found" error when attempting to launch game in simulator.
- How to create a self drawing NobleSprite? HOT 1
- Add stack-type functions for scene management HOT 1
- (Critical) Crash in scene transition with transition type = Noble.Transition.Type.COVER
- Menu:activate() does not select()
- Animated sprites render incorrectly when drawn offscreen HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nobleengine.