Jump to content

Search the Community

Showing results for tags 'matter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 21 results

  1. I've been looking through the examples, but there's nothing that does what I'm looking for. I have circular matter bodies with the texture of a ball. How do I put text on top of these balls while keeping the body round? I've looked into containers, but it only seems possible to have them in rectangular shape. I'm thinking whether generating my own sprites with the text already embedded there would be the best option. It's not that straightforward as the text/numbers/symbols I'll be presenting there will be fed by an API, so I can't generate the sprites beforehand.
  2. I wanted to share a Phaser 3 game I’ve been working on. The entire game is made on my iPhone with Textastic and a vector drawing app, so there are no keyboard inputs. The controls are fairly simple. Just slide your finger left or right to move, and you can either swipe the same finger to jump, or swipe with your other hand while running. To climb the rope, you just have to slide up or down; and to swing, slide left or right. To enable the slingshot, click on the character, pull the rock back, and let it go. When you start to fall in the hot air balloon, hold your finger on the screen and it becomes an “endless runner” until 3 birds fly by. This game is not anywhere near completion, and I imagine it will take several years to finish it on my own. The animation is not great, but I have downloaded DragonBones and will be trying it soon. I hope you like it, and please let me know what you think. Thanks! https://cannabijoy.com/matter.html FullSizeRender.mov
  3. Squid Books is looking to augment its team to build physics based games in PixiJS and MatterJS. Squid Books is an educational platform aimed at making Science accessible. At the core, there is a flexible reader whose learnings are strengthened by surrounding quizzes, videos, and word games. The next initiative is to build games demonstrating NGSS’s Earth and Space Science concepts. We are looking for part-time to full-time contractors/consultants which can lead to salaried employment. ~Additional Information~: - Website: https://squidbooks.com/ - SAAS Vendors: Google Cloud Platform, CircleCI, Sentry, Atlassian - Frameworks: React, Express, Cypress, Storybook, PixiJS, MatterJS Please email DM or email us at [email protected].
  4. Hello, I'm using Phaser 3 and the physics engine matter. I need to call a function when one object collides with a particular object. For example I have a tank, barrels, hearts. Then there will be bullets, other tanks, some other objects. You need to call the function when the tank collides with the barrel, it should explode, and if it collides with the heart, it will replenish life. this.matter.world.on('collisionstart', function (event) { bangBarrel(); }); this method calls the function in any collision. How to trigger the function when the tank collide with the barrel, and how to trigger the function when the tank collide with the heart?
  5. I tried to create a Level with tilemapLayers. After adding everything. I try to display the debugGraphic. It only shows the Ball with a debug circle and the loaded Layers. But it only shows the image no bounding boxes or something like that. Does anyone see the problem here? preload() { this.load.atlas('kugellabyrinth', 'assets/Kugellabyrinth.png', 'assets/Kugellabyrinth.json'); // this.load.tilemapTiledJSON('map', 'assets/map.json'); // this.load.image('walls', 'assets/Walls.png'); this.load.tilemapTiledJSON('map', 'assets/rpg_map.json'); this.load.image('walls', 'assets/[Base]BaseChip_pipo.png'); console.log('preload method'); } create() { this.matter.world.setBounds(0, 0, 512, 512, 32, true, true, true, true); console.log('create method'); this.map = this.make.tilemap({key: 'map'}); this.tileset = this.map.addTilesetImage('RPG Set', 'walls'); this.floorLayer = this.map.createDynamicLayer('Floor', this.tileset, 50, 50); this.wallLayer = this.map.createDynamicLayer('Wall', this.tileset, 0, 0); this.wallLayer.setCollisionByProperty({collides: true}); this.matter.world.convertTilemapLayer(this.wallLayer);this.matter.world.convertTilemapLayer(this.floorLayer); this.matter.world.createDebugGraphic(); this.kugel = this.matter.add.image(48, 48, 'kugellabyrinth', 'Kugel.png'); this.kugel.setCircle(this.kugel.width / 2, { restitution: 1, friction: 0.25 });
  6. Hi, I was using matter physics and tried to check collisions from a lot of objects and then I got some issues. The problem: I have a lot of objects (called them "luz" in the code) and I want to release them on air and making them fall. Then when they touch the floor I want to trigger something: - if it is a even object: I want to reduce its Alpha to 30%. - if is an odd object: I reduce their scale by half. Currently I'm handling this situation in my real project by checking update() { if (luz[i].y > floor.Y) { /* do something */ } /*...*/ } but I'm looking for a better and more flexible and robust solution. So here is my code: class GameScene extends Phaser.Scene { constructor () { super('GameScene'); } preload() { this.load.image('luz', 'luz.png'); } create() { // create elements on air for (var i=1; i<=7; i++) { var luz = this.matter.add.image(i*100 + 10, 50, 'luz') luz.body.label = i%2 == 0 ? "even luz" : "odd luz" } // add the floor this.matter.add.rectangle(400, 550, 800, 50, {isStatic: true}).label = "floor" // check collisions this.matter.world.on('collisionstart', function (event, object1, object2) { // this only prints the first object console.log(object1.label + " collides with " + object2.label) switch (object1.label) { case "odd luz": object1.gameObject.alpha = 0.3; break; case "even luz": object1.gameObject.setScale(0.5); break; } }) } } Live example here: https://codepen.io/akuma119/pen/zYvKzgW Video showing the problem: https://i.imgur.com/jU7UiaW.mp4 My questions are: - Am I handling collisions correctly? is this the proper way? - Should I implement my own collision checking system? - Is checking by label a bad design/practice? Thank you for your time and help!
  7. 1-) I am new at phaser and I look for phaser3 Matter physic tutorials. 2-) Is there a way to search in phaser3 tutorials. It is too hard to find proper tutorial. https://phaser.io/news/category/tutorial
  8. Hey everyone, I looked around for details on this but I am trying to determine the difference between the Physic types: Arcade, Impact, Matter to see what would be best for my type of game or to experiment with. I read in the Dev blogs that "Arcade" was meant for very simple physics in a game, while somewhere else I read that "Matter" was meant for debugging... I would like to know what the real differences are and which would make the most sense for a given game type. Does anyone know what the differences between the Physic types are? Thanks!!!
  9. I am starting out with Phaser/ Phaser 3, so bear with me. I am trying to make a mobile game with viking ship going up a river. the ship will always be moving forward, I wish to have a virtual tiller which the user will touch and drag to angle the ship left and right. I.e Changing the angle which the tiller is displayed on the screen, the more severe the angle the faster the boat will turn. Currently I change direction with the arrow keys on the keyboard. I tried adding it as a button, but got the error message add.button is not a function. Can anyone suggest where to begin this process? i.e add the tiller and allow it to tilt (I will be recording it's angle to determine how much to turn the boat). Attached is a image of the what I mean by tilting.
  10. Hi! I'm doing a school assignment about Phaser and I was wondering can someone explain the differences in Phaser 2 and Phaser 3 physics engines? Phaser 2 has: Arcade, P2 and Ninja physics and I know pretty much the differences in them. Phaser 3 has: Arcade, Impact, Matter and Multi physics, I guess the arcade is the same as in Phaser 2, but what about impact and matter? Can someone smarter than me explain how these work? Thank you in advance!
  11. Hi, I would like to have two cards that when they collide with each other they would rotate in an analog way of the ones you can see in the attached video. This is the first part of the code: var config = { type: Phaser.AUTO, width: 800, height: 600, backgroundColor: '#1b1464', parent: 'phaser-example', physics: { default: "matter", matter: { gravity: { y: 0}, debug: true } }; scene: { preload: preload, create: create } }; var game = new Phaser.Game(config); function preload () { this.load.spritesheet("controllers", "assets/sprites/controllersSheet.png", { frameWidth: 100, frameHeight: 100 }); } var controller = []; function create () { this.matter.world.setBounds(); controller[1] = this.matter.add.sprite( 400, 100, 'controllers', 0, null, { restitution: 0, friction: 1}); controller[2] = this.matter.add.sprite( 400, 400, 'controllers', 1, null, { restitution: 0, friction: 1}); Then I am having some issues because with this next code they move as I'd like, but they don't rotate: controller[1].setInteractive(); controller[2].setInteractive(); this.input.setDraggable(controller[1]); this.input.setDraggable(controller[2]); this.input.on("drag", (pointer, gameObject, x, y) => {gameObject.setPosition(x, y); checkPosition();} ); this.input.on("dragstart", (pointer, gameObject) => { } ); this.input.on("dragend", (pointer, gameObject) => { } ); And with this other next code, they bounce all around and I can't find a way to make them stay fixed. this.matter.add.mouseSpring({ length: 0, stiffness: 0 }); If someone knows how to help me, I would be very thankful. mm.mp4
  12. Hello! I'm trying to make a game like raze (flash game from 2010~ish) and I currently have a level import system and moving animated sprite. I am using matter.js for the physics. I am also using phaser 3 v3.12 as tiled hit detection(? idk how to say) breaks in the the newer versions. I saw the demo for angle to pointer (http://phaser.io/examples/v2/arcade-physics/angle-to-pointer#gv) and wondered if something like it existed in Phaser 3. and also, it would be great if i could anchor a sprite onto another moving one (the weapon on the player) as then it would work, but idk how to do it as I couldn't find anything for phaser 3. Thanks for your help, I might not respond right away! AND here is my project link(so i can work on it on the multiple different computers that I have): https://codesandbox.io/s/k0mq2lj533 ~~~~technically I'm copying the code from the "making modular game worlds in phaser 3 part 5" demo, but this is how I get started on projects as I'm not good at setting things up!
  13. Hello, I am trying to imitate a rotating part (a.k.a. "windmill" please see this youtube video) using the Matter physics engine's constraint. I have tested a body shape made with PhysicsEditor and that of simple image shape (just a thin rectangle). The windmill made with PhysicsEditor keeps on rotating and it does not seem to stop until you give another collision to the body. Here is a codepen to demonstrate. https://codepen.io/BeFiveINFO/pen/EdQgdq Please try pressing space key for a second. Is there any way to control the behaviour of the body shape made with PhysicsEditor? Thank you for your help in advance!
  14. Hello, found a bug in the matter physics engine collision detector, I'm working with polygonal colliders. When an object collides with another and passes through it the "collision end" event doesn't trigger until de object is outside the real shape of the sprite (image size). I'm attaching a small video of it in which I'm logging the collision between the small vert of the triangle against the body of the other triangle, you can see how the "collision end" triggers when the vert enters and leave from the same side but not when it goes through it (until leaving the image size). Hope it helps fixing it! and if anyone knowns a workaround it would really help me. Regards. Edit: here's a small c9 demo (event trigger notification on console). https://ide.c9.io/mmolina01/phaser-matter-demo https://phaser-matter-demo-mmolina01.c9users.io/ collisions.mov
  15. Hi All, To wrap gameobjects around the screen for asteroids clone, I have used arcade physics from asteroids movement.js example. this.physics.world.wrap(sprite, 32); Do you know if I can find or develop a similar function that will work for matter physics? Something like... this.matter.world.wrap(sprite, 32);
  16. matterjs always set 1 for body scale parametr after setScale. And it's ploblem for reScale game object. Any solve for it?
  17. Jast4fun... My Ballz game implementation with Phaser 3 and Matter physics for PWA and Instant.
  18. Good day. I make pool with containers and i need add to containers matter body without add this in matter world. i do it through: this.container = getCustomContainer(this.pool) this.matter.add.GameObject(this.container) this.matter.world.remove(this.container) ...  this.container.SetBody(...) and it seems to me not right...
  19. ``` setColliders (x, y, side, index) { // collider a this.colliderA = this.scene.matter.add.circle(x - side * 150, y, 7, { label: 'collider_a', isStatic: true, }) // collider b this.colliderB = this.scene.matter.add.circle(x, y, 7, { label: 'collider_b', isStatic: true, }) // collider basket this.colliderBasket = this.scene.matter.add.rectangle( x - side * 73, y, 120, 30, { label: `Basket${index}`, isStatic: true, isSensor: true, }, ) } ``` which function will remove them ?
  20. I'm struggling with giving a Geom a Matter body, or with updating graphics according to matter bodies movement. I'm trying looping through all my Geoms, created from all my matter bodies, and then updating each with the position of the matter body and drawing it in to the graphics, but the results performance is really bad. Can anyone please provide me with an example? I found none at labs.phaser.io Thanks!
  21. Does anyone know how I can get the Matter physics engine to render its geometry when running within Phaser? I.e. when I'm not assigning a sprite to a physics body, but I want the geometry of the objects I've created to be rendered as lines instead. If I set "debug" to true on the Matter config, I can see purple lines being rendered by the debugger. But if I set debug to false, I no longer see anything rendered. I've found there are a bunch of properties on the Matter "Body" object like StrokeStyle, LineWidth and FillStyle (described here) which seem designed for this purpose. However, I can't see equivalents for those in the Phaser documentation, and when I set the properties on the Matter body directly they seem to have no effect. Am I missing some simple piece of config or setup that I need to do, or have I stumbled across a bug or unsupported feature?
×
×
  • Create New...