8bitdna

Members
  • Content Count

    70
  • Joined

  • Last visited

  • Days Won

    1

8bitdna last won the day on June 24

8bitdna had the most liked content!

About 8bitdna

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 8bitdna

    UWP Hosted Apps / Edge Stuttering

    Seems that way. Take your Gamepad example and run in on the Xbox or Edge, you'll see the janking. Then remove this code from you Gamepad plugin and try again, janking gone.. for (var i = 0; i < gamepad.buttons.length; i++) { if (gamepad.buttons[i].pressed && !pad.buttons[i].pressed) { this.pressed(i, gamepad.index); } else if (!gamepad.buttons[i].pressed && pad.buttons[i].pressed) { this.released(i, gamepad.index); } pad.buttons[i].pressed = gamepad.buttons[i].pressed; } An looking at that code I can't believe it has a significant impact on performance hence why I was thinking Edge issue, see what I mean? I'm not that much if a JS expert to profile it properly etc, maybe its something else but the Gamepad example hardly does anything (in terms of resource hungry things and a need for performance) so it seems a coincidence.
  2. 8bitdna

    Xbox Panda Remote

    Me neither, can only assume it was something with Edge / UWP. I 100% tried the gamepad sample and had the problem so not sure. For the janking try removing your state collection of buttons specifically in your gamepad plugin, you'll see it gets better instantly. Very odd.
  3. 8bitdna

    Xbox Panda Remote

    window.history.back(window.history.length); Took me back to connection screen. window.addEventListener('keydown', function(event) { event.preventDefault(); console.log(event.keyCode); }); Gave the following keycodes... A-195 X-197 LT-201 RT- 202 Also, A + X + LT + RT has started to work again and gets me back to the connection screen. Probably from a newer Edge version and change there due to updates and the 4 months in between me asking for help and now. The janking is still there from my other thread.
  4. 8bitdna

    Any ideas on how to create a U shape / horseshoe polygon?

    drawPolygon can do it as well but you'll need to engage some maths, would be easier having things like the bezierCurves at hand for sure like @Wolfsbane's example.
  5. 8bitdna

    Any ideas on how to create a U shape / horseshoe polygon?

    Not sure if Panda exposes its canvas 2D context but that might be a route for more flexible drawing. Pretty sure you would lose the automatic scaling and things like that though @Wolfsbane agree 100%, this is one for @enpu to help extend the Graphics API with a few more features.
  6. 8bitdna

    Any ideas on how to create a U shape / horseshoe polygon?

    Panda uses the canvas drawing API in the background and it looks like it actually closes off the path to not form an 'arc' but a 'piechart'. Go here.. https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_canvas_arc Change the '2 * Math.PI' to '1 * Math.PI' and you'll get the shape I think your looking for. If thats what your looking for give me a shout and I'll look into the sourcecode.
  7. 8bitdna

    Any ideas on how to create a U shape / horseshoe polygon?

    Looking in the source code SVG's seem supported. Could you draw one externally and load it in, does that work?
  8. 8bitdna

    Xbox Panda Remote

    @enpu Is the Xbox still supported in panda? Not getting any help on my issues regarding it and want to consider it as a deployment option. I still see it advertised on the Panda website, can you confirm please.
  9. 8bitdna

    UWP Hosted Apps / Edge Stuttering

    Yep, new array every frame and yes happens on desktop Edge. Try out your Gamepad Plugin example on Edge with an Xbox controller if possible, you should see the 'janking'. Then change the code to what I did and you'll see it improve but then get little frame rate drops, that could be the garbage collection though from the new array etc. I'm no JS expert, is there a way to create an array once and copy the contents of gamepad.buttons into it every frame so we don't create the garbage? I think every time you look into the gamepad.buttons[x].pressed prop it triggers a request at the hardware for ALL buttons state with edge, so as you iterate around the loop its slow, thats the only explanation I could think of! Shouldn't be like that though according to the official Gamepad HTML5 spec, looks more like an Edge bug.
  10. 8bitdna

    UWP Hosted Apps / Edge Stuttering

    Hi All, Any game I run in Edge or UWP hosted apps has a horrible frame drop every few seconds. This is specifically when using the Panda 2 Gamepad plugin and looks like its down the button state management in the plugin and Edge probably requesting button state each time and it being slow. This code... for (var i = 0; i < gamepad.buttons.length; i++) { if (gamepad.buttons[i].pressed && !pad.buttons[i].pressed) { this.pressed(i, gamepad.index); } else if (!gamepad.buttons[i].pressed && pad.buttons[i].pressed) { this.released(i, gamepad.index); } pad.buttons[i].pressed = gamepad.buttons[i].pressed; } I've improved things a lot by taking a copy of the state and working with that like this by adjusting the plugin code like this... var clone = gamepad.buttons.slice(0); for (var i = 0; i < clone.length; i++) { if (clone[i].pressed && !pad.buttons[i].pressed) { this.pressed(i, gamepad.index); } else if (!clone[i].pressed && pad.buttons[i].pressed) { this.released(i, gamepad.index); } pad.buttons[i].pressed = clone[i].pressed; } I still see a little frame drop (not as bad) every few seconds though on Edge and UWP hosted apps. This is running the Gamepad plugin example with no changes other then the above. Tried a bunch of random HTML5 games on the interwebs and they all seem ok, any ideas?
  11. 8bitdna

    Xbox Panda Remote

    Any update on this? Don't worry about the cursor, I actually fixed this on my own UWP, just can't get back to the connection screen.
  12. 8bitdna

    Panda 2 Roadmap

    @enpu Fantastic addition
  13. 8bitdna

    Panda2 Editor: Editing/Adding Assets

    Sounds good, as long as you could quickly flip around things it would be a really useful addition. @enpu Ah, ok. I was asking as TypeScript is easier to offer smart auto completion, code hinting and inline docs which would help get a quick bit of knowledge on something instead of hunting off for it. Understand what your saying regarding the compilation though. Taking a whole big step back I quite often look at the API docs but don't find the info I want a lot of things are blank or have placeholder type comment and not explained in full. I then go off to look at the examples or engine source code to learn about a feature which can take some time. Fleshing out the API docs with more little examples inline would be a great addition IMO. What would also be really useful is a proper 'guide' to Panda2. I like having concepts explained so I know why I might use a certain approach over another and find it sticks better for me in my head, it might just be me!
  14. 8bitdna

    Panda2 Editor: Editing/Adding Assets

    Reading @pstrejczek post got me thinking about what I do a lot, which is flipping between the examples, API docs, engine code, other projects to find snippets, bits of info and so on. I'm not sure what the best solution is but looks like we all do it one way or another! @enpu Does Panda2 support TypeScript at all?
  15. 8bitdna

    Panda2 Editor: Editing/Adding Assets

    I like the idea of being able to select what engine version I'd like when starting a new project or updating one. If there's ever an engine code regression or specific need to stay at a certain engine version its easy to do then? *EDIT* Then again when you throw all the plugins into the mix there might be incompatibilities with this. Latest is always greatest hahaha