Search the Community

Showing results for tags 'point and click'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Found 9 results

  1. Hey yall, I just released a brief demo of Norco: Faraway Lights, a cyberpunk text adventure with a focus on the environmental and industrial histories of rural Louisiana. It features all original, lovingly rendered pixel art and an incredible soundtrack by New Orleans-based composer Gewgawly I. The demo is available for download or to play in your browser on itch.io. Thoughts and feedback are appreciated!
  2. Hi all, I have two sprites ( sprite A and sprite B ) that I want to select and move around the screen one at the time, like this: click on sprite A to select it, sprite B should be then deselcted click anywhere in the world to move sprite A to where the mouse clicked double click on a sprite A to cast spell 1 double click on sprite B to cast spell 2 Issues I have are: Issue: If sprite A is already selected, and I single click on sprite B to select it, then sprite A moves to location of sprite B. Intended: no sprite moves, sprite B is selected and sprite A is deselected Issue: If a sprite is already selected, and I single click on it, the sprite is deselected (and the other is selected). Intended: the sprite remains selected Issue: Double clicking on the world (outside any sprite) cause a selected sprite to move two steps towards where clicked. Intended: Double clicking on the world should be ignored Issue: Single clicking anywhere but the center of a selected sprite makes it move a bit towards where clicked. Intended: single clicking on a selected sprite should be ignored Issue: The two sprite overlap. Intended: collision and separation What I'm doing wrong Thanks! Code var playState = { create: function() { this.mouseClicks = 0; this.mouseClicksStarted = false; this.createPlayers(); this.myEvent = game.input.onDown.add(this.movePlayer, this); this.playerGroup.forEach(function(player) { player.events.onInputDown.add(this.countClicks,this); //param 1: sprite, param2: pointer }, this); }, update: function() { game.physics.arcade.collide(this.playerGroup); }, countClicks: function(player, pointer) { this.mouseClicks ++; this.player.canMove = false; if (this.mouseClicksStarted) { return; } this.mouseClicksStarted = true; //call function after x seconds setTimeout(function() { if(this.mouseClicks > 1) { if(player.role == "thrower") { console.log("double: casting thrower spell") } else { console.log("double: casting catcher spell") } //One click } else { this.selectPlayer(player); } this.mouseClicksStarted = false; this.mouseClicks = 0; }.bind(this), 250); }, selectPlayer: function(player) { this.playerGroup.forEach(function(player) { if(player.isSelected) { player.isSelected = false; player.tint = 0xffffff; } else { player.isSelected = true; player.tint = 0xff0000; } }, this); }, createPlayers: function() { this.playerGroup = game.add.group(); this.player = new Player(this.game, 'player', 'thrower', true); this.game.add.existing(this.player); this.playerGroup.add(this.player); this.player.reset(game.world.randomX, game.world.randomY); this.player2 = new Player(this.game, 'catcher', 'catcher', false); this.game.add.existing(this.player2); this.playerGroup.add(this.player2); this.player2.reset(game.world.randomX, game.world.randomY); }, movePlayer: function (pointer) { this.playerGroup.forEach(function(player) { if(player.isSelected) { if (this.tween && this.tween.isRunning) { this.tween.stop(); } var duration = (game.physics.arcade.distanceToPointer(player, pointer) / 400) * 1000; this.tween = game.add.tween(player).to({ x: pointer.x, y: pointer.y }, duration, "Sine.easeInOut", true); game.add.tween(player.scale).to({x: 1, y: .8}, duration).to({x: 1, y: 1}, 1000, Phaser.Easing.Elastic.Out).start(); player.rotation = game.physics.arcade.angleToPointer(player); } }, this); }, }; Player var Player = function (game, sprite, role, isSelected) { //save passed variables so they can be accessed later this.role = role; this.isSelected = isSelected; this.max_energy = 100; this.currentEnergyLevel = 0; Phaser.Sprite.call(this, game, game.width/2, game.height-150, sprite); this.anchor.setTo(0.5, 0.5); this.scale.setTo(1); game.physics.enable(this, Phaser.Physics.ARCADE); this.body.collideWorldBounds = true; this.body.bounce.setTo(0.9, 0.9); //this.body.immovable = true; this.playerKillParticles = game.add.emitter(0,0,15); this.playerKillParticles.makeParticles('playerParticle', 2); this.playerKillParticles.setYSpeed(-100,0); this.playerKillParticles.setXSpeed(-100,100); this.inputEnabled = true; this.input.useHandCursor = true; //this.input.priorityID = 1; }; Player.prototype = Object.create(Phaser.Sprite.prototype); Player.prototype.constructor = Player; Player.prototype.setRole = function(role) { this.role = role; }; Thanks!
  3. Hey Phaser people, I'm currently working on a 2d upperview point & click game, using Arcade physics. What I want to develop is a "smart movement" system, where if you click on a part of the map, your character shouldn't get stuck in obstacles, but pass around them. For now, I'm using tweens to move my character to the mouse position, which cancels the collision. Thus, it's a no go. this.game.input.onDown.add(this.movePlayer, this); movePlayer: function (pointer) { var time = 9.5; var duration = (this.distance(this.player.x, this.player.y, pointer.x, pointer.y) * time); this.tween = this.game.add.tween(this.player).to({ x: pointer.x, y: pointer.y }, duration, Phaser.Easing.Linear.None, true); } Any suggestions ? Thanks ! I've also attached a small screenshot/ drawing of what I strive to achieve.
  4. I am making a little game that is similar in style to the Covert Front point and click adventure games (http://www.mateuszskutnik.com/covert_front/index.php?id=cf_1). Navigation is pretty easy, you click on doors, and sometimes parts of the bottom of the screen to move between them. Here are some screenshots from the Covert Front game to illustrate the type of thing I want to do: In the first one you can click to go back when the cursor is near the bottom of the screen, and in the second one, you can change rooms by clicking near the bottom, or either door. I made a simple prototype where I navigated using arrow sprites, as seen below, which worked well and were easy to use. However, I would prefer not to have buttons like this. I was wondering what the best option would be to define clickable areas for movement. Should I create transparent sprites to define the doors and use the OnInputDown event as I did in the prototype, or would it be better to use a Rectangle, and check each onDown event to see if it is contained in the rectangle? I am wondering if there is a preferred method for doing something like this, or whether there are methods I have not thought about.
  5. Anyone working on a point and click adventure game? I'd be keen to share thoughts code etc.. Here is my favorite developer in this genre http://www.psionic3d.co.uk/ As an artist the graphics are no problem for me. The code however is another story. I'm starting out without a library in order to more thoroughly learn the code function behind it all. Currently looking at mouse event handlers on the canvas element. I can get canvas coordinates and get a hit test on an element but I don't have the experience yet to animate an object to a specific location on click - namely an inventory. The first code I wrote myself is a scene changer. It might help another newbie out there. http://harrywatson.altervista.org/momo/index.html Any insights, comments, would be appreciated
  6. Experience a dream-like atmosphere in this web-based point & click adventure.Solve music- and time-based puzzles to reveal the true nature of oOku.You can play the alpha demo herehttp://ooku.itch.io/ookuif you are interested in testing more levels you can send me a PM or join the facebook grouphttps://www.facebook.com/groups/1678578385758314Thanks a lot for your feedback and bug reports.Known Issues: seek buttons do not work in Firefox Links homepage: http://ooku.org twitter: https://twitter.com/ookuorg
  7. Hello all, I'm pretty new on game development and I've chosen Phaser as the framework for our project. We are a Brazilian dev team (to be honest we're just two atm lol). The project home: http://www.in8game.com Blog (Portuguese): http://www.in8game.com/blog/ And tests I'm doing with Phaser: http://www.in8game.com/prototipo/ Well, I've made some tests using the pathfinder plugin and it's cool. I'd like to ask you what do you think would be the better approach to a point and click player movement using the pathfinder. The player will have a "velocity" defined by the "vehicle" he is using atm. Idk if maybe I can add a tween tile by tile using the plugin or if it's better to use some physics here. Hope I made myself understandable. Sorry about my poor English. I'm willing to make something new and cool using Phaser to share with you guys. Thanks in advance. Rainer Lopez
  8. Finally after a few days I managed to create a combination lock using images. It uses createjs but should be really simple to use with any framework. No preloading so you might have to refresh the page - only tried in firefox http://harrywatson.altervista.org/combination.html
  9. Hi all, here is my first ever game. I've modified this post so my apologies if you've seen it already. Works on Firefox, Safari and Chrome (all Mac) and IE (Windows). Haven't given any thought to devices as yet but interested to try. Any feedback at all would be most appreciated. http://harrywatson.altervista.org/momo/index2.html .