Jump to content

Alan

Members
  • Content Count

    136
  • Joined

  • Last visited

  • Days Won

    12

Alan last won the day on May 16

Alan had the most liked content!

Community Reputation

55 Excellent

About Alan

  • Rank
    TheGrumpyScot

Personal Information

  • Location
    UK
  • Occupation
    Lead Developer
  • Website
    https://the.grumpy.scot

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 163 errors 513 warnings 171 weak warnings 179 typos And that's the so-called reformatted code... I thought the RC engine was commercial - though by the looks of it, one fails to see why. Cyclomatic complexity suggests in excess of 51 with one tool, and 21 in another ... both of which are far higher than I'd be happy with - not to mention 9 functions in 940 odd lines of code ... suggesting ~100 lines per function -- too many to fit on most screens (yes, some do, some not). Saying all that, there are a number of potential bottlenecks - running it through xdebug's profiler would probably be helpful, though I have an inkling as to where the problem may lie, but without seeing the database not to mention a quick peek at /proc - it's not easy to point a definitive finger at a particular bit of code. With limited knowledge of the environment, database etc; I'd be looking to explain all queries, and more importantly run through a profiler to see what function(s) are taking the time -- it may also be worth looking into any sessions and how they are being stored as php does like to cause all manner of issues from time to time with session. Assuming your version is low (because of the mysql) calls - it's probably worth investing some time upgrading to a recent version, and deploying an opcache though that may be a little tricky for some. Oh and slightly easier to read? No ... ... use a proper formatting tool or refactor the code -- PHPCS springs to mind (untested).
  2. Alan

    WC: Ruthless

    One example of different methods -- https://codepen.io/thegrumpyscot/pen/bPoexd
  3. Alan

    Help Wanted

    Well obviously I did - otherwise why would I respond? I stand by initial point: in any situation, if somebody asks for help they have to be prepared to provide some form of access and not waste people's time. A remote session, whether by TeamViewer or similar technology, is a form of access as it grants the ability for the helper to see information which would not be otherwise available to them. I've no issue with them even as the viewer only however when I'm in called to fix issues, those issues usually require a more hands-on approach as often the person or persons requesting the help have exhausted other avenues.
  4. Alan

    Help Wanted

    Clearly you misunderstood the point of the post; not that I wasted 20-30 minutes; but that owner/admins have to be prepared to provide access to files/data etc.
  5. Alan

    Vouch for meh

    I think I'm in the same position. And yes, I would and have vouched for him.
  6. Alan

    Help Wanted

    Interesting problem I encountered this morning; and this is a warning to people here about asking for help. If you have a project that suffers from some issue, be it a code problem, a data problem, a spam problem etc and think you need help from one of the developers here, then be prepared to give them what they need; i.e.; access to your code, access to your data etc. Otherwise how are they going to fix your issue? I dislike wasting my time in signing up to somebody's project with a view to looking to see the problem for myself so that I might be able to advise on how to fix it only to be told that the owner can't possibly share the credentials with me. I won't mention the individual in question as that is irrelevant however I've wasted a good 20-30 minutes of my time; for nothing. Yes, I realize that trust is something that is earned however you have take a risk now and again. Just don't waste out time by inviting us into discussions then backing out as you've not thought things through.
  7. Alan

    The Marketplace

    Bugger ... The plugins are causing a number of problems in-as-much-as getting the urls in-place; I suspect I may have to document how to manually add urls to your project as it seems just too complex to try and work out where to put them. I guess there is a reasonable case for this in that you may want a module to be only visible for players of level 5 and above for example which just can't be done that I can see. Any thoughts?
  8. Alan

    The Marketplace

    Well modules must be openly named, I see no need to restrict people to use *my* naming convention; to a certain extent the same holds true for the namespace. Yes, I suspect modules will need to *extend* an AbstractBaseModule as this will provide them with the necessary facilities (ie access to core services, the render engine etc). As for registration, I'm thinking something along the lines of a JSON registration file which contains a relative link to the module's routes.php file as well as pointers to any schema change. This would mean that for the system to work I only need load the module's routes.php file during initialisation. Thereafter; only if any of the module's components are need it will be autoloaded.
  9. Alan

    The Marketplace

    Bit of a mix; I'm using a micro-framework; and adding the elements I need to it: DI, logging, database, image processing etc. It means that the core is very light so problems can be diagnosed more quickly as there is less code to have to hunt through.
  10. Alan

    The Marketplace

    Well that is the general idea - what I'm doing is making a very small core "engine", linked to a marketplace that permits developers to upload modules and optionally set prices. The core engine would be free as would a number of the modules on the marketplace.Initially of course, it will be only my own modules however once I've fully designed the core components, I'll open-source it and see if we can get other developers in to help make some of the modules.
  11. Alan

    The Marketplace

    Had a thought last night about using composer as the plugin system -- it's an oddity, but actually it makes a lot of sense in that you are not duplicating code; however I'm a) not sue how to create a "project" for composer, and b) how it would handle things like registration of routes, templates, functions etc. ... Obviously going to have to have another play. Anybody had any experience in this line?
  12. Alan

    The Marketplace

    The plugin system seems to be a winner - there's a couple of caveats that I'm unsure about; specifically I'm having to use reflection to determine the module's identity, and thus path in order to extend the template paths -- not sure how that will work in an "under load" environment; though it could be replaced with the same type of mechanism I use for auto-loading of custom modules. Routing also looks suspiciously or rather potentially slow (currently using a glob), I suspect that can easily be replaced with a simple custom composer script. Next stage is to grant plugins the ability to request alterations to the database structure; this will allow things like the addition of attributes on the player record. The template system is such that while there are a core set of templates; each module will normally extend those to suit. Of course, you are free to override *any* template and in fact you will need to make minor changes to templates when you add certain modules; (ie - positioning links to modules exactly where you want them).
  13. Alan

    The Marketplace

    Well, with the apparent lack of action on games here - I've decided it may be time to create my own. It's a tricky thing creating a new game; as it has to cater for so many different needs; so my first port is a marketplace for modules and templates that can be easily pulled into the game complete with dependencies. The image below is representative of the current work so far. (N.B. module names, brief descriptions, icons, prices and stars are all for my own testing). The core game itself is a while off completion yet - getting it to work with the complexity of the plugins system is causing some interesting headaches, but it looks very possible. Once I've got the core working with a basic set of mods - some of which will be dependant on others like the casino games - I need to design a number of templates which may be a task suitable for some of the peeps here - its primarily Bootstrap 4 based with modules having their own specific overrides, graphics, even typefaces etc. Nothing too fancy, but it allows for fantastic customisation. Anyway, enough rambling ... here's a quick preview of the Marketplace home page (or at least the top part of it!). Oh and before anybody points it out - yes I'm aware I forgot to correctly name the slots module!
  14. Think of it like British Rail -- always late That being said - there are other projects that are being released; you need only look around.
×
×
  • Create New...