fubeca6

Members
  • Content Count

    32
  • Joined

  • Last visited

About fubeca6

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    US
  • Interests
    Phaser dev, Unity 2d dev

Recent Profile Visitors

865 profile views
  1. Hey Rich, thank you for the reply! Unfortunately I'm getting the same error even after changing the input function name
  2. Good afternoon all, I'm trying to capture user key presses... here's my code: // This is in my "create" functiongame.input.keyboard.addCallbacks(this, null, null, this.input);// ...input: function(char) { this.name += char; this.selection.setText(this.name); },Here's the error I'm getting: Uncaught TypeError: this.onPressCallback.call is not a function If anyone has any ideas, please let me know!
  3. Hi Preece, Thank you for the response. Unfortunately I am getting the same error (in fact, I had been using the CSV version all along). Out of curiosity, I tried using CSV, XML, and Base64 (uncompressed) and I got the error in every instance in the same spots. So, from what I understand, Phaser renders the tiles as they become visible to the camera - right? So there's got to be some clue to the issue based on where the issue is occurring - based on which tiles are 'trying' to be rendered? Thanks All Chad
  4. Hi all, Loaded a tilemap into phaser as json, exported from Tiled. It loads, I can see the tiles, the player can move on the map. However, once the player gets to a certain point on the map, I get this error: Uncaught TypeError: Cannot read property '2' of undefined which apperently references this line in phaser.min.js: set = this.map.tilesets[this.map.tiles[tile.index][2]]; This error occurs at different points on the map. I'm wondering if it's because the map is too large? It's 200x100 tiles (tiles are 32x32). I noticed that the coordinates of error, make a strait, diagonal line so that the top-right hand quarter of the map (about) is playable. I ensured that my tile image is correctly proportioned (it's 64x128) Also, I noticed some oddities (I think) in the exported json file: { "height":100, "layers":[ { "data":[4, 4, 4,....<doin' it's thing, and then...> ...2684354568, 2684354568, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 4, 4, 7, 7, 2, 2, 7, 5, 5, 1, 1, 2684354568, 2684354568, 2684354568, 1,... Are those huge numbers to be expected? They definitely don't correspond to any tile indexes. I haven't noticed anything like that in any of my other Tiled maps. Any and all help is deeply appreciated! ThanksChad
  5. Bahototh, Thanks for the reply! Your stuff looks pretty good! Would you mind shooting me an email at fubeca6@gmail.com and we can talk a little more? Take care, Chad
  6. Hi all, I'm pretty new to game development, but am eager to get started. I'm looking for an artist that could be a partner/collaborator whom I could bust out a few simple, but high quality games with (probably in HTML5, and maybe publishing on mobile platforms?); and, if we work well together, possibly form a more long-term working relationship. The idea wouldn't necessarily be to create the next million-dollar mobile game (although I'm definitely not opposed to that) but more to build up our portfolio, credibility and experience. Because of that, the partner I'm looking for probably wouldn't be a "professional ", but would probably be in a situation similar to my own. If this sounds like something that you'd be interested in, please PM me! Thanks, Chad
  7. Sorry for the delay - this worked PERFECT though, thank you!
  8. Hi all, How can i expand my game.world (or stage?) Beyond the bounds of the screen such that I can then follow the player with the camera? I would like to do this without using a tilemap. Thanks!
  9. Hey LessMilk, You can add my Randomly-Generated Dungeon Tutorial, found here: http://perplexingtech.weebly.com/blog/a-random-dungeon-generator-for-phaserjs
  10. Hey Everyone, Been working on this for a while, and finally ready to release it into the wild! I've created a 'template' for a Random Dungeon Generator using phaser. Please check it out on my blog, where I also have a live demo of it. Feel free to copy, share, etc the code and ideas, and please let me know if you have any changes or improvements, and I would love to see what games people come up with using it
  11. Well my problem is - my script is randomly creating series of tiles - either "floor" or "wall" and I can't get the player sprite to collide with the "wall" tiles. That's why I used the "update" function, because that's where I have to have the game.physics.arcade.collide statement. So I tried creating a new array that would hold only the "wall" tiles, and then in my update statement, iterating through them and creating the collide physics: for (var i = 0; i < this.wallTiles.length;i++) { game.physics.arcade.collide(this.wallTiles[i], this.player); }So now I have collision...sort of. My sprite is now stuck within a 64x64 invisible pixel box This seems so much more complicated than it should be. But I think that's because I'm maybe trying to work outside of how Phaser was really designed to work? I dunno. I'm gonna keep playing with it. Here's some photos: https://onedrive.live.com/?cid=A6D87D0508D102F4&id=A6D87D0508D102F4%21148&v=3 The first one you can see the map fully generated (but with no collide physics) just to kinda show what I'm working towards.
  12. This is amazing, man. Thanks for sharing
  13. Hey Lewster, I reviewed the Extending Sprite Examples, but found it rather difficult and awkward to implement in my code. What I'm trying to do is create a random-dungeon generator. I do this by creating "Tiles" (objects with various properties: x, y, image, whether it's a wall or floor, etc.), and feeding them into an array. There's some more to it, but as part of it, from my "create" function, I call a function that does the following: for (var i = 0; i < this.map.length;i++) { if (this.map[i].image == 'floor') { this.newtile = game.add.sprite(this.map[i].x, this.map[i].y, this.map[i].image); game.physics.enable(this.newtile, Phaser.Physics.ARCADE); this.newtile.body.immovable = true; } else if (this.map[i].image == 'wall') { this.update(); } }Now, "map" is an array that contains the tile objects that are used to create sprites (as you can see in this example. My "update" function, has the following code: for (var i = 0; i < this.map.length;i++) { if (this.map[i].image == 'wall') { this.newtile = game.add.sprite(this.map[i].x, this.map[i].y, this.map[i].image); game.physics.enable(this.newtile, Phaser.Physics.ARCADE); this.newtile.body.immovable = true; game.physics.arcade.collide(this.newtile, this.player); } // For troubleshooting: if (game.physics.arcade.collide(this.newtile, this.player)) { console.log("true"); } }So what I'm expecting, is that if the map.image = wall, then it will be created as a sprite, physics set, and collision configured. However, when I run it, the map fills with "wall" tiles, and the console is blank. I'm pretty new at Phaser and Javascript, so I recognize that this is a fairly ambitious project, and I readily admit my noob-ish-ness Anyways, I know there's a logic error in here - I'm just not sure how to fix it.
  14. Lewster, as always I really appreciate your input! My first impression of the Phaser.Sprite extending example is that it will be so much simpler and easier than what I'm doing now!! Thank you for you help!
  15. Omfg! Well, If you can't tell, I'm "self-taught" (unfortunately classes in programming were not provided for a degree in Network and Server Administration). I thank you all for your answers, and I apologize for bugging with something so obvious.