Arcanorum

Members
  • Content count

    126
  • Joined

  • Last visited

About Arcanorum

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    waywardworlds.com
  • Twitter
    waywardworlds

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

733 profile views
  1. Total Annihilation? Age of Empires? This guys knows his RTSes...
  2. I've looked into alternatives, but I think the pretty API and current stability of socket.io makes it attractive to newcomers, and thus suitable for this example. Once the basics are understood, naturally I expect people will want to use their brains and do some research and decide what is best for them. I wouldn't expect anyone to make an MMO with this.
  3. Greetings! I see quite often around these parts and in further fields, that there are constantly people who are just starting out asking how to add networked multiplayer functionality to their HTML5 games. I was one of them, and I hated the near absence of practical explanations that were written in concise, plain-English, yet still detailed, of how to get started. So, I made a simple game example/template using Socket.io and Phaser, and documented the hell out of it. Almost everything gets a few lines of comments to explain what is doing what, and I haven't assumed any prior knowledge, aside from core JavaScript and being able to set up NodeJS and how to view the game in a browser. The main focal point is using Socket.io, as the game framework can be easily interchanged to one of your preference. Hopefully this will save a few hours and headaches for people who don't have a clue what they are doing. https://github.com/Arcanorum/basic-networked-multiplayer-game
  4. I've made a GitHub repo for that thing I showed you in the Discord chat. I've added a bunch of new stuff to it, like having players join a game, how to handle player movement, updating the positions of all players on the client, and removing players when someone leaves. https://github.com/Arcanorum/basic-networked-multiplayer-game
  5. 2.0.1 isn't the latest version...
  6. The game I'm working on uses multiple zones you can move between, and only uses one state for the game world. Having a state for each zone gets messy and hard to maintain very quickly. States are more about separating different purposes in a game (a menu screen has a different purpose to a loading screen, or a cutscene), so if the functionality of the 'zones' of your game world are the same, then the playable game world should just be one state. Here's my current approach: arenas.GameWorld.prototype = { preload: function () { // Load the data for the zones. this.load.tilemap('zone-1', 'assets/zones/zone-1.json', null, Phaser.Tilemap.TILED_JSON); // ... however many zones your map has. this.load.tilemap('zone-33', 'assets/zone/zone-33.json', null, Phaser.Tilemap.TILED_JSON); }, create: function () { // Good practice to keep tilemap layers in a group. this.mapLayersGroup = this.add.group(); // Create zone 1. Change to the number of whatever zone you want to load. // Whenever a player goes through a doorway or whatever, just call createZone again and give it the number of the zone to move to. this.createZone(1); }, createZone: function (zoneNum) { // Clear the tilemap data from zoneMap, if there was any. this.zoneMap = {}; // Destroy the tilemap layers of the previous map. this.mapLayersGroup.destroy(true, true); // Create the tilemap for the zone, using the value of zoneNum to load the right zone, in the first case "zone-1", and // add the tileset images to it. This assumes every zone is using the same set of tileset images. this.zoneMap = this.add.tilemap('zone-' + zoneNum); this.zoneMap.addTilesetImage('floor', 'tileset-floor'); // ... however many tileset images your map uses. this.zoneMap.addTilesetImage('trees', 'tileset-trees'); // Add the layers to the map. These are what are displayed. this.layer1 = this.zoneMap.createLayer('layer1', undefined, undefined, this.mapLayersGroup); // ... however many layers your maps have. this.layer6 = this.zoneMap.createLayer('layer6', undefined, undefined, this.mapLayersGroup); // Resize the game world to the size of whatever the biggest layer is. this.layer1.resizeWorld(); } }; Don't worry about loading times. If your zone data is already loaded then moving from one zone to another should appear to be instant, unless your game is also doing some other crazy stuff to slow it down.
  7. I'm working on an online multiplayer game and will make frequent changes, the details of which some players will probably want to check out for themselves. What standard/widely used methods of handling the distribution of game update notes to players are there, before I possibly go ahead and waste my time creating my own update log tool. I see some games include a text file with changes when they release updates, others make forum posts. Also, do developers (especially of paid games) have a legal obligation to inform customers of changes, or it is just a courtesy?
  8. Same here.
  9. Some swanky Phaser t-shirts.
  10. What does obfuscation have to do with security? If players want to mess with the game then they are within their right to do so once you send their client the files. Without a way to truly compile our games there isn't much that can be done to stop others from working out how our code works. Minification is what you should be concerned with.
  11. WebStorm all the way baby...
  12. If the function to use as a callback is declared somewhere then just call it. What I think you are doing: var yourButton = game.add.button(x, y, 'frame', function(btn){ // Button functionality code here. }, this); What I think you should be doing: var yourCallback = function(btn){ // Your code here. } var yourButton = game.add.button(x, y, 'frame', yourCallback, this); // The function used as a callback can still be called manually, even passing in the button that you want. yourCallback(yourButton);
  13. Its ok. Try using a timer to make the bubble effect ware off after a few seconds, and try using circle physics bodies for the fish, bubble and urchin.
  14. Some other thoughts if you want to do the physics on the server.