Jump to content

Search the Community

Showing results for tags 'create'.

  • 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
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • 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 13 results

  1. I have this game with a salmon background color. I can set the background to the proper color into the create function with: game.stage.backgroundColor = '#f3cca3'; The problem is that it takes a little while preloading the images and sounds and so it stays black in the meantime. I tried: var game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.CANVAS, 'meems_house', { preload: preload, create: create }); game.stage.backgroundColor = '#f3cca3'; But then it says 'Cannot set property 'backgroundColor' of null' indicating that it didn't find 'gam
  2. The main.html file. <!doctype html> <html> <head> <meta charset="utf-8" /> <link href="{{ root }}/app.css" rel="stylesheet" type="text/css"> </head> <body> <div class="flex-basic flex-row"> <div class="flex-1"></div> <div class="flex-basic flex-column"> <div class="flex-1"></div> <div id="phaser"></div> <div class="flex-1"></div> </div> <div class="flex-1"></div> </div> <script src="{{ node_modules_root }}/node_mo
  3. Hi, I don't know where to find any information about this, so I start here^^ I'm creating a little (serious)game where you can here sound form a body. And I would like to be able to do two things: - one level where the player can choose the type of sound he wants to hear. Like I would like to hear the heart of someone who had heart surgery, and something like a dropdown list with this kind of option (heart surgery, prolapsus, etc.) that would allow him to do so. - the possibility for the player to create a new body with the sounds he wants (and eventually share it). And it would
  4. Third time from me today :D, So I want to spawn these customers at random millisecs every loop... The problem is that when the first number is generated it uses it(this specific number) for every loop after that? Any ideas? this is how I'm trying to do it, but I guess there is a better solution... I can't create a variable, since the same thing is going to happen: game.time.events.loop(Math.floor((Math.random() * 10)*1000), this.createCustomer, this);
  5. Hi, Often I come with the "problem" that I start a game using separated images and later I pack them in a texture atlas. I say a problem because when you create the sprites from separated image files yo do something like this: // load the single image filesgame.load.image("bird", "assets/bird.png");game.load.image("dog", "assets/dog.png");...// create the sprites using the images keysgame.add.sprite(10, 10, "bird");game.add.sprite(20, 20, "dog");Ok, but when I decide to migrate the game to use texture atlas I come with the problem that my "create" code gets broken, why? because I should us
  6. Say I have a simple class: class SimpleGame { game: Phaser.Game; myColor: Phaser.Color; constructor() { this.myColor = Phaser.Color.createColor(255,255,0); this.game = new Phaser.Game(1200, 600, Phaser.AUTO, 'content', { preload: this.preload, create: this.create}); } preload(){ this.game.load.image("platform", "Graphics/platform.png"); } create() { console.log(this.myColor); } } window.onload = () => { var game = new SimpleGame(); }; The console always prints/returns undefined and if I try to modify the valu
  7. Hi! Very new to programming and Phaser so be kind! I've just downloaded Phaser and have been playing around with spritesheets. I managed to get my first sprite animated using the master phaser example tutorials (http://phaser.io/examples/v2/sprites/spritesheet#download). I then tried adding a second spritesheet in a different location but it doesn't seem to play the animation (original spritesheet still loads and plays though)? I've read somewhere that using a tilemap when using multiple spritesheets is advised. Any help would be hugely appreciated! Cheers! Here's the code: funct
  8. Greetings people smarter than myself. This is my first phaser self-guided exercise. I'm also very new to object oriented programming - and that may be the issue at hand. I have a single gamestate, "playgame", which has a placeTiles() function that I don't want to execute until a user clicks a "Begin" button. However, my code is not working as intended because the placeTiles() function is executing immediately upon loading. I think there is a fundamental concept that I'm missing. As you can see, I'm using preload, create, then some of my own - placetiles, showtile. Is it SOP for all of
  9. Hi, i'm trying to create an object to the right of another object. I want it to check if there is an object that exists already, and if not then create the same object to the right 48 px. I tried this: grass = game.add.sprite(0, 0, 'grass'); if (!grass.body.touching.right) { game.add.sprite(grass+48, 0, 'grass'); }but no luck. any solutions? p.s. i'm fairly new to the Phaser framework, and i'm still learning how to do things like collision checking in phaser. Thanks!
  10. Hi friends! Definitely, the best way to work with collections of objects (enemies, obstacles, etc) is extend the Sprite class and to work with Groups (at least for me). In the examples on extending the Sprite class, we have: /** * Automatically called by World.update */MonsterBunny.prototype.update = function() { this.angle += this.rotateSpeed;};I can automatically call World.create function as above? to initialize the behavior of objects, and not make the call explicit to create function. Thanks, and excuse me for my english This, not work: MonsterBunny.prototype.create = functio
  11. Hey, So this is my first post and also my first game using Phaser, so cheers! I would post the code here, but since I split up my code into prototype files and I don't know where the error could be occurring, I'll just put up the github: https://github.com/NighNightGaming/unholy_ghosts The problem: Despite the fact that I explicitly spawn the player sprite at a certain point, it loads up to that point then instantly "snaps" to the enemy sprite, which spawns at a random x (within a range). I've been playing with it for a little bit now and can't really wrap my head around my error. Ple
  12. After the relative success of our first game, Clementine: horror sheep, and requests we should improve the game, we are about to come out with a new game called Clementine 2; the escape. This game would allow you to save and load and play as different characters. If you would like to see our old game it is here. Our developer page for the game is here. When the game is released I will let the community know. Thankyou! (see the attachment for development screenshot)
  13. http://www.throwthegame.com I spent a long time working on this and would appreciate some feedback. I tried to make game creation as simple as possible. There is no scripting and game logic is handled for you. All games are created from "frameworks" which define the type of game. There currently is only one called "Modern Tactics"; a tactical-rpg. After creating your game, you can then create levels for it. Technologies: Ruby on rails Hosted on Heroku Backbone Using my own game framework but am migrating to [pixijs](https://github.com/GoodBoyDigital/pixi.js/) Using soundmanager2 (thinking
×
×
  • Create New...