jinzo7

Members
  • Content Count

    18
  • Joined

  • Last visited

Posts posted by jinzo7


  1. Hello, everyone!

    Im interested in creating instant games for facebook. There are a lot of content in facebook sites. Really a lot of. Im confused a bit.

    Substantially I have an idea about a card game from my childhood and I want to implented it for facebook. For me - I am pixi game developer and I know how to "backending". LOL!

    I have few questions before step in to the deeper facebook documentation. The questions are the basics so it can be helpful for everybody.


    The questions:

    • Can I use pixi? Yes! But is it a good idea ?
    • Is there anyone that earn from the instant game and how ?
    • I want to make it multiplayer.  What facebook offers for multiplayer gaming ? 
    • Are there any tutorials, examples and so on ?
    • What I have to focus? I mean I will create the gameplay easy and then what? Sure Ill follow the best practices given from facebook but are they hard - the all in-game games,bonuses and so on? Can I release firstly a poorer game and than release next versions ?  
    • What you are going to advice me before start learning the apis, creating the game and etc ?

    For now Im not sure how the end looks like but Im going to try. Also I think the post will be helpfull for every beginner in the area. I will follow, update and comment the post often as possible. So lets do it,  guys! 
    Thanks !


  2. 21 minutes ago, ivan.popelyshev said:

    Yeah, we know of that problem. We even want to make example like that soon, because v5 is ready and its time to cover it with tutorials.

    Its difficult to make if you dont understand how exactly PixiJS Transform works (almost the same as Flash transform). `width` and `height` are secondary calculated properties, be vary cautious if you use them! If you dont know how exactly PixiJS reflects "I want this element to have 100px width" - dont use it.

    There's no layout engine inside PixiJS.

    There are hundreds of ways to make a mistake in your case. My telepathy doesnt give any answers except "he uses "width" somewhere wrongly", maybe you should post the full demo. Again, the time of response depends on how clear you make it. Big demo = wait for a month before someone gets it. Small obfuscated demo = week. Small demo = day or two.

    Thanks for the answer !

    I will continue to try tomorrow and will post some demo next days regardless of the success/fail.


  3. Hello, nerds ! Happy v.5 release also !
     

    So I`m making pinch to resize(zoom like), stretch and shrink(which is basicly resizing to constant values) over class that extends Sprite or Container. I`m not defently sure what I should extend. 

    My class has methods resize(newWidth, newHeight), stretch() and shrink() . For ease I will call the class Player which extends Sprite or Container with the 3 additional methods. 

    Everything was okay when the parent was Sprite with texture. Then I had to add as child different sprites. So the composition went complex and the algorithm went to the trash.

    The composition is:

    • Player - extends Sprite or Container, methods resize(newW, newH), reposition(newX, newY), stretch(), shrink(); 
      • Background1 -  extends Sprite, has texture; visible only when stretch() is called; size - 50x50
      • Background2 - extends Sprite, has texture; visible only when shrink() is called; size - 100x100
      • Video - extends Sprite, has texture; always visible; initial size - 500x500
      • Label - extends Sprite, has texture; visible some times only; size - 70x70
        •  Text 

    1. At the begining the Player instance has to be shrinked. So the size has to be 50x50. If user tab it, it has to stretch with size 100x100.

    2. If user use pinch when it is stretched it has to resize.

    The question is: 

    In my methods resize(newWidth, newHeight), stretch() and shrink() which children I have to scale, change width and height and so on. 

    Where the factors are -  the Background sprites are with different sizes and changing its visibility and the Video sprite is with bigger size than the need.

     

    Additional(useless):

    I tried a lot of things but there is no success. And maybe I`m wrong with something small. If the problem is not clearly defined I`ll make changes! Thank you very much !


     


  4. 52 minutes ago, Exca said:

    That looks like a CORS problem. Can you check what network headers the video (and possibly related preflight request) have in relation to access control?

    The only headers I can access is the updgrading protocol request/response (from http to ws) wich does not contains any valuable information. After this the connection is opened between my client and the server. The client receives only socket messages like stream events - PLAY, FAIL and etc.

    I cannot inspect the WebRTC headers and messages at whole. Also cannot find any tool that can do this.

    The problem is happening very rarely and it is in Firefox only. So in one moment I decided to stop believing it is CORS problem for that reason.

    And only WebGl has problem. The stream(video element) is not failed or something.


  5. Hello!

    The project is old so PIXI v.3.0.11 is used.
    For streaming - Flashphoner via WebRTC

    Steps to reproduce


    1. Start video stream in html video element - stream.start(myDiv) which creates streamVideoElement in myDiv

    2. When stream fires STREAM_PLAYING event the method PIXI.Texture.fromVideo(streamHtmlVideoElement) is called and the returned texture is set to the specific PIXI.Sprite instance.

    3. Somewhere after this the Firefox browser receives error thrown by WebGl:

    Additional information

    • The problem is happened very rerely
    • Only Firefox
    • Stream(video element) is not failed after the error
    Quote

     

    SecurityError: The operation is insecure. pixi.js:14771

        updateTexture pixi.js:14771
        renderBatch pixi.js:18735
        flush pixi.js:18661
        renderWebGL pixi.js:7724
        renderWebGL pixi.js:7769
        renderWebGL pixi.js:7769
        renderWebGL pixi.js:7769
        renderWebGL pixi.js:7769
        renderDisplayObject pixi.js:14682
        render pixi.js:14655
        animate Stage.ts:385
        animate Stage.ts:388

     

     

    In the PIXI source code that means:

    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, texture.source);

    What we tried

    • tried to set  video.crossOrigin = "anonymos" to the video element but no success.
    • tried to dispose video like video.src = "" and etc according some advices related to the localStorage caching

    I know it's not directly linked by PIXI but still I need help.

    And the image of the current block when exception was thrown.

     

    img_issue.jpg


  6. On 9/8/2018 at 6:31 PM, Taras said:

    Has any body experience with setup unit tests for game based on Pixi + typescript + webpack?
    Some examples, seed projects, tutorials?

    I used mocha. But with namespaces, not with modules in typescript. Yes the problem is in your tsconfig. There are tutorials for that in the net, Im sure. 
    And when you are in the browser why using typescript modules ?
    Next week maybe I will ask friend that played on webpack, ts modules, unit tests and etc over PIXI and typescript and we will post some answer here.


  7. Hello, PIXI friends!

    Still PIXI on the top ofcourse, our team is going to migreate the apps from 3 to 4. And we like very much PIXI.

    The exploring(chill) time comming for us and it is it time to form everything better.

    When version 5 will be stable? Why it is better ? It has better performance?  We need to know everything, I need! LOL! Is version 5 is going to have good support of PIXI-Animate(Adobe animate) ? Tell me everything, please!
     


  8. Hello,guys!

    In the old days you remember Flash/AS3. There were free Flashdevelop IDE. It was perfect. You use all libraries in flash with perfect auto-completion, perfect debuging and so on.

    When flash is old and grumpy now every work with it is stopped of course.

    The perfect substituent of AS3 + Flashdevelop IDE we explored is Typescript + PIXI + Webstorm + Typescript namespaces - okay.

    But typescript + webstorm are made for angular applications so you understand there is bunch of problems.

    We were under pressure and had to create everything fast. Now we have time to explore for the best solution.

    Big games/applications can be made of pure javascript and it is trash - our opinion and experience.

    Can you tell your opinions, your experience, best practices and so on on Typescript, PIXI , IDE, other libraries and so on ?

    Lets make better code! 


  9. Hello, developers! 

    I am wondering about PIXI v.3 or v.4, how much they can live and work on the internet.

    Imagine now I start big project on v.3 or v.4. This project should be licensed with little exceptions.

    Should I extract the whole code related to PIXI(my view) to be specially maintained over the time?

    What is the experience on similar cases?

    What is the risk? 



     


  10. Hello !

    In PIXI v4, you dont need to call requestAnimationFrame().It is called internally and the renderer renders app.stage (PIXI.Container) instance.

    1. Create PIXI.Application instance :

    var app = new PIXI.Application(800, 600, {backgroundColor : 0x1099bb});

    2. Append the  view of PIXI... app.view is your HTMLCanvas (canvas2d or webgl renderer). So you need it in your DOM.

    document.body.appendChild(app.view);

    3. Use the stage(app.stage). Its PIXI.Container type. And Its your root container to add other containers(PIXI.Container) or sprites(PIXI.Sprite) and etc.

    var bigRect = new PIXI.Graphics();

    bigRect.beginFIll(0x00ff00);

    bigRect.drawRect(0,0,500, 500);

    app.stage.addChild(a).

    Or follow the first example: http://pixijs.io/examples/#/basics/basic.js .

    And after this create other containers,graphics,sprites and add them to the stage or make composition.

    In PIXI v3, you have to call manually requestAnimationFrame()  and tell PIXI.renderer to render some container. And no random but your root container(PIXI.Container). The renderer renders the root container and all its children in order.

    The same is in flash,pixi and every child-based rendering.

    If you are new to PIXI - use v4. Anyway v4 is good to be used for learning or commercial products.


  11. 35 minutes ago, Asisvenia said:

    I agree with you. For a person just like me, Phaser or other frameworks would suit better. But also coding with pure JS, may improve our JS knowledge much better because we'll face many problems and get a chance to design our project structure as we want. Thank you for your answer.

    Okay. Maybe for small project, that should run in Your browser and maintiance is not needed, practice js on it.

    But when  you deal with bigger project and  have to solve real problems like maintability, reusability,cross-platform, design at whole,.., you need really good practice and experience. If you are not new kind of genius you have to trust on the patterns. 

    For me, Im in the level that I can create everything in some ways.  I can do good design based on other similar solutions. A lot of people stuck on that level of skill.Long time I asked myself how to do it right. I read a lot and reached that point - it is easy to  coding and it is hard to create  good, clear, design(application). And to create good, big application you need experience on many projects,frameworks, patterns,libraries. When just understand some principle in good code, you absorb that part in abstract way and can solve similar problems with it. 

    I want to say this is it but it is too complex. Dont waste too much time on that skill(js syntax or similar easy steps).Be more constructive.
    Good luck. Im curios about the end result.


  12. Hello.

    My suggestion if you arent guru use frameworks. And gurus using frameworks also.

     

    Now on plane javascript u have to care about many factors: canvas,webgl,resolutions, engine design, game design, resouces, .., a lot of other problems which are solved by ways smarter and experienced people than you. 

     

    Also by using frameworks you are learning different patrerns and ways to solve certain problems.

     

    In your case PIXI/Phaser can do more, based on performance and ease of development.

    Im not a guru but I have some experience. Fix me if im wrong.


  13. Hello!

    In the age of flash there was a well-known MVC frameworks. A lot of small and big, 2d, event-based games, portals, apps are built upon it. And now flash is almost dead. But the people and companies still has the same needs from that kind of content (games, engines, portals, ..).

    Our team found a very similar solution PIXI + custom MVC + Typescript. PIXI is so web and we have to maintain PIXI - a problem. 

    1. What framework should be used to create an event-based game today? Phaser - no. It's big for games without any physics and no onFrameUpdate needs ?

    2. Is there out any new framework/approach to build and structure that kind of applications ?

    3. Do you have some good ideas at whole?

    Give more ideas, solutions, best practices on web and etc. Thanks !