Search the Community

Showing results for tags 'html5'.



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 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 1,069 results

  1. Hi everyone, // If I make grammar mistakes, please excuse me. I'm still not fluent in English ahah I'm a beginner on Phaser, had to have a look into that for my courses. I'm now upgrading a basic tutorial and I want to use a timer (a countdown) in that game but it really doesn't work, it only create a black screen. To do this, I followed this tutorial : https://www.joshmorony.com/how-to-create-an-accurate-timer-for-phaser-games/ I tried other, without success. Some were a bit to hard to understand, others were pretty ugly ! So here is the code I used , can you help me ? : var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload() { game.load.image('sky', 'assets/sky.png'); game.load.image('ground', 'assets/platform.png'); game.load.image('star', 'assets/star.png'); // on ajoute un diamant game.load.image('dmd','assets/diamond.png') game.load.spritesheet('dude', 'assets/dude.png', 32, 48); } var player; var platforms; var cursors; var stars; var diamonds; var score = 0; var scoreText; var countdown; function create() { // We're going to be using physics, so enable the Arcade Physics system game.physics.startSystem(Phaser.Physics.ARCADE); // A simple background for our game game.add.sprite(0, 0, 'sky'); // The platforms group contains the ground and the 2 ledges we can jump on platforms = game.add.group(); // We will enable physics for any object that is created in this group platforms.enableBody = true; // Here we create the ground. var ground = platforms.create(0, game.world.height - 64, 'ground'); // Scale it to fit the width of the game (the original sprite is 400x32 in size) ground.scale.setTo(2, 2); // This stops it from falling away when you jump on it ground.body.immovable = true; // Now let's create two ledges var ledge = platforms.create(400, 400, 'ground'); ledge.body.immovable = true; ledge = platforms.create(-150, 250, 'ground'); ledge.body.immovable = true; ledge = platforms.create(-100, 510, 'ground'); ledge.body.immovable = true; // The player and its settings player = game.add.sprite(32, game.world.height - 150, 'dude'); // We need to enable physics on the player game.physics.arcade.enable(player); // Player physics properties. Give the little guy a slight bounce. player.body.bounce.y = 0.2; player.body.gravity.y = 350; player.body.collideWorldBounds = true; // Our two animations, walking left and right. player.animations.add('left', [0, 1, 2, 3], 10, true); player.animations.add('right', [5, 6, 7, 8], 10, true); // Finally some stars to collect stars = game.add.group(); // We will enable physics for any star that is created in this group stars.enableBody = true; // Here we'll create 12 of them evenly spaced apart for (var i = 0; i < 10; i++) { // Create a star inside of the 'stars' group var star = stars.create(i * 70, 0, 'star'); // Let gravity do its thing star.body.gravity.y = 15; // This just gives each star a slightly random bounce value star.body.bounce.y = 0.2 + Math.random() * 0.2; } // On ajoute les diamants diamonds=game.add.group(); diamonds.enableBody=true; // création des diamants dans l'espace de jeu for (var i = 0; i < 3; i++) { var dmd = diamonds.create(i * 70, 0, 'dmd'); dmd.body.gravity.y = 30; dmd.body.bounce.y = 0.1 + Math.random() * 0.2; } countdown.startTime = new Date(); countdown.totalTime = 120; countdown.timeElapsed = 0; countdown.createTimer(); countdown.gameTimer = game.time.events.loop(100, function(){ countdown.updateTimer(); }); // The score scoreText = game.add.text(16, 16, 'score: 0', { fontSize: '32px', fill: '#000' }); // Our controls. cursors = game.input.keyboard.createCursorKeys(); } function update() { // Collide the player and the stars (et les diamants du coup) with the platforms game.physics.arcade.collide(stars, platforms); game.physics.arcade.collide(diamonds, platforms); game.physics.arcade.collide(player, platforms); // Checks to see if the player overlaps with any of the stars, if he does call the collectStar function game.physics.arcade.overlap(player, stars, collectStar, null, this); // idem pour les diamants game.physics.arcade.overlap(player, diamonds, collectDiamonds, null, this); // Reset the players velocity (movement) player.body.velocity.x = 0; if (cursors.left.isDown) { // Move to the left player.body.velocity.x = -150; player.animations.play('left'); } else if (cursors.right.isDown) { // Move to the right player.body.velocity.x = 150; player.animations.play('right'); } else { // Stand still player.animations.stop(); player.frame = 4; } // Allow the player to jump if they are touching the ground. if (cursors.up.isDown && player.body.touching.down) { player.body.velocity.y = -350; } } function collectStar (player, star) { // Removes the star from the screen star.kill(); // Add and update the score score += 10; scoreText.text = 'Score: ' + score; } function collectDiamonds (player, dmd) { dmd.kill(); score += 50; scoreText.text = 'Score: ' + score; } function createTimer(){ var countdown = this; countdown.timeLabel = countdown.game.add.text(countdown.game.world.centerX, 100, "00:00", {font: "100px Arial", fill: "#fff"}); countdown.timeLabel.anchor.setTo(0.5, 0); countdown.timeLabel.align = 'center'; } function updateTimer (){ var countdown = this; var currentTime = new Date(); var timeDifference = countdown.startTime.getTime() - currentTime.getTime(); //Time elapsed in seconds countdown.timeElapsed = Math.abs(timeDifference / 1000); //Time remaining in seconds var timeRemaining = countdown.timeElapsed; //Convert seconds into minutes and seconds var minutes = Math.floor(countdown.timeElapsed / 60); var seconds = Math.floor(countdown.timeElapsed) - (60 * minutes); //Display minutes, add a 0 to the start if less than 10 var result = (minutes < 10) ? "0" + minutes : minutes; //Display seconds, add a 0 to the start if less than 10 result += (seconds < 10) ? ":0" + seconds : ":" + seconds; countdown.timeLabel.text = result; if(countdown.timeElapsed >= countdown.totalTime){ // On cherche la fin du timer result = "Rate !"; } }
  2. HTML 5 Game Developers

    We want HTML 5 games for mobile page of our sites.We are ready to pay per game or other offers.By the way It mustn't be WebGl.So , please contact us.
  3. Space Demons

    Just wanted say hi to the community by posting about my first game, it was build using the html5 canvas combined with other DOM elements. Didn't use a framework so it's pretty rough around the edges. I only released it for android (didn't want to pay the apple subscription fee :P) I'm building another mobile game using Phaser 2.9.2 CE right now and absolutely loving it - looking forward to sharing it with you guys! Google Play Store link: https://play.google.com/store/apps/details?id=com.gmm.spacedemons&hl=en Any feedback/comments would be very much appreciated!
  4. Hello everyone, I want to present you my game, "Fun Football". Gameplay preview on youtube: https://www.youtube.com/watch?v=_1odlE5uvAg Play the game online now: https://showcase.odiusfly.com/funfootball Available on google play store: https://play.google.com/store/apps/details?id=com.odiusflystudio.funfootball More games available on my website: https://odiusfly.com This game is available for licensing.. If you are interested, please contact me via email! ; -) Best regards, Kyriakos
  5. Kiss Sweetly

    Jaka And Lily are a pair of lovers.One day,they come to the beach with one of Lily's friends.When Lily's friend are resting,they when to have a kiss.Let's help them. http://www.to43.com/Kissing/Kiss-Sweetly/play.html
  6. http://leekeechild.uw.hu/tileremover/ Tile Remover is the mix of classic bubble shooter and falling down block puzzle. Try to remove all tiles from the playground. Colored tiles are falling down one by one in each round and you must place them how the same colors shall be alongside. If you make a group of tiles [by at least 3 tiles] from same color then them will be removed. When you skip more than 1 or 2 round(s) without making a group then a new line with tiles will appear of the bottom side of playground. Keyboard controls are: left arrow - move left right arrow - move right down arrow - speed up Watch video here: https://youtu.be/d8cavOQ4njQ
  7. Hi, My angular application is constantly changing these days because our team runs rapid updates right now. Because of cache, our clients do not always have the newest version of our code. So is there a way in angular to force the browser to clear cache? Thank You kosmiktechnologies.com
  8. Fire Runner - Topaz Edition

    Hi, I made this game with html5 without framework, the goal was to porting to android, but it got very heavy, I did everything except a music. https://diogo-nullmoon.itch.io/fire-runner-topaz-edition https://youtu.be/o7_noQHZiEg
  9. Hi, I'm new to the html5 game dev scene, and I've just released a game on Newgrounds. I was surprised to see that my game popped up on all sorts of different websites (game aggregation sites) that were monitizing it with ads. For this game, I don't really mind that others are using it for free (I'm just glad someone is playing it). But, for future games : is there anything I can do to prevent limit this ? I know ad revenues are peanuts, but I'd rather eat those peanuts myself
  10. Hello, I’m Kyriakos Farris from OdiusFly Studio , an indie game development studio focused on html5 and mobile games. I’ve been making games since 2007. Please don't hesitate to visit my portfolio: https://odiusfly.com Thank you!
  11. A funny game.Tap to get more and more roast chicken to eat. Play here: http://www.to43.com/Funny/I-Want-Chicken/play.html
  12. Calling all HTML5 game developers! Here at Goodboy Digital we are looking for developers with a passion for HTML5 game making to come and join a team who really love what they do. If you want to kick out some of the best HTML5 games going with us and help work on cool R&D projects like Pixi.js (and some secret ones too!) then please apply and show us what you got Apply here: https://goodboydigital.workable.com/j/F0010A3928 Merry Christmas! http://work.goodboydigital.com/sleigher-3000/ Mat
  13. Lights Out

    Hi Lights Out is a puzzle where you are given a 5x5 grid of buttons/lights with some on and others off which you have to switch off all lights in the minimum number of moves as possible. When you click any of the lights will toggle it and the four adjacent lights(vertically and horizontally, but not diagonally). Its available for licensing, Please give feedback and suggestion http://html5.gamedistribution.com/641e51473f59457da42e8e6658d399c0/
  14. Hello, I want to show my latest game, Freaky Brothers, the game is created with Construct 3. If someone tries it, I would appreciate sincere comments, about mechanics, graphics etc ... I try to improve with each game, thanks. The html5 version can be played from any device, smartphones, iphones, pc, mac etc ... I also leave the Android version and the Itch.io version. Play Html5: Freaky Brothers Html5 Google Play: Freaky Brothers Google Play Play on Itch.io: Freaky Brothers Itch.io
  15. Dino Zoo Tycoon

    Dino Zoo Tycoon Technology stack: phaserjs, cocoon.io (cordova) Game handle native mobile and Google Play Store fetures like inapp purchases, fb sharing, ads system. Game is free. Google Play link: https://play.google.com/store/apps/details?id=dino.zoo.tycoon Description: Manage your dinosaurs zoo and becoome the greatest entertainment zoo owner, dino zoo tycoon. Take care of your dinosaurs, develop your zoo inflastructure, riseup your zoo popularity, manage your emploers, manage your zoo finance depends on year season. Features: - 16 dinos to buy - 6 types of buildings to develop - 4 types of marketing actions - 6 types of emploers to hire - management of zoo supply - management of zoo finance depends of year seazon - management of proper dinosaurs placement in your zoo Screenshots:
  16. Zombie Strike

    Hi there! I'd like to show you one of our game - Zombie Strike. This is a variation of match3 style game and zombie theme. The wall of the zombie comes on the player who should break the bricks on the match3 rules. Please play this: https://rivasgames.com/games/zombie-strike/ And I'd be happy to see any feedback. Also this game is available for license, feel free to contact me directly if you are interest (az[at]rivasgames.com or in private message) Thank you for your attention.
  17. hi every one. i wanna make Tool to control scenes with html5 i wanna make like under images's red box. can you recommand library to make that? thx
  18. Hey guys, we've made our first HTML5 game. It is cute looking time killer game where you need to fill people's houses with Holiday Cheer. We're trying to get into the market so any insight is greatly appreciated. May be you can point to some sponsors, that are interested in this type of content. Feel free to play our game and give your feedback. Update We have ported out game to Phaser! Here is the new link: Check out the game
  19. Talking Tom Christmas Time

    Hi, play my new html5 game and leave some comments please...
  20. I'm currently writing an HTML5 game using Google Web Toolkit (GWT) and a WebGL GWT library WebGL4J. The main reason to use GWT is simply because I prefer Java over JavaScript (GWT compiles Java code, into JavaScript). There are other advantages like easy client/server communication, code reuse on front end and back end, single language architecture. I didn't see any other devs here using GWT, but thought I would put a shout out, in case I'm not the only one. So, anyone here used GWT? Did you stick with it, or switch to pure JavaScript?
  21. Indie HTML5 Studio for Hire

    Our Upstate New York studio is open to contracts for small to large HTML5 games. We work in small modular teams to keep costs down and maintain our indie creativity and feel. We work primarily in Haxe for desktop and mobile browser games, but also do a lot of Apps (often HTML5 via Cordova). We have experience with CocoonJS, Unity, Springroll, and more. We have several developers, artists, as well as audio and QA-testing capabilities. We will also be looking to hire as we grow. Feel free to send over your resumes/portfolios. matt.conheady@workinman.com
  22. Hello, I have 2 sprite animations. Once first one is played, via below function I'm checking frame index (which frame is currently playing). When current frame is my desired frame, I want to play another sprite. animations.currentAnim.onUpdate Below is my full code: firstSprite.visible = true; firstSprite.animations.currentAnim.enableUpdate = true; firstSprite.animations.play('firstSprite', 14, false); firstSprite.animations.currentAnim.speed = 80; firstSprite.animations.currentAnim.onUpdate.add(function () { if(firstSprite.animations.currentAnim.frame > 5){ secondSprite.visible = true; secondSprite.animations.play('secondSprite', 30, false); secondSprite.animations.currentAnim.speed = 60; } }, this); On desktop in a browser it works perfectly, but on mobile devices it is being stucked and once frame is greater than 5 (if(firstSprite.animations.currentAnim.frame > 5){...}), then it stops at that frame and doesn't continue to play first sprite. Is there something I'm missing. Thanks
  23. [Phaser] Santa Rush

    Hello again fellow game devs, I'm back with another game, christmas themed single button game. Check it out on the link below: https://goo.gl/FsJURd Feel free to discuss the game and what you like/dislike, I'm open to any kind of criticsm. Regards!
  24. hi, whick kind of game do you think is suitable for for pc and mobile ? girls game ,adventure ,shooting,or car ?
  25. Stickman dance music game

    my first html5 game. Recently,Stickman fall in love witch dancing.Their charming dance,dazzling music lead the nation dancing wave.When they dance,you have to click on the flowers below,give him fruit to get higher score.And remember not to hit the bomb. Play Now