Jump to content


  • Content Count

  • Joined

  • Last visited

  1. nvm It was a problem with the server serving the static files (textures).
  2. So I'm working on my game editor, and I noticed a weird behavior: after I play around with tiles and objects (eg draw different tiles, add trees rock etc. and then delete them, move objects around..), at some point PIXI will get into a state where its no longer able to load new textures. I don't preload all my object's textures, I load only for objects when I need them (if for example I want to put a barrel and don't have its texture loaded yet, I will load the texture especially for the barrel instance). When getting into the stuck mode, all future textures I load will never actuall
  3. answering self: looking at PIXI code I saw that when rendering on texture they have these lines: // reset the matrix of the displatyObject.. displayObject.worldTransform.identity(); displayObject.currentBounds = null; that reset the container transformations, but I don't see them updating transform after that. however, later they do: for (i = 0, j = children.length; i < j; ++i) { children[i].updateTransform(); } So what I ended up trying (and it worked): I pushed my container into another empty container, and I rendered the parent container on the texture. This wa
  4. I try to render a container over a renderable texture, but the container transformations simply do not apply on the sprites inside. You can see it happens by taking the following code: var renderer = PIXI.autoDetectRenderer(800, 600,{backgroundColor : 0x1099bb}); document.body.appendChild(renderer.view); // create the root of the scene graph var stage = new PIXI.Container(); // create a new Sprite using the texture var texture = PIXI.Texture.fromImage('_assets/basics/bunny.png'); var bunny = new PIXI.Sprite(texture); // move the sprite to the center of the screen bunny.position.x = 200;
  5. Well looks like its working. Thanks a lot! EDIT: PS it appears to be working even if I do visible = false, but that's OK for me. (as a test I override this function on a single sprite and not in the prototype, and I see that its keep getting called even after setting its visible to false)
  6. sounds good, but will it always be called? or are there conditions where matrices are stored in cache and it will no longer be calls as long as the sprite remains static? thanks!
  7. Well title pretty much summarize it.. I want to attach a callback that will be called every time a certain sprite is rendered. What's the best (pixi-friendly) way to do it? Looking at the code looks like I could override _renderWebGL and _renderCanvas to first do what I want and then call the original function, but that's kinda ugly. Any ideas? Thanks.
  8. Hi adrigau, thank you for the feedback When I was working on my project I didn't know about sat-js (somehow I missed it in my search), if I did I could use it as a base and build my collision-world logic and simplified API as a wrapper over it. sat-js looks pretty good! I'm using this lib for a (hobby) game I'm working on, but it will take some time until it sees light. its basically a procedurally-generated endless top-down world, which I think is the best use-case for sscd: I totally agree about the tests, its a huge thing currently missing. I should also add some performance test
  9. Hi all, For one of my projects I wrote a smart & lightweight collision detection lib and decided to publish it. It's not a physical engine, its just the collision part, but made extremely easy and efficient. something like this: var world = new SSCD.World();world.add(new SSCD.Circle(new SSCD.Vector(100, 100), 75));if (world.test_collision(new SSCD.Vector(105, 125))){ alert("Yeah!")}Key features: Collision detection with the following shapes:PointsCirclesRectanglesLinesLine strips (for complex shapes)Composite shapesCollision-World manager to hold and manage all collision shapes.Grid
  10. hi guys, thanks for the feedback! +5 for code exploration it will work in the sandbox but in real battles on the server it runs differently so it won't work. nice idea thought thanks for the feedback. you are right, those functions are too long and annoying, I will change them next time I'll update the code
  11. Hello all, I would like to show my finished web game - NessBots! In this game you design and code a robot (in JavaScript), and send it out to fight challenges and other players. This is a programming game/challenge. You can check it out here: www.nessbots.com you can check it out without registration (a mini-sandbox in the main page), but registering is very simple and easy and don't even require a real email (no confirmation), so please register to have to full experience of creating a bot! I'd love to get some feedbacks and opinions about the game. thanks!
  • Create New...