Jump to content

Pixi.js has landed


rich
 Share

Recommended Posts

Cool! lets hope it'll give you more frames! let me know how it works out for you :D

 

I'm writing a new renderer for my engine based on pixijs :) ... but I'm facing little problems (it's due to my specific case not to pixijs ;) ).

1 - To render isometric scen correctly, I have no choice but to clear the whole stack and redraw it ... the only solution I found with pixi is to remove all stage children and recreate them. (to understand those constraints take a look at a proto I made here : -demo.ezelia.com  use any username to connect)

2 - Did I missed something or there is no drawing primitives in pixijs ? (drawRect, drawCircle ....) I know those are specific to canvas but is there an abstraction layer to make them available to both renderers ? ... I'll ignore those for a first implementation and will add them later. 

 

I'm not good at WebGL but if I have some spare time I'll try to add some drawing primitives to pixijs if it doesn't exist yet :)

Link to comment
Share on other sites

exciting stuff! the prototype looks really promising, I do love a good isometric game!

 

I would suggest that removing and adding all your elements each frame is definitely not the best way to do things. Most of the depths for your clips do not change frame by frame, so an efficient way to implement the depth-sorting would be to only swap the depths of the elements that changed.

 

With regards to drawing primitives, pixi.js does not have that functionality just yet, its mainly an image based renderer at the mo. It definitely sounds like a great feature to add though.. I'll pop it on the list of todos.

 

Of course I would also be more than happy if you or anyone else decided to help out with adding the functionality. Thats the magic of open source, we are all in it together! :D 

Link to comment
Share on other sites

yeah I know my aproach is not optimal :D but it's not that simple to handle a constant number of elements on the scene.

depths doesn't change frequently but I have to deal with camera and continues scrolling stuff ... each time the player move, I have to move the camera and load adjascent maps (actually the world is composed of 32x32 maps witch are loaded on the fly)...

anyway ... I'll not take your topic to speak about my project xD .I'll post a demo as soon as I have a pixi renderer ready :)

and maybe implementing a drawing API is a good exercice for me to familiarise myself with webGL :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...