Jump to content

Search the Community

Showing results for tags 'reusable'.

  • 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 1 result

  1. Hi! I'm new to JS gamedev, but I had a good experience in Flash/AS3. So, I'm starting a board game, and I need to roll a dice/roulette every turn. A kind of window will appear over the board and the player will be prompted to click the roulette. It will return a value between 1~9. What I have until now is ths: https://jsfiddle.net/snake/m317ona9/ As you can see in my code, I'm using create() and update() methods just to create this example. In real game it wouldn't be handled like that, but in middle of game. I have not so much ideas on how I can make a nice architecture in my code.What I have in mind, with my current small knowledge in Phaser, is to make a lot of conditions to manage states in game loop. The final code would be a maze! The perfect case for me: Create a function which would treat this roulette as a component or something like it, maybe with his own create and update methods, and returning a value to the game, so I can reuse it without the need to mess up my code. Hope I've made myself clear How can I proceed with it? Thanks in advance!
×
×
  • Create New...