rich

Pixi.js has landed

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 :)

Share this post


Link to post
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 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.