1. Welcome to the Brawl website! Feel free to look around our forums. Join our growing community by typing /register in-game!

[Speed Coding #2] - Soldier

Discussion in 'Capture the Flag' started by Algelier, Oct 27, 2016.

Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...
  1. Algelier

    Algelier Former Staff Member.

    Joined:
    Sep 29, 2013
    Messages:
    1,811
    Ratings:
    +1,108
    Hello CTFers,
    In these following videos, you'll find a different source code of the Soldier and a render in-game. I haven't coded the class as it is in the official game, I changed the "mana" of the sword to a leveling system and I added particles and sounds.

    With no further ado:
    Here's the code (with a better video quality)!:


    Note: I have changed/added a lot of things so this is not is final source code that has been recorded.

    The system of the Soldier is very simple, each time you right-click on a block, your level will go down one by one (-1/r.click), and this will launch a timer which, everyone 5 seconds, reloads your sword with +1 level (+1/5s.). Therefore, the faster you will click with your sword, the faster your sword will be fully reloaded.
    You start with 20 levels.
    If your level is = 0, you can't use your climbing sword anymore and you wait until it reloads.

    Render In-game:


    Note(2): I haven't coded the Heavy as this class is very basic and doesn't have any abilities/passives.

    Archer's code: https://www.brawl.com/threads/62162/

    Next classes to code will be Assassin & Ninja.
    Algelier.
     
    • Like Like x 9
  2. 13kss

    13kss Well-Known Member

    Joined:
    Oct 27, 2015
    Messages:
    591
    Ratings:
    +330
    Where did you learn to code
     
  3. Algelier

    Algelier Former Staff Member.

    Joined:
    Sep 29, 2013
    Messages:
    1,811
    Ratings:
    +1,108
    As I said in my previous thread for the Archer, I learnt by following french guides on YouTube or tutorials. Here are three useful links in order to learn Java (shootout to @Totom3 for the last one). However, it is mainly in French so I don't know if there are guides that do exist in English except the first and the second one.

    https://www.youtube.com/user/TheBCBroz
    https://www.codecademy.com/fr/learn/learn-java
    https://openclassrooms.com/courses/apprenez-a-programmer-en-java
     
  4. xGhale

    xGhale HG‘s Doom guy

    Joined:
    May 18, 2015
    Messages:
    2,904
    Ratings:
    +1,393
    I love the explosion and particle effects on the climbs!
    Great work sir!
     
    • Agree Agree x 1
  5. Finnerdt

    Finnerdt Well-Known Member

    Joined:
    May 17, 2015
    Messages:
    203
    Ratings:
    +63
    hahahahahahahahahahhaha great meme
    french people ;D
     
    • Agree Agree x 1
    • Funny Funny x 1
    #5 Finnerdt, Oct 27, 2016
    Last edited: Oct 27, 2016
  6. CommunistBelgian

    CommunistBelgian Well-Known Member

    Joined:
    May 19, 2015
    Messages:
    1,689
    Ratings:
    +457
    Discord:
    Unifier#8807
    Continue avec ce travail! T'as fait bien! Peut-être tu seras le nouveau developpeur ;D
     
    • Like Like x 1
  7. Deppuccino

    Deppuccino Well-Known Member

    Joined:
    May 19, 2015
    Messages:
    1,596
    Ratings:
    +341
    What he said ^
     
  8. Algelier

    Algelier Former Staff Member.

    Joined:
    Sep 29, 2013
    Messages:
    1,811
    Ratings:
    +1,108
    "Keep doing this! You did great! Perhaps you will become the new developer ;D"
     
    • Like Like x 1
  9. minecraftnoob999

    minecraftnoob999 Well-Known Member

    Joined:
    May 17, 2015
    Messages:
    927
    Ratings:
    +358
    Oh god, please please please please, stop taking any advice from TheBCBroz. From fellow coder, and spigot plugin developer, do not learn from the BCBroz. You will only learn the incorrect way to do things.

    But anyway, great video, (I can see it now!) I would recommend using constructors to pass an instance of the main class, though. When you name a main class inside a project, it's best to name the main class the name of the project as well. It's good practice, and some packages within Spigot and java itself already contains Package and class names with Java.
     
    • Agree Agree x 1
    • Useful Useful x 1
  10. Lavah

    Lavah Active Member

    Joined:
    Sep 5, 2015
    Messages:
    54
    Ratings:
    +11
    legend
     
    • Agree Agree x 1
  11. Katmorder_

    Katmorder_ Well-Known Member

    Joined:
    Jul 13, 2015
    Messages:
    545
    Ratings:
    +106
    Someday, kid, you might just get as good as me, maybe
    IMG_2390.JPG
    Well see.
    (nO AppLauwSe nEedeD)
    If you need help just ask son.
     
    • Like Like x 1
    • Agree Agree x 1
    • Winner Winner x 1
    #11 Katmorder_, Oct 27, 2016
    Last edited: Oct 27, 2016
  12. Totom3

    Totom3 Tactical reboot, incoming!

    Joined:
    Dec 15, 2013
    Messages:
    187
    Ratings:
    +330

    Please don't watch TheBCBroz, he has no clue what he's talking about.
     
    • Like Like x 1
    • Agree Agree x 1
    • Winner Winner x 1
    • Informative Informative x 1
  13. xGhale

    xGhale HG‘s Doom guy

    Joined:
    May 18, 2015
    Messages:
    2,904
    Ratings:
    +1,393
    A holy Totom appears
     
  14. TheZombieKat

    TheZombieKat CTFer since May 2012

    Joined:
    May 18, 2015
    Messages:
    1,161
    Ratings:
    +354
    You know you shouldn't watch the certain person when an actual coder tells you not to.
     
  15. Algelier

    Algelier Former Staff Member.

    Joined:
    Sep 29, 2013
    Messages:
    1,811
    Ratings:
    +1,108
    I haven't watched any of his videos as it is in English so I can't understand everything.
     
  16. Ducksfan101

    Ducksfan101 Well-Known Member

    Joined:
    May 19, 2015
    Messages:
    742
    Ratings:
    +578
    Discord:
    Draobrevoh#1361
    If you become a dev and you code Wool i will literally come back to CTF (no informatives needed)
     
    • Informative Informative x 3
Loading...
Similar Threads Forum Date
[Speed Coding #2] - Phantom Hardcore Games Jan 1, 2017
[Speed Coding #1] - Lumberjack Hardcore Games Dec 19, 2016
[Speed Coding #1] - Archer Capture the Flag Oct 26, 2016
Re-coding Weapons Ideas May 15, 2017
Decoding WarZ to see why it's do addicting! MC-WarZ Apr 7, 2017
Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...