Ytyse

Members
  • Content Count

    11
  • Joined

  • Last visited

About Ytyse

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi everyone, Anyone knows how i could convert a object layer from tiled(with rectangle, circle...) into a P2 object/sprite or whatever ? I would like that my player can check if there's an overlap with theses objects :/
  2. Hello guys, I'm making a plaformer, and I use the tiledmap plugin (https://github.com/englercj/phaser-tiled) to have best performance on mobile(and it works). There's always a black space below my tilemap : And when I test it with mobile dimension, it looks like that : I wish I could fill my canvas full height with my tilemap with any device, without "y-axe scrolling" or black space. When I try to scale my layer : var winW = window.innerWidth; var winH = window.innerHeight; var height_of_game_in_pixels= 1536; //24tiles*64px var SCALE = winH / height_of_game_in_pixels; map = game.add.tiledmap('mario_niveau_1'); that.game.physics.p2.convertTiledCollisionObjects(map, 'essai1'); layer = map.layers[0]; layer.scale.setTo(SCALE,SCALE); layer.resizeWorld(); It's cropping like that... In addition, How can I scale my objects layer for my collision ? Tiled view of my layer : Any ideas ?
  3. Hello there, I'm making a plaformer, and I use the tiledmap plugin (https://github.com/englercj/phaser-tiled) to have best performance on mobile(and it works). But, does anybody here knows how can I resize my layer like the original function : "layer.resize(x,y);" ? I wish I could fill my canvas full height with my tilemap with any device. In addition, How can I scale my objects layer for my collision ? Any ideas ?
  4. Hi everyone, I'm making a platform game for mobile(crosswalk, cordova). Everything works great on my computer, but when I import my game on a smartphone and I move my player to scroll my map, it's really jerky... :/ I have like 3-4 parallax in the background who works really good with any movement of my player, but my principal tilemap with collision seems to be the problem here. I tried to resize everything, even with 32x32px tiles and 512px height (16 tiles of height), it's jerky again. Any ideas ?
  5. It should help : layer.resize(width,height);
  6. Hi everyone, I'm trying to make a platformer who can run on any smartphone. I have a tilemap with theses features : - 40 Tiles heights -100 Tiles widths - Each tiles is 64x64px. To calculate my scale I simply use that as reference : var SCALE = window.innerHeight/ 2560; //64*40 = 2560px, the height of my tilemap I already made a platformer with 16x16px tiles and every scale worked very well, so i just copy paste that simple code : map = that.game.add.tilemap('objects'); map.addTilesetImage('items', 'tiles'); map.setCollisionBetween(0, 16); that.game.scale.scaleMode = Phaser.ScaleManager.RESIZE; layer = map.createLayer('mario_niveau_1'); layer.debug = true; layer.setScale(SCALE,SCALE); layer.resizeWorld(); That's work when my SCALE is better than 1 but not when it's less. My collision are always good, but the map don't show up like you can see below Any ideas ?
  7. Hello, I'm trying to make a game with Cordova. My game works perfectly on my Chrome Browser with a WAMP, but there's no server running in my app cordova. Two solutions : -How can I implement a server in cordova to run my game ? or -How can I run my game without a server ? Any ideas ?
  8. Ytyse

    Why Pixi.js ?

    Thanks for your answer, it helps me a lot
  9. Hello everyone, I'm a French Student in an Engineering school and i need to find the best way to do some animation in HTML5. It seems there's three principal tools : Canvas, SVG and WebGL. According to my recent research, Canvas is more for dynamic animation, if i need to refresh a lot of sprites, etc etc... ,SVG more for graphics, charts and pre-programmed animations and WebGL for 3D. (Tell me if i'm wrong, because i feel like Canvas and SVG can do SAME, i can't see a real difference except about performance) I saw there's a lot of library for Canvas(Pixi.js, Fabric.js, Easel.js...). But what's the "real" difference between them ? Is there a benchmark for that ? Is there a list of features of Pixi.js for example ? I search something concrete to compare theses libraries. If someone could answer that Sorry for my English, Ytyse