pbs-kids / platypus Goto Github PK
View Code? Open in Web Editor NEW2D tile based game framework in HTML5
2D tile based game framework in HTML5
I'm trying to use a timer event in an entity and the timer is only updating 10 times. I've read that the timer listens for "handle-logic" calls. Handle-logic calls as I understand are passed when a child-entity is added or a "tick" is passed from the scene. This makes me think that the only "handle-logic" calls that are being passed to my entity are from child-entities being added. How do I pass consistent "tick" calls to my entity so I can get my timer working properly?
My entity is in a entity-container in an action-layer and the action-layer has a "logic-handler" in it.
Any help would be appreciated,
Patrick
I read the article about making one single m4a file and playing/pausing from that for sounds on mobile. I'm in alpha development right now and that isn't very practical for my purposes to have a single audio file since things are still in flux, so I was wondering if there was a way I could make the individual ogg/mp3 that I have working in non-mobile browsers work in mobile for now? I've tried playing with the "client-supports" at the bottom of config.json, but eliminating/moving the android and ios devices from m4a doesn't fix the problem, still no audio. Is there away around this?
Thanks,
Patrick
I was wondering if there was an event I could have an audio component listen for so as soon as the scene that contains the audio component loads, the audio fires. Like for when the title screen loads having a "Welcome to the game" audio. Or audio with the level's objective as soon as that level loads. Or will I have to trigger this manually with my own component?
Create a list of components as a separate page on wiki and link to it from the example config.json, so it's easier to find what's available, per this discussion: #4
Per this discussion: #8
Tiled 0.9.0+ added support for image layers in addition to tile layers and object groups. Support for this should be implemented in tiled-loader.js as well.
I believe that there was an update made to the engine that allows a user to view the game without building it. If this is correct, can we add it to the documentation?
I'm trying to modify a layer that is used by three scenes based on which scene it's in, but the "properties" overwriting json definition doesn't appear to be working for entity-containers.
I have this in my scene:
{
"type": "desktop-interface-layer",
"properties": {
"entities": [
{"type": "button-mute"},
{"type": "button-fullscreen"},
{"type": "button-play"},
{"type": "gui"},
{"type": "sorter-desktop"},
{"type": "end-beach-screen"}, //this is the line I want to take precedence
{"type": "fps-counter"}
]
}
}
which I want to take place of the following, which is my layer entity:
{"type": "entity-container",
"entities": [
{"type": "button-mute"},
{"type": "button-fullscreen"},
{"type": "button-play"},
{"type": "gui"},
{"type": "sorter-desktop"},
// {"type": "end-neighborhood-screen"},
{"type": "fps-counter"}
],
"childEvents": ['link-entity',
'global-trash-collected',
'global-debris-collected',
'increment-trash-count',
'increment-debris-count',
'track-trash-collected',
'track-debris-collected',
'gui-trash-collected',
'gui-debris-collected',
'time-elapsed']
}
I would expect the entire "entities" array to be replaced by the "properties" element passed from scene, but the new data passed from properties is not reflected. I'm using properties in a different location to pass level builder data into a layer and that is working fine. Any ideas what the problem could be?
Thanks,
Patrick
Hi there,
Just wanted to jot down a few things I noticed with how Tiled (1.1.3) and Platypus (0.11.9) were working together:
There was also one very interesting apparent bug, which I'll post separately.
These things can be worked around easily enough, but I did want to make a note of them in case any of them are either a) fixed already, b) about to be fixed, or c) fixable and should be added to future updates. Or d) not going to be fixed, but should be documented as gotchas.
Hello, quick question: Does the engine currently support ogg or mp3 audio sprites?
Thanks,
Patrick
Quick question:
Is there a measurement in the engine of progress as things load in between scenes? I've been thinking about adding progress bars in between levels as the next one loads.
Thanks,
Patrick
While I'm sure CreateJS is great, pixi.js has gained attraction lately as one of the fastest renderer. Is there any plan to support it? I can help with it if I can be pointed to the right direction.
Feature request sparked from this question: #18
In the examples provided, the Mookie game and Breakout game both have tiled-loader components in their action-layer entity. Both tiled loaders take in a single external spritesheet. I am having an issue when I don't pass an external spritesheet into the tiled-loader (the "images" array is marked as optional), none of the assets from the Tiled level json are loaded. Any ideas what might cause this?
I was seeing an issue where I had a 32x32 Tiled map but the last row and column were both missing in Platypus. This only happened when a dimension was 32 - if I used 31x31 or 33x33, all of the map tiles properly appeared, but if either width or height was 32, that 32nd tile would be missing. I soon realized that since my tiles were 64x64, these corresponded with pixel sizes of 2048, so I started poking around in RenderTiles, where the maximumBuffer is set to 2048.
So I guessed it had something to do with the tile size matching the maximumBuffer, and I found that setting EDGES_BLEED to 0 made those tiles appear again. I narrowed it to where updateRegion() is using the EDGES_BLEED in its calculation for ctw and cth variables - see RenderTiles.js line 737 - if (this.cacheWidth - EDGES_BLEED) is changed to (this.cacheWidth - 0), then with everything else the same, the tiles will appear again. I assume this calculation was added for good reason though, so I don't suppose just zeroing it out is the right fix.
My workaround for this was to just shrink my map down to 31x31, because I suspect these margins and edge bleeds have been carefully constructed for caching performance and clean gapless tiling and such (and I figured it would be good to have the map fit comfortably under 2048x2048 for performance anyway). But I thought I'd mention it here.
I'm working on audio sprite sheets and I've run into an issue where longer audio segments are cutting out before they should be done. I've checked and the spritesheet json is correctly indicating how long the segment should be, so I've ruled that simple error. Also, the audio is not cutting out consistently in the same place. Is there something that you're aware of that might cause this problem?
Thanks,
Patrick
Per this comment #8 (comment).
The current behavior of tiled-loader
is to make this layer invisible and use it strictly for collision. We may want to consider adding a flag of some sort to the collision-tiles
component or give the collision-layer entity a render-debug
-like component to make it visible during development.
I'm having an issue getting audio to play on mobile devices. I tried running the mookie example provided to find differences in what I've implemented vs what's in the example, but audio for mobile doesn't appear to be working for the example either. Also, I began development of my project previous to the update that included the new version of create-js so that code isn't in my project. I think if I could identify what was acting up in the example, I could apply that solution to my own project. Thank you for your help,
Patrick
I noticed a few places in the wiki where references are made to old "src" folder structure.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.