mattstyles

Moderators
  • Content Count

    1633
  • Joined

  • Last visited

  • Days Won

    20

Reputation Activity

  1. Like
    mattstyles reacted to b10b in What to do if my game is published without my permission   
    Sorry to hear this, it's frustrating and not uncommon for quality games.  Locking a game will have limited benefit, don't blame yourself.  Practical advice is don't spend more than 5 minutes worrying about it (a DMCA takedown should take less than 5 mins once you've done it a couple of times).  Some additional takeaways are: 1) brand future games in multiple ways so stolen traffic still promotes the author and proper licensing channels, 2) develop server-authoritative or partner-publishing strategies for monetization, 3) offer paying customers more value than what they could achieve by stealing, 4) remember a sequel is quicker for the original author to make - and everyone prefers to play the latest greatest - so if stolen games get traction cash in later.
  2. Like
    mattstyles got a reaction from webdva in I hate designing levels!   
    Procedural generation can be a load of fun, but its a butt-ton of work to get working well.
    You could even use a genetic algorithm (GA) to create levels, have an automated actor play them, test the 'success' of the actor using fitness functions and then loop that process until you get levels (again, based on a heuristic function) that are fun to play. The up-shoot is that you can, potentially, create a near infinite number of levels like this. Or at least generate a manageable amount (say, 30) and manually curate them. Depending on how good your heuristics are you can create levels that are harder or easier for humans to play.
    It's a ton of work though. So depends on your mindset. Some crazy people find that a wonderful coding challenge.
  3. Thanks
    mattstyles got a reaction from -AAG- in Is it like backstabbing my clients?   
    If an 'adequate' amount of time has elapsed then I think it makes sense, it turns their license in to what is something like an 'early access' license (and, by that, I mean, they get it before everyone else, not like steam early access which is before its ready), which almost certainly isn't what is written in the license but it almost certainly isn't prohibited either.
    As you have a good relationship with them, maybe ask them what they think and how they think they might react?
    I'd like to say that they understand business and you're just driving profits and that it is all really rather understandable and totally normal for you to make enough money to feed yourself and buy a few nice things, but some people are hard to judge.
    For what its worth, so long as a decent amount of time has passed since the initial (and often only) license was sold I don't see any conflict with attempting to monetise your back catalog.
    Keep them sweet by promising lots more top notch games they can license before everyone else
  4. Like
    mattstyles reacted to TheAlmightyOne in Why do two websocket messages seemingly show up at the same time?   
    Sure you can. If you're brave enough you can use webRTC over UDP and create you own UDP stack to handle packet order/drops etc. This has an additional advantage of less overhead in each message and that in turn means possible performance improvements.
  5. Like
    mattstyles got a reaction from TheAlmightyOne in [Help] creating a login session   
    Hi @maximlus, welcome to the forums
    Logins need two things:
    * A way to track logged-in status
    * A way to set logged-in status
    You can track logged-in status on either the client or on the server, but you almost always want to track _something_ on the client. The complication comes from identifying _who_ that client is, and that you can not trust clients.
    A common flow for a single-page application (your game probably is this) would be something like:
    * Hit your webpage holding your game
    * Navigate to log-in screen
    * Enter log in details (e.g. id/email, password)
    * Send those to your server. Check the details, if correct, generate a token, store it, send it to client.
    * Client stores this token (local storage is fine) and uses it to make subsequent requests or to actually enter the game.
    * Next visit, when client boots up (after hitting the url), check local storage for a token, maybe send it to your server to check it is still valid, become logged in.
    This flow means you have to store 3 things:
    * id/email and password details (server)
    * valid tokens (server)
    * logged-in status (client)
    Valid token status dictates logged-in status i.e. you should probably check the token is valid before assuming that it is.
    Tokens normally have two things:
    * An expiry
    * Are revocable
    An expiry means they will expire, you don't necessarily need to store this on the client, i.e. when the expiry date is hit then delete from server storage, when a client tries to use it, that operation will fail and you'll direct the user to a place where they can enter their details to generate a new one.
    This system also means that if you think anything is compromised (or problematic) then you can revoke a token. You could go a step further and associate a token with a user explicitly which gives you more control if you want to boot out a user, i.e. you revoke their token so they stop immediately, and you stop them from being able to generate a new one.
    It is normal to do this link between tokens are users, check out JWTs. If your game requires accessing authenticated endpoints (getting levels, scores, anything really) then using a token to do the auth stuff is quite nice i.e. your services _could_ inspect the token and respond appropriately for that user (or user type) i.e. to get the _next_ level, you wouldn't have to ask for it from the client (remember, don't trust clients), you could hold current level on the server and your endpoint could inspect the token, inspect the current level (and completion status maybe) and return the next level.
     
    There are lots of services out there that can handle these flows (and more complicated ones, such as 2FA) for you. It's worth looking up how they work and if they would work for you. Unless you want to code this all up and have to deal with holding emails or other personally identifying information (or even user tracking).
  6. Like
    mattstyles reacted to -AAG- in I hate designing levels!   
    Had to look up the word heuristic so this can't be something I can do 😀. But I can see how this could be a lot of fun to someone who actually knows what they are doing. I guess that is how those guys that make the Flow games have so many levels plus daily challenges. 
    I do appreciate all the feedback. Thanks!
  7. Like
    mattstyles got a reaction from b10b in I hate designing levels!   
    Procedural generation can be a load of fun, but its a butt-ton of work to get working well.
    You could even use a genetic algorithm (GA) to create levels, have an automated actor play them, test the 'success' of the actor using fitness functions and then loop that process until you get levels (again, based on a heuristic function) that are fun to play. The up-shoot is that you can, potentially, create a near infinite number of levels like this. Or at least generate a manageable amount (say, 30) and manually curate them. Depending on how good your heuristics are you can create levels that are harder or easier for humans to play.
    It's a ton of work though. So depends on your mindset. Some crazy people find that a wonderful coding challenge.
  8. Like
    mattstyles reacted to Langerz82 in 2D Overhead - Randomly Generated Maps   
    Hello,
    The methods I used are here:
    https://gist.github.com/Langerz82/d4d4291d7aa9d846ed64ab1bb27a9142
    Apologies on the lack of documentation as I am still coding it. Basically each map object needs a array of the tiles it going to use. Then apply the right function to it. The first function supports erosion which removes the underlying tiles for optimization purposes. After the map is generated I simply loaded it in Phaser and bam new map.
    I'm going to use this code to support Retro RPG Online so it will have a massive amounts of maps. You still may need to tweak the map generator to get your desired results especially the avoiding placements of Objects with other layers. If anybody creates a working dungeon generator please share it, as that is the next thing I will be working on after I get some more resources put into the maps so they are more dynamic.
     
     
  9. Like
    mattstyles got a reaction from b10b in 2D Map Representation as 1D array   
    @b10b yep, thats it exactly. I have a central 'store', which is just a big object, technically you could pass class instances (or functions) through as well but I'm not sure the exact downsides of that (easy serialisation is one, but could be worked around easily enough).
    Re-rendering is a side effect of changes to that central object and will only occur when changes are detected (standard React rendering, which is the same as many true FP languages).
    You could have both systems side-by-side and have a more manual system to 'tell' certain UI elements to that they need to re-render, I've tried that too with varying success.
    I think, in my case at least, I could get a lot of benefits from memoizing some transform functions as I'm effectively running the same thing several times each render tick.
  10. Like
    mattstyles got a reaction from 8Observer8 in Should I use an rendering framework or HTML canvas for game development?   
    I think you've maybe misunderstood how these frameworks get their output into your eyeballs. They *all* use canvas, 3d accelerated or not, its a canvas element they output to.
    If you want to learn how canvas and context works, dig in, its a great learning experience.
    If you want to get some meaningful output to the screen, use one of the many available frameworks.
    Creating these canvas rendering libraries is no small task, not small at all. It's a lovely technical task to undertake, but, its really tricky so you probably need to decide if you want to invest your time creating a rendering engine, or creating a game/app/whatever to use that engine.
    You should get an unbiased view here, plenty of people here have invested in making their own rendering libraries.
    If making a game is indeed your goal, use something like Pixi or Phaser etc to do the heavy lifting and focus your effort on making the game fun.
    Also, on nomenclature, I tend to differentiate between library and framework, although the line is often blurred.
    Phaser is a framework, it handles things like audio, rendering, user input, application structure etc.
    Pixi just renders stuff really fast, it is a library/module.
    To reinforce this, Pixi is contained within Phaser 2, and is just one part of it.
    Your outlook on coding dictates whether you are more drawn to using a framework vs consuming libraries and, in effect, creating your own framework from those pieces. Pros and cons to either approach.
  11. Like
    mattstyles reacted to BdR in [phaser] Snake Slider, puzzle game now in JS   
    The game was just released on coolmath-games
    https://www.coolmathgames.com/0-snake-slider
  12. Like
    mattstyles got a reaction from SarahJ in Should I use an rendering framework or HTML canvas for game development?   
    I think you've maybe misunderstood how these frameworks get their output into your eyeballs. They *all* use canvas, 3d accelerated or not, its a canvas element they output to.
    If you want to learn how canvas and context works, dig in, its a great learning experience.
    If you want to get some meaningful output to the screen, use one of the many available frameworks.
    Creating these canvas rendering libraries is no small task, not small at all. It's a lovely technical task to undertake, but, its really tricky so you probably need to decide if you want to invest your time creating a rendering engine, or creating a game/app/whatever to use that engine.
    You should get an unbiased view here, plenty of people here have invested in making their own rendering libraries.
    If making a game is indeed your goal, use something like Pixi or Phaser etc to do the heavy lifting and focus your effort on making the game fun.
    Also, on nomenclature, I tend to differentiate between library and framework, although the line is often blurred.
    Phaser is a framework, it handles things like audio, rendering, user input, application structure etc.
    Pixi just renders stuff really fast, it is a library/module.
    To reinforce this, Pixi is contained within Phaser 2, and is just one part of it.
    Your outlook on coding dictates whether you are more drawn to using a framework vs consuming libraries and, in effect, creating your own framework from those pieces. Pros and cons to either approach.
  13. Thanks
    mattstyles got a reaction from Hirikgg in Need help in resizing sprite sheet   
    If your source sprites are smaller than you need (i.e. draw a box around the sprite in spritesheet using any drawing tool and it'll tell you how many pixels wide and high it is) then you'll need to repack them.
    I'm not sure what spriteSourceSize and sourceSize refer to, but they are different aspect ratios, so it isn't just that one is a scaled version of the other.
    Normally sprites refer to bounding boxes in the spritesheet, from which you can use portions of the sheet. If that portion is smaller than you need then you either need to enlarge it when using it (which will result in loss of image clarity) or make it larger in the first place.
  14. Like
    mattstyles got a reaction from ivan.popelyshev in ES6 code in pixi bundle causing errors in Safari 9 and IE11   
    How are you bundling?
    https://github.com/Hypercubed/mini-signals/blob/master/package.json#L6 mini-signals exposes ES6 modules. Parcel uses these as standard, Webpack might also use that.
    Might want to make sure your bundler is configured correctly, I looked through the link Ivan posted above and it all looks ES5 compliant in there so Pixi's rollup (which usually honours jsnext:main) doesn't look like the culprit. I suspect it could be due to your app bundler pulling mini-signals from node_modules.
  15. Like
    mattstyles got a reaction from Nagval333 in SICARIO KID - quick-shot duel   
    Terrific game, I found it mega hard! My high score was 2 for a while, but I quite liked that difficulty, without it I think things would be stale and you kind of get into a groove after a while, where I amassed a mighty 11 (!).
    I spent $500 for a heart upgrade, but didn't realise it only counts for the next run. Not sure if that is a good thing or not but my expectation (from other games) is that an upgrade is usually forever in these sorts of games. Not necessarily saying it _should_ be a forever upgrade, just that it was unexpected. I'm also not sure how you might solve that without more obvious text, which would kind-of break the immersion you've built up, which I really like in games. Of course, it may very well just be me and no-one else is so easily confused!
  16. Like
    mattstyles reacted to themoonrat in How much faster is phaser3?   
    Pixi 5 alpha I should remove really. Webgl Anti aliasing is accidentally always on, so kills performance. Dev is v5 with that fixed!
  17. Like
    mattstyles got a reaction from Chewgako in Any direct gamers forum you can recommend me?   
    Reddit is pretty popular for finding communities and audiences
    r/roguelikedev for example
  18. Like
    mattstyles reacted to ShrewdPixel in Hosting recommendations ?   
    If you're on a super tight budget, you can't beat Heroku. (Free and tons of tutorials)
    If you have a good budget, Amazon Web Services. (Pricey, but tons of features and a fair amount of tutorials.)
    If you already know what you're doing and want cheap and fast performance, Digital Ocean. (Fairly cheap, but very few tutorials that aren't out date.)
    I use Digital Ocean, but I wouldn't recommend them for beginners because the learning curve is much steeper. (But I can run a fast gaming server on them for $5 a month).
    And there are others, but I'd say those 3 are the most popular. (And hence you would find the most online documentation for them.)
    Hope that helps!
  19. Like
    mattstyles got a reaction from ShrewdPixel in best way to convert ES6 syntax to ES5 ?   
    Oooo, this thread could get flamey! Ha ha.
    There are numerous advantages to using ES6, a quick google search will give you heaps of reasons, with the only con being that you probably have to up the complexity to transpile back to es5/3, however, all modern browsers support most of ES6 (and newer) syntax so unless you're supporting really old browsers (and you stick solely to ES6) then you probably don't need to transpile.
    The biggest advantages of ES6 (for me, and I've missed loads here):
    * ES6 was pushed through to create more complex applications, as such it has a lot of syntax that is more useful for doing so. Some are sugar methods only, some actually provide newer functionality (particularly those related to primitives and/or the DOM).
    * New built-in extensions which make many tasks way way easier (and easier means less error-prone)
    * Sugar methods mean less dev typing which generally means less mistakes. Some things ES6 makes easy are very very hard in ES5 and they are often things devs rely on regularly so making them easier to work with means writing code is less error-prone and reading code is clearer so you can focus on what your code does, not how it does it.
    The biggest advantages of setting up a transpilation pipeline are (again, I'm missing loads):
    * Access to a module system
    * Access to whatever new syntax you want
    The con of a transpilation system is increased project complexity and you have introduced a build step which takes some time to run, as your project grows this sometimes becomes prohibitive but you do have to have a very large project for this to happen and most modern build tools abstract away incremental builds and caching i.e. they only re-build the changes so incremental builds become smaller and faster.
    Another con is related to the module system. Modules are awesome, very awesome. However, JS doesn't (yet) natively support them in the browser and even when they do there are additional problems i.e. if you use modules heavily (as you probably should) then your list of dependencies could easily be hundreds or even thousands of files, loading each of these one by one in the browser isn't a good idea and won't be in the foreseeable future.
    A module system also implies that you need some way of getting dependencies. This isn't technically necessary but is often helpful. If you are writing games then often you'll be using one (or maybe two) large frameworks to help, unless they work nicely with a dependency management system (i.e. NPM) then I wouldn't worry about getting them as 'real' modules, just include them on the page and use them, then use a module system for your own code if you want to.
    Newer syntax and mobile games
    Any gaming is typical performance sensitive, newer syntax has a few things to consider:
    * Browsers are well optimised for ES5, this isn't always true to ES6 (although ES6 is pretty good now as its fairly old and almost universally adopted in browsers)
    * Given the above, transpiling is often better for performance
    * The code generated by these tools during transpilation is superb, it is written by many many superb developers and has great community support so the hours invested in it must be astronomical i.e. in many cases these tools will write better code than you or I do!
    * It is not a silver bullet -> if perf is a concern for you then you are still largely the sole arbiter of whether you achieve your perf goals.
    How to use newer language features:
    Babel is the defacto tool (although it isn't your only option). Babel requires a bit of setup work and additionally requires you to set up a build process for your code. Again, there is tooling for this. Additionally, there are many project scaffolds out there (and tools for creating them) that can abstract this away.
    The absolute easiest way of getting access to these new language features but supporting older browsers is to use parceljs.
    Parcel abstracts away most of the complicated build stuff and has a superb feature set. It involves a few pre-requisites:
    * You must know how to run simple commands from the command line
    * You must have Node and NPM installed
    Once you have these things (which is generally true of any JS build system you might want to employ) then running builds is a simple one-line command. A watch task is also bundled in, this is another simple one-line command to run and watches the file system, every time you save a change it rebuilds only what has changed and propagates that to the browser. Parcel relies heavily on caching and multi-threading so is very very fast.
    Other tools include webpack (which is very complicated, although newer versions I think make things way way easier for most use-cases) and browserify (which is simpler in scope, but can feel a little low-level for many people).
  20. Like
    mattstyles reacted to robertbrooks in Where to get game assets?   
    I Know this is a bit of a late reply but for anybody else browsing this post, You can check out my "now quite large " collection of 2d game assets and animated game sprites at https://www.gamedeveloperstudio.com loads of free ones there too. 
  21. Like
    mattstyles got a reaction from socceronly in Should I get a VPS or a Cloud Droplet   
    1and1 are offering you a managed solution of sorts, DigitalOcean is usually just the hosting, it's up to you how to configure and manage it. You can run multiple different sites from one 'droplet/instance' without issue, depending on the site.
    If you're wanting to publish a client-only JS game then I'd consider something like now.sh or netlify. They make it super trivial to get such apps in to the wild.
  22. Like
    mattstyles got a reaction from Slicks in [WIP] Drift Team   
    Ha ha, that is awesome @Slicks, great work on finding and fixing so quick. 10/10 will race again!
    (just as well you found it, I couldn't remember at all what I put in as a name!)
  23. Thanks
    mattstyles got a reaction from Slicks in [WIP] Drift Team   
    That was great, I really enjoyed this game.
    I did, however, have a few places where I seemed to crash but I wasn't anywhere near an obstacle or car. The first practise one (chase?) had a few places where I'd crash for no obvious reason.
  24. Like
    mattstyles reacted to zoki_y8 in Y8 Destroys Your Games (and websites)   
    Thank you. This topic should be open as long as it takes so that everyone can have their thoughts/questions cleared out from our side, and most importantly, if anyone has any game problems like Phaser911 which we can help with, we are here to help in HTML5 devs forum.
  25. Thanks
    mattstyles got a reaction from zoki_y8 in Y8 Destroys Your Games (and websites)   
    Not called for in the slightest.
    I understand this thread is quite intense and tempers are running high, but we're right on the line here.
    It'll remain open for now, but please keep the discussion on track about the issues, not insulting anyone.