Jump to content

Search the Community

Showing results for tags 'basicgame'.

  • 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
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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 2 results

  1. I've been updating my base projects in-line with ECMA2015 standard. There is a lot of good stuff I really enjoy in this. I think the use of classes really makes code more easy on the eyes and easier to manager. I've created a base project using the Basic Game example tutorial using some of the new stuff. BasicPhaserGameECMA2015 I've not setup the menu or gameover states, but that should be simple enough. Hope you guys get some use out of it.
  2. Hey there! We've established before that javascript and therefore phaser games can be manipulated via console and that this can only be prevented by double checking everything with the server. Now aside from that, I wondered if it would to a certain extend help to 'hide' BasicGame, which usually is a global variable and can therefore be accessed easily. My idea is this: (function() { var cfg = { width: 1280, height: 720, renderer: Phaser.WEBGL, antialias: true, parent: 'gameContainer', enableDebug: false }; var states = [] states.push(['Boot', BasicGame.Boot]) states.push(['Preloader', BasicGame.Preloader]) states.push(['MainMenu', BasicGame.MainMenu]) states.push(['Intro', BasicGame.Intro]) states.push(['XMode', BasicGame.XMode]) BasicGame = null; var game = new Phaser.Game(cfg); for(var i = 0; i < states.length; i++) if(isDefined(states[i]) && states[i] != null) game.state.add(states[i][0], states[i][1]); game.state.start('Boot'); })(); I've implemented that into my index.html and it works fine. I imagine it makes the game way harder to adress via console, but many some of you with a deeper understanding of javascript could tell me if there really is any use to it, since there's the small downside that when working with global functions, I always need to pass game to them. Thank you!
×
×
  • Create New...