Notifications
Clear all

TextCraft RPG

106 Posts
32 Users
0 Reactions
26.1 K Views
(@jalapeno)
Posts: 33
Eminent Member
 

Killed Nefarian as a 30 mage haha. Btw, the icon for Mortal Strike is actually the icon for Shockwave from WotLK. Just pointing out things i notice hehe ^^

 
Posted : 10/05/2019 4:31 am
(@woodqawk)
Posts: 2
New Member
 

Hey Defuzed, This project is great! Are the quest on the side working or am I doing something wrong? I have killed bandits but they don't seem to update the quest.

 
Posted : 10/05/2019 6:31 am
(@default)
Posts: 54
Trusted Member
 

Very impressive :) I'm playing it while at work. I'll probably need this even when classic is out to curb the withdrawal at work haha

 
Posted : 10/05/2019 7:17 am
 tedj
(@tedj)
Posts: 9
Active Member
 

Yo Defuzed ! Great job uploading to Github. Now we can start.

So, *pulls sleeves back*, below are the things you should focus on next. Mind you they are not "picky" or "nitpicking", these are excellent foundations that will help you tremendously in the future - they are transferrable knowledge/skills that you can apply to any other coding project, web or not.

(They are also in order of importance, but I couldn't use ordered list with {list=1} since the CSS broke, teebling pluhz fix)

  • Continous Integration/Deployment (CI/CD)
  • This is the process of automating your deployment to your live site.
    There are many options here and they depend on where are you currently hosting the site, etc.

    The biggest pros in favor are:

  • Removing human error - helps preventing mistakes from developers, like missing files, or forgetting to upload something

  • Reducing the developer time/interruption - automating the process means less work for you, the main dev


  • Ideally with CI/CD, when a pull request is created by anyone against the master branch, it will, in order:

  • Automatically trigger the process to build whatever needs to be built - in this project's case, there is no build process yet

  • Run whatever tests are created - none here either

  • Do any extra steps depending on project

  • Once accepted and merged, take all the files from the repository's master branch (Github in this case) and upload them to wherever you host the site


  • Usually it will run all steps except the last upon creation of the Pull Request and if any of them fails at any point, it will prevent you from merging - which prevents the last step. With CI/CD, in theory, you shouldn't need to even leave Github ever again.

  • Organised Code
  • I want to start by saying your code is already very readable. That is the best first step to organised code!
    The next step would be to modularize your code into small bits, which by the way, I see you've started too (with Creature), so great job again!

    The biggest reason for this would be that it's just easier to contribute, maintain, read, and compare code when it's separated into smaller chunks. I generally try to not have any JS file larger than some 200 lines.

    You might feel like it's adding "bloatedness" with too many folders and files, but really it will just be more organised and easier to use, especially with open source and external contributers.

  • Code Format/Styling/Rules
  • For me, having been team leader on quite a few projects, this is one of the most important standards to apply.

    No one codes the same - that is fact and not argument. So when you have multiple people working on the same project, you are bound to clash different code styles. Here's an example of completely different bits of the same JavaScript function:

    function Foo_hello() {
    console.log("bar");
    }

    const fooHello = () => console.log('bar')

    Can you spot all the differences? I'll note them:

  • Normal function, vs arrow line function - function vs () =>

  • Function name starting with a capital, vs normal

  • Function name being underscore based, vs camel case

  • Using double quotes for strings, vs single quotes

  • Finishing with semi-colon, vs nothing


  • As you can see, it can vastly change. And that creates readability problems, which itself creates low-productivity/annoyance problems.
    So, the solution is to force a use case that the team (or project lead) decides on and everybody must follow those standards.

    And now you'd say "But people will forget", so I'll refer you to the first point: CI/CD. There are many tools to force these code standards, either during CI/CD or actually in your editor (like ESLint, or Prettier) that work with most editors and automatically change your code when you save a file. This way you can code however you want, but it will be instantly transformed to the standards of the project.

    I feel like this is already going long, so I'll stop the teaching for today! Now, there are some actions you can take towards these first teachings:

  • Tell us where your current site is hosted, and we can see if together we can automate this process for CI/CD

  • Start separating your code a bit - I'll do a pull request in a bit with an example of a good structure

  • Leave code styling for later, as we'll need CI/CD and some processes to automate this


  • In the next lesson, *laughs in teacher* we'll be learning about the advantages of a good Readme.md file, correct settings for your Github repository, and we'll take a look at improving your developer experience/speed with Editor plugins that will make your life so much easier!

    The lesson after we'll see how to "modernize" your project so that you can make better use of external tools - like the code standards, "npm" and more, how to use said tools, and how to start up your own javascript backend!

     
    Posted : 10/05/2019 11:46 am
    (@defuzed)
    Posts: 52
    Trusted Member
    Topic starter
     

    Killed Nefarian as a 30 mage haha. Btw, the icon for Mortal Strike is actually the icon for Shockwave from WotLK. Just pointing out things i notice hehe ^^

    Yea mage is a bit overtuned, next update should fix them being overpowered, for mortal strike i simply don't have the icon so shockwave was the closest i could get.
    Hey Defuzed, This project is great! Are the quest on the side working or am I doing something wrong? I have killed bandits but they don't seem to update the quest.

    Quest isn't working yet. They will be added in a future update.
    Very impressive :) I'm playing it while at work. I'll probably need this even when classic is out to curb the withdrawal at work haha

    Thanks a lot haha. This project is to keep my mind off the agonising pain of waiting for classic!
    I feel like this is already going long, so I'll stop the teaching for today! Now, there are some actions you can take towards these first teachings:

  • Tell us where your current site is hosted, and we can see if together we can automate this process for CI/CD

  • Start separating your code a bit - I'll do a pull request in a bit with an example of a good structure

  • Leave code styling for later, as we'll need CI/CD and some processes to automate this
  • The host is one.com, my code is kind of split up in different stages depending on what i learned that week, i try to update all of it as much as i can but it gets abit heavy to update the same code over and over, and since i've been learning a lot of object oriented programming the last 2 weeks it's a lot of rewriting code which im doing right now.

    As said this is still a school project i use for applying the things i learn everyday.

     
    Posted : 11/05/2019 9:53 am
    (@solidlobster)
    Posts: 63
    Trusted Member
     

    Really nice, this is fun!

     
    Posted : 11/05/2019 10:35 am
     Cram
    (@cram)
    Posts: 49
    Eminent Member
     

    Hey Defuzed,

    I've created a pull request on github. Small fix. It was my first pull request ever. I just wanted to test it and see how it works!

    Still a small fix though ;)
    Look into it when you have time.

    Cheers

     
    Posted : 12/05/2019 10:09 am
    (@executive)
    Posts: 41
    Eminent Member
     

    Defuzed just figured you might want to know about this, the 1k needles Basilisk can cast Stone Gaze and it turns your health into NaN, which I can't tell if that makes me invincible or just makes it so that you cannot tell what your health is lol.

    Also, if Mortal Strike is going to have a cooldown, can we get a tooltip that at least SAYS what that cooldown is?

     
    Posted : 12/05/2019 11:41 am
    (@teriko)
    Posts: 20
    Eminent Member
     

    will there be rp server

     
    Posted : 12/05/2019 11:56 am
     tedj
    (@tedj)
    Posts: 9
    Active Member
     

    Defuzed I've left you a PR as well with some code refactoring. I've basically only refactored a function to show you how you should code in JS good standards and how to create a class with a constructor in JS too. I've left comments on all edits so you can run them one by one.

     
    Posted : 13/05/2019 11:28 am
    (@lassekaae)
    Posts: 19
    Active Member
     

    I love this idea <3 so creative

     
    Posted : 14/05/2019 3:28 am
    (@nerotip)
    Posts: 1
    New Member
     

    Thank you from Germany for this wonderful game :)

     
    Posted : 14/05/2019 12:59 pm
    (@deiwaiwanga)
    Posts: 7
    Active Member
     

    I am trying to play this on my cellphonr but i dont get the whole screen... :cry:

     
    Posted : 14/05/2019 1:09 pm
    (@defuzed)
    Posts: 52
    Trusted Member
    Topic starter
     

    I am trying to play this on my cellphonr but i dont get the whole screen... :cry:

    It sadly doesn't work on phone yet... I'm working on making it work for phone atm.

     
    Posted : 14/05/2019 1:26 pm
    (@defuzed)
    Posts: 52
    Trusted Member
    Topic starter
     

    @Defuzed I've left you a PR as well with some code refactoring. I've basically only refactored a function to show you how you should code in JS good standards and how to create a class with a constructor in JS too. I've left comments on all edits so you can run them one by one.

    I'll go look it through as soon as I can!

     
    Posted : 14/05/2019 1:28 pm
    Page 6 / 8
    Share: