Jump to content

syntaxidermy

Members
  • Content Count

    12
  • Joined

  • Last visited

About syntaxidermy

  • Rank
    Member

Recent Profile Visitors

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

  1. How would you read the tint of the button in Phaser? I think there's a way to do it in Phaser 2/HTML5, but not sure Phaser 3 supports this yet.
  2. Thanks for the reply samme, the issue is that I'm trying to load an image onto the loading scene, because my game has a lot of image files to load before the create/update functions can run. The tutorials seem to suggest loading the files inside of the game config variable, but I haven't managed to get this to work.
  3. My image keeps displaying as a green box with a cross through it, even though I'm nearly exactly the same loader event code given in the examples given here and here. My code looks something like this, but for some reason the image is always displayed as a geen box with a line through it, as though it failed to load the image correctly. Any insights as to what this might be? I promise it's not a typo! var config = { type: Phaser.AUTO, width: 1000, height: 600, scene: { preload: preload, create: create, pack: { files: [
  4. An update here if anybody else is looking for guidance on building menus of the style above, here's what I did to make mine. Hope this helps. This is how it looks from the code below, more or less; With pages: https://imgur.com/TlpNWcJ Here is the relevant code, it's a lot, but I hope that whatever you might need is given somewhere as an example here: function preload () { //bgs this.load.image('bg', 'assets/bg.png'); //bodies this.load.spritesheet('catbody', 'assets/catbody.png', { frameWidth: 297, frameHeight: 39
  5. Update: I've fixed the issue! Just in case anybody else comes across this problem, heres how I fixed it: function create(){ //player layers player = this.physics.add.sprite(200, 370, 'catbody').setInteractive().setDataEnabled(); playereyes = this.physics.add.sprite(260, 350, 'cateyes').setInteractive().setDataEnabled(); playerface = this.physics.add.sprite(260,350,facekey).setInteractive(); //menu items normaleyeicon = this.add.image(735,185,'catface').setScale(0.35).setInteractive(); gotheyeicon = this.add.image(815,185, 'catfacegoth').setScale(0.35).setIn
  6. Hi all, Slowly making progress on my character creation game. I've layered multiple sprites, so that each sprite can be easily "tinted" to the user's preferred colour. The layers so far are added like so: Cat Body Pupil Face/Eye shape Each layer is animated. The pupil and the face are aligned, hence should be playing the same frame as each other to look correct. This works fine up until a point. The issue is, when the user selects the eye shape they desire, the two sprites go out of sync, and the animation looks something like this:
  7. I've started to learn game dev using phaser 3 as well. (I'm coming from a background of coding command line applications in C++/Java, web is totally new to me) Looking back on it, I think I might have saved myself some time if I maybe started with phaser 2. But at this point, I've written a lot of my game in phaser 3 so I'm not going to start over now. XD labs.phaser.io is good for finding examples, but the search functionality isn't great. I spend time trying to find examples there basically every day, and slowly I'm learning how Phaser 3 works by doing that. There are still tutorials fo
  8. The long and short of it is: Phaser 3 has new features, and generally seems nicer, but because it's still pretty new it can be difficult to find examples, documentation, or tutorials. So, I guess it depends how confident you are at making sense of Phaser 3 on your own. There are way more resources out there for Phaser 2.
  9. Hi, I'm working on creating interactive buttons which, when clicked, will set the colour of the player. I've managed to do this successfully, in Phaser 3, but the code is quite bulky and ugly looking. I've just been gathering what examples I can through the website, but I'm certain there must be a better way to do this. Here's what I've got: I think what I want to do is create a class for "smalltiles", but I'm not sure how the inheritance should work for using alongside Phaser 3. I've tried writing something like in several different way
  10. Thanks! Turns out I was being very daft indeed. I didn't realise that you had to load WAMP files in a browser with 'localhost:/filename'. That solved my issue.
  11. Hi all, I've recently started a project that I gave myself to learn more about web based applications. I'm working on building character creation menu, (based on NITW by infinite fall), of which the design I had in mind would eventually look something like this: What I have so far is just a test of one of the sprites I put together: mae.mp4 The sprite is made using just one layer, at the moment. Essentially, while I don't think the concept is too difficult to put together, I'm having trouble finding examples of how to implement relevan
  12. I'm having a similar issue with the same part of the tutorial, so I thought I'd comment here. I'm completely new to this as well, just trying to get set up so that I can start doing some practice tutorials. I've also installed the zip file, and copied phaser.js into the WAMP www directory. The code I've used in my index.html file is exactly as given here. When I load the file in Chrome, I get the following error messages and a blank, white page: (See Screenshow below) `phaser.min.js Failed to load resource: phaser.min.js net::ERR_FILE_NOT_FOUNDindex.html:10
×
×
  • Create New...