Search the Community

Showing results for tags 'sprites'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

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 191 results

  1. AlexArroyoDuque

    More problems 1.1.3 to1.1.4, sprites position

    Hello! I am having several problems upgrading from version 1.1.3 to 1.1.4. Now I am not able to position some of my sprites in the game when they are created. They always seem to appear at position (0, 0). However, I have a group of sprites that are positioned correctly and I do not understand why. Here's the code from one of my sprites: preloader: this.load.spritesheet ('player', 'assets / character / player-sprite.png', 120, 180); create: this.player = this.game.add.sprite(200, 400, 'player'); this.player.body.gravity.y = 160; this.player.body.setRectangle (75, 160, 0, 0); this.player.anchor.setTo (0.5, 0.5); As I said, I'm having difficulties in changing version. I'm blocked. Any help would be great. Greetings!
  2. I've making my first game so far is great but I have a display problem. when I rotate the sprite it become's blurry, same happens on jumping and falling the sprite turns blurry. Can anyone help me fix it. I'm using Chrome with WebGl and WebAudio. is there anyway I can make the sprite to not become blurry...Thanks By the way Wonderful framework I started the styding and making the game last night and I'm closer to finished thank you. And from the google searching I see that the administrators (are those the creators?) are responding quickly... Just great keep up
  3. Telash

    parabolic knock back

    Hey guys, i'm fairly new to phaser, in-fact I am still mostly just modifying the tutoral star collection demo to see what I can do. I have successfully added a standard enemy which walks backwards and forwards on a set path, as well as a basic 3 life system, the problem I am having though is the generic parabolic knock back effect. Everything I try results in my player sprite either shooting off to the corner of the canvas or giving me some kind of weird zero gravity style knock back which looks plain odd. Does anybody have an example of how this works in phaser that they wouldn't mind sharing? (also if anyone knows anything about how to determine which direction the knock back should trigger that would also be great.) Thanks in advance guys
  4. rustymonster2000

    Need someone to make some sprites for my game

    Could anyone make some sprites for my WIP multiplayer shooting game. right now i need: a 32x32 main block sprite (you know like in mario where all the ground is just one major block) a 50x50 sword sprite a 20x20 Pistol and when i say the dimensions please know that that does not mean fill up the entire square it just to give some room for the things and i can will go back and make all the white spots, that are unfilled, transparent this is a 2d shooter so that is why all the sprites dont have a 3rd dimension
  5. DWboutin

    Button animation

    Hi, I want to create an animated button, how can i do it? Can i set some animations on the over, up and active states of the button? Thank you
  6. Benjans

    Performances questions

    Hi everyone, Just begining with Phaser, i love the phylosophy and how it works For my game, I'm drawing a big tilemap (100 x 100), adding static objects with no problems. Then I want to add moving objects, so I create a group and add sprites to the group, with a simple velocity. And... it doesn't work very well. It seems like each time a new sprite is attached to the group, the animation stops, then restart, so it's not smooth at all Maybe I'm doing something wrong, but I don't think so (i'm properly destroying objects). I tried with Tweens too, but the result is the same. You can check it here : http://benjans.byethost3.com/city/ Thank you for your help guys!
  7. robbo

    Sprite collision odd behaviour

    I have a platform style runner/scrolling game. The mechanic is if you get pushed off the left of the screen the game ends. I am using sprites as obstacles and as the floor (all square tiles assembled in a grid). The sprites are in a group and recycled and added back to the right of the screen when they leave the game world on the left side. The player sprite is moving along these and I am doing collision tests from the player sprite to the floor/obstacle groups. The problem I am having is that occasionally the player sprite gets stuck while running over the floor and obstacle sprites and then the player is pushed off to the left of the screen thus ending the game. I am not sure if I am going about this the correct way. Is this due to my implementation or a bug? Does anyone have any ideas? Game here: http://www.theworkshop.co.uk/testing/paulr/ Thanks
  8. I have a group object with a few independent parts, The character sprite, the players name hovering above, and a status object, which will likely be more sprites and text in a sub-group. How can I make this group act as one object? Like stopping the whole group with collideWorldBounds? Right now Im only able to stop the player sprite with body.collideWorldBounds = true, but the text just keeps on going right off the screen. There doesnt seem to be a way to set body properties on a group?
  9. Hi, I'm new to Phaser, but not game/sprite engines. Javascript has some quirks I'm still getting used to, and perhaps this is one of them. My question is this: Why do I need to assign a different 'id tag' to an image for sprites to behave as separate instances? For example (preload function): game.load.image('reel', 'reel.png');game.load.image('reel2','reel.png');game.load.image('reel3','reel.png');Then, in my create function, I instantiate a couple custom classes (where the sprite itself resides): r1 = new Reel({x:201,y:130,img:'reel',cb_stop:cb_r1_stop});r2 = new Reel({x:201+128+10,y:130,img:'reel2'cb_stop:cb_r2_stop});r3 = new Reel({x:201+128+10+128+10,y:130,img:'reel3',cb_stop:cb_r3_stop});(class constructor where sprite resides): s = game.add.sprite(args['x'],args['y'],args['img']);Problem: So if I do not make these 'reel','reel2','reel3' any cropping, moving, or other modifications I make to the sprite itself (yes, separate instances as they are wrapped in their own class) I make to the sprite itself will apply to all 3 sprites no matter what -- as if it's modifying the image resource, not the sprite. As a temporary work around I just made 3 separate resources, but that can't be right, can it? Sooo, I'm doing something wrong. I'm just flying through the tutorials, so it's likely there's some other way to add/work with sprites and I'm missing it?
  10. arnuschky

    Dynamic asset loading in WebGL

    Hello, does Pixi.JS support dynamic asset loading, that is, can I load and unload sprite atlases between scenes? This is rather essential on mobile platforms due to their limited memory. Unfortunately, very few engines seem to support this. Regards, Arnuschky
  11. Im using phaser (1.0.6) for my game, but I suspect this to be so low level so Im putting it here. I have a spritesheet of three frames. The zebras looking to the left are unchanged and simply rendered, those looking to the right are flipped using scale.x = -1. What happens is pretty much what the topic say. The first row shows the behaviour of the system for textures with odd dimensions, the second one is for even sized textures. I render using pixi canvas renderer. Anyone can reproduce this, or knows a better workaround that simply creating all your pix with even dimensions?
  12. I'm having a problem rendering phaser points after adding an animated sprite. I have created a screen full of stars and they are initially rendering as I would expect: Now if I add an animated sprite to the center of the world: rocketStarShip = this.game.add.sprite(this.game.world.centerX, this.game.world.centerY, 'rocketstarship'); rocketStarShip.anchor.setTo(0.5,0.5); rocketStarShip.scale.setTo(1.0, 1.0); rocketStarShip.animations.add('fly'); rocketStarShip.animations.play('fly', 3, true); My stars render into the lower right quadrant of the canvas: But if I turn on debug for Points: this.game.debug.renderPoint(starPoint, 'rgb(197,193,170)'); I can see that my Points are still rendering into the full screen: I'm not sure if I have a bug, or if I have a fundamental problem in understanding Phaser coordinates. I've put up a test demo at :http://rocketstar.comxa.com/Test/ Click the screen to rotate thru example states. Thanks for taking a look. I'm having a ton of fun with Phaser. Shawn Blessing Rocket Star
  13. I'm trying to figure out the best way to implement composite sprites with pixijs / grapefruitjs. In case you don't know what compositing is, here's the definition from the wiki article : Compositing is the combining of visual elements from separate sources into single images, often to create the illusion that all those elements are parts of the same scene. Pixijs was written so that each sprite holds reference to a single texture. If you are trying to create a game like diablo, where a players visual representation may consist of textures layered on top of each other, then you cannot use a single sprite to represent your player entity - instead you must use a collection of sprites. It seems like a PIXI.DisplayObjectContainer (represents a collection of display objects. It is the base class of all display objects that act as container for other objects) would work perfectly here. This is also the class that the PIXI.Sprite class extends from. So my implementation thus far, is to use a displayobject container (grapefruit wraps this object with another container class) so a Grapefruit.Container object really, and use that object to hold reference to all of my sprites. I then add this container object to my tilemap and the sprites are rendered to the screen like I would expect - but not in the correct position. The thing is, display object containers have their own position, rotation, scale, etc... properties, which isn't necessarily a bad thing. I am noticing the one thing they are lacking though - an anchor property. This means I will manually have to compensate for the anchor or figure out another way to do this... This seemed like the most straightforward approach to take, without having to touch pixijs, but maybe I'm just overcomplicating things? Thanks! -Zach
  14. rmbennin

    Texture Error with JSONHash?

    Hello, I've looked all over for an explanation as to why I'm getting this error: "Texture Error: frame does not fit inside the base Texture dimensions [object Object]". I believe it is happening from loading in my sprite for my game, but I'm not sure. I used Flash to create a JSON and a PNG file for the sprite, and they both look valid. I'm using this code to load in the sprite: "game.load.atlasJSONHash("chef", "assets/sprites/chef-spritesheet.png", "assets/sprites/chef-spritesheet.json");" Thanks!
  15. Hi! I'm trying out Phaser, and I can't seem to get it to display just the first row of this spritesheet: https://github.com/lostdecade/onslaught_arena/blob/master/htdocs/img/sheet_characters.png What happens is that it goes through the entire spritesheet instead of just the first 21 frames. What's the proper format for the frame indexes passed into Sprite.animations.add ? Should I be pushing objects into the frames array instead of integers? Should I start with 1 instead of 0? Here's what I have so far: var game = new Phaser.Game(64, 64, Phaser.AUTO, '', { preload: preload, create: create, update: update });function preload(){ /* 32x32 is the size of each frame */ game.load.spritesheet('characters', 'assets/sprites/characters.png', 32, 32);}function create(){ /* Loop through Xam's sprites */ var frames; var i; var xam; /* [0,1,2,...,21] */ frames = []; for (i=0;i<22;i++) { frames.push(i); } xam = game.add.sprite(game.world.centerX, game.world.centerY, 'characters'); xam.anchor.setTo(0.5, 0.5); xam.animations.add('loop',frames,15,true,true); xam.animations.play('loop');}function update(){ }I saw some examples that used Game.load.atlasJSONHash, is that the only way to accomplish this? This is my first post here, so I'm also open to being lectured on posting standards. UPDATE: I may have found something... Phaser 1.0.4, FrameData.js, line 196 checks if frames isn't empty, but the parameter that's passed is named input. I replaced frames with input and it worked as expected. I'd like to confirm if this is the way it should work, though; I might be breaking something else by doing this haha By the way, instead of pushing integers into the array, I had to put the indexes in an object like so: frames = [];for (i=0;i<22;i++){ frames.push({index:i});}Phaser 1.0.4, FrameData.js, line 212 seems to need the index property.
  16. gin5eng

    Tool: ASEPRITE

    http://www.aseprite.org/ Animated Sprite and Pixel Art Tool Found this a couple of weeks ago. Used it a couple of times and it works good - just a couple of small missing conveniences.