All Activity

This stream auto-updates     

  1. Today
  2. I don't think this is something the host can control, most of the games come from some sort of distributors that distribute these games and consequently control ads. Here is my 2 cents on the website OP. Most of these games that you have on front page I've already seen on other similar websites like poki, pacogames... If you'd want me to stay on your website, maybe recommend me some unique games that I haven't seen before (on the front page)? Here is also some quick little observations: - I have no idea where to register - Favicon isn't transparent and rather has white background behind the logo - -> I think these buttons (marked in red) should have a little padding from the frame? Hope you find tons of success!
  3. No, because I think that you'll have problems even if I do bigger snippet. Those are the basics of pixi transforms. or flash transforms. or other 2d renderers. Make a minimal demo on jsfiddle, pixi-playground or codepen - i edit it and fix it if you do it wrong )
  4. I guess in this case you have not defined explorer properly, so when you do explorer.x += explorer.vx; it must be throwing error
  5. thx,maybe I need to read the source code in depth🤔
  6. I have this slice of code which works but is throwing an error in the console. Uncaught type error. Cannot read property of x at undefined. I am using the game loop to move a sprite on its x and y axis. The code works but i get an error and I would be interested to know why. Also when i try to introduce, let state = play; so i can change the call that requests the play(); function to state(); my code stops working. I would like to be able to change the value of state so i can change which function I call by changing the value of state variable. Does any wise member know where i am going wrong? gameLoop(); function gameLoop() { requestAnimationFrame(gameLoop); //Update the current game state: play(); //Render the stage renderer.render(stage); } function play() { explorer.x += explorer.vx; explorer.y += explorer.vy; } Thanks guys.
  7. noone

    Texture aspect ratio

    Thanks for the reply ivan. Do you mind writing a code snippet on how do i got about it?
  8. pixijs doesnt have any resizing options to preserve aspect ratio. Usual stuff, after you load texture, just take "min(scale.x, scale.y)" and assign it to object scale.
  9. I'm creating a sprite with random width and height but when I load the texture it stretch and not keeping the aspect ratio, see it here. How can i fill a sprite with the texture but keep the aspect ratio?
  10. Yesterday
  11. Added:
  12. //<script src="pixi/spriteFromTextureAtlas.js"></script> I have this in my html file. Somehow these // were added at the start. I think i tried to comment out html like javascript, silly me. now when I remove them the console throws this error. spriteFromTextureAtlas.js:15 Uncaught TypeError: Cannot read property 'appendChild' of null. When i put the // back the script loads fine. Im wondering what is causing this behaviour. Thanks in advance Keith
  13. Hi everyone, today I've released a small library to create a "virtual joystick" for mobile devices. At every move it returns: angle: 0-360 direction: left, top, bottom, right, top_left, top_right, bottom_left or bottom_right power: 0-1 Screenshot: Demo: Source-code: Feedback always welcome! Hope you enjoy it!
  14. you can use Observe or this one is better, i using it with React, because everything is immutable (@read-only). Or in vanilla, but why reinvent the wheel? Actualy PIXI natively give you event for listen child's change, but not for props, or is missing in the doc. ! A PIXI guys can maybe fix me if am wrong. Note: Do not confused with the obsolete native version in Js vanilla, it was removed "You can use the more general Proxy object instead." is what @nx-js/observer-util do
  15. !!FirstLine!!! PIXI.Sprite.from is a function Callback and not function constructor. You should get a lint error ! Remove .from here the way
  16. those options people like to use, but on macs its extra problem. I mean that you have to make those things available for users. Its user problem whether to enable them on their computer.
  17. Thanks Ivan, Can you please elaborate a bit on this? Are you suggesting these options improve things for Macs?
  18. Was fun to play! I miss the arcade racing games I used to play in my younger days, and your game gave me back some of that feeling 😃 I know it's a casual game, but I would have liked more and longer maps, and additional customization.
  19. For me , what seem bad here, is you seem use React for your game and pixijs in same process! Try multi-tread your game, React is really heavy when update the Dom, is fine for app, but hell no for game engine!!! Maybe you block your principal tread. Node.js multithreading: What are Worker threads, and why do they matter? - LogRocket Blog look for worker_threads Worker threads | Node.js v15.3.0 Documentation this is old jsConf but also explain good js limitation callStack Also you can use the profiler to see why you get lag if React are isolate from your game. Look about your render durations and the Dom list elements impacted the ticks.
  20. I think you're taking too big a leap :) Maybe go with Phaser first, check out Emanuele Feronato's tutorials.
  21. Play It Now: Welcome to the Black Friday shopping spree. The Black Friday sale is here. Adorable Princess gets more excited about shopping on this day. She planned to purchase new brands of prom, urban and sport wears. But she is in confusion about which suits her perfectly. Help her and have fun!
  22. Thanks for your input @ivan.popelyshev 🙂 Using the pixi.js package (5.3.3, also tried with 5.4.0-rc.2) didn't work, even with headless gl imported before the tests, I may actually have to initialize headless gl somehow but I'm not sure how to provide it to Pixi. Tests are running well in WebGL with pixi.js-legacy, as a reference, here's my setupTests.js import "@testing-library/jest-dom/extend-expect"; import "@testing-library/jest-dom"; import { render, fireEvent } from "./test-utils"; import "canvas-prebuilt"; import "canvas"; import "jest-canvas-mock"; import "webgl-mock"; import "jest-webgl-canvas-mock"; I think I'll go with legacy for now and go back to pixi.js at some point if I ever manage to run my tests, maybe the 5.3.4 will fix that issue, it's difficult for me to understand why using legacy solved a problem linked to WebGL, I'll have to look into it more in the future.
  23. Thank you Ivan for all of your help and interest. I don't care about writing my own engine, I just need to start producing something. I want to mainly create a 2d platform game to begin with. I already know how to do all of this in plain javascript but I want to be able to put some more professional touches to the work and using a game engine or libraries seems to be the way to get things done quickly.Like animating a walk cycle. I have a simple collision library called bump by kittycat attack.He is also the author of the I am studying. It is for use with pixi. It is more or less the same code I was using before. I spent a couple of hours in pixi.js and already have sprites on the screen using a texture packer and json files to tell pixie what the sprites are. So i know pixi.js can get things done fast. I will carry on and see what I can get done. I was thinking though that as I am not writing my own engine that perhaps Phaser would be even quicker. It has level editor now. Your examples are very nice, you must be quite an experienced programmer. I want to start doing now. I have learned a lot from building array based games. So I know my work is not wasted. its a little disappointing that a lot of the logic i learned is not going to be very useful for pixi.js games though. Thank you for your help Ivan.
  24. I suggest that you look repos i mentioned, and try run those apps, it'll save you big amount of hours when you make your own stuff. Just in case you think I hate canvas2d, here is my old pure-js tilemap: . Its not the real thing i used in production back than, but its close.
  25. pixijs doesnt have collisions. I can tell you how its in general case, if you are writing your engine: you should put all physics in function in separate file. In case you use physics lib, this file will exist anyway Here another example for you: , see the entity logic , visual logic and phys logic are separated. Its ok to store x,y,rotation and stuff in your own Entity, and copy to/from pixi and physics.
  26. Ok thank you very much. So i will use pixi.js to build my sprites without 2d.arrays. . I will do it with texture atlas and json file. I already know how to do this. What about collision detection? If I have monsters pushed into an array can I use a for loop to check for collision with a player character like this maybe: for(var i = 0; i < hedgehogs.length; i++) { var hedgehog = hedgehogs; if(hedgehog.visible && hitTestCircle(cat, hedgehog) && hedgehog.state === hedgehog.NORMAL) { if(cat.vy > 0) { blockCircle(cat, hedgehog, true); hedgehogsSquashed++; squashHedgehog(hedgehog); } else { gameState = OVER; } } } I know the syntax would be slightly different but is this type of thing ok using pixie.js? I am very gratefull for your help Ivan
  1. Load more activity