Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • The Soul: 10 years later
      May 21, 2018, 05:23:10 PM
    • The Soul: wow people are still here?
      May 21, 2018, 05:19:27 PM
    • Wilkooo: and apologies to the OG forum guys on behalf of that fudgewit dr house that pretty much killed this entire domain
      May 21, 2018, 04:14:28 PM
    • Wilkooo: shoutout to all those that played back in the beginning, all new people that hang around now seem to be pretty braindead
      May 21, 2018, 04:13:54 PM
    • Wilkooo: born sep 2016 - died whenever pink eggs resigned
      May 21, 2018, 04:11:29 PM
    • Wilkooo: Rip moparscape rsps
      May 21, 2018, 04:11:10 PM
    • puta loca: or what section can i ask this
      May 21, 2018, 05:45:08 AM
    • puta loca: does someoen has platinum ps v2 files?
      May 21, 2018, 05:44:59 AM
    • w azza 3: server down??
      May 21, 2018, 05:07:47 AM
    • charmie: rippppppppppppppppppppppppppppppppppppppppppppppp
      May 20, 2018, 09:03:41 PM
    • Tesco Value: eco reset? :o
      May 20, 2018, 08:54:27 PM
    • Tesco Value: aw is server down? :P
      May 20, 2018, 08:54:03 PM
    • mandmgalaxy: is the game down?
      May 20, 2018, 08:05:07 PM
    • bliss death: i believe 95% of the community disliked this change heavily as it came out of nowhere. and the fact you clear ironmen banks as well. terrible change. disappointed.
      May 20, 2018, 06:08:36 PM
    • bliss death: just wondering when the server is gonna be fixed and reverted
      May 20, 2018, 06:07:36 PM
    • Saltyspade10: I'll be back ;)
      May 15, 2018, 04:43:53 PM
    • Nunubuffs:[link]
      May 15, 2018, 12:06:25 PM
    • Nunubuffs: .info god
      May 15, 2018, 12:05:40 PM
    • Nunubuffs: Www.scaperune
      May 15, 2018, 12:05:25 PM
    • Nunubuffs: Www.scaperune
      May 15, 2018, 12:05:18 PM

    Author Topic: Today I learned! - Share your newfound knowledge  (Read 14310 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #280 on: November 04, 2014, 06:22:33 AM »
    TIL (thanks to Method) how transparency in animations works

    RS2Ad banner

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #281 on: November 04, 2014, 02:16:22 PM »
    Why do you still have the anti-color bot randomizations on?
    RS2Ad banner

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #282 on: November 04, 2014, 02:40:36 PM »
    Why do you still have the anti-color bot randomizations on?

    It's my refactoring project so I've made no edits.
    RS2Ad banner

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #283 on: November 04, 2014, 02:44:26 PM »
    Your mini-map looks wank.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #284 on: November 04, 2014, 03:02:38 PM »
    Your mini-map looks wank.

    I know, but I'm not making any edits to the client/

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #285 on: November 11, 2014, 06:09:46 PM »
    TIL teleporting a player is easy and PI's way of handling it is obnoxious (We already knew that part though).

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #286 on: November 11, 2014, 06:21:10 PM »


    TIL how to draw interfaces in the pre-beta client

    Anyone know what's up with that face?

    « Last Edit: November 11, 2014, 06:33:17 PM by Ambokile »

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #287 on: November 11, 2014, 06:33:53 PM »
    http://i.imgur.com/JMAIVbk.png

    TIL how to draw interfaces in the pre-beta client

    Anyone know what's up with that face?
    The sprite id for prayer (I assume) is the same as the sprite for the friends list icon, apparently...

    OfflineLimits

    • Member
    • ****
    • Posts: 2,190
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #288 on: November 11, 2014, 06:35:09 PM »

    TIL how to draw interfaces in the pre-beta client

    Anyone know what's up with that face?



    is that the one I 'released'?

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #289 on: November 11, 2014, 06:47:04 PM »
    The sprite id for prayer (I assume) is the same as the sprite for the friends list icon, apparently...

    It's not the prayer icon, look two rows above it :P

    is that the one I 'released'?

    Nope, I got it from Rune-Server I think (it may be the same client, though)






    OfflineLimits

    • Member
    • ****
    • Posts: 2,190
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #290 on: November 11, 2014, 06:48:23 PM »
    The sprite id for prayer (I assume) is the same as the sprite for the friends list icon, apparently...

    It's not the prayer icon, look two rows above it :P

    is that the one I 'released'?

    Nope, I got it from Rune-Server I think (it may be the same client, though)


    I'm pretty sure the tab interfaces have been done before.

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #291 on: November 11, 2014, 07:07:59 PM »
    The sprite id for prayer (I assume) is the same as the sprite for the friends list icon, apparently...

    It's not the prayer icon, look two rows above it :P
    Prayer, Runecrafting. Same shit. You got my point regardless.

    OfflineT. Gang

    • First Time Poster
    • *
    • Posts: 4
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #292 on: November 12, 2014, 04:24:43 AM »
    Today(Well yesterday, but shh) I learnt how to add timers in the correct spaces and get it too work. :) So now my thieving, along with other skills, are no longer majorly bugged.

    A nooby thing to learn, but we all start from the bottom.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #293 on: November 12, 2014, 06:50:04 PM »
    TIL how to write player updating for the first time





    Also, sk8r, you were correct:




    TIL how to render maps in 194


    OfflineSnow_

    • Member
    • ***
    • Posts: 161
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #294 on: November 18, 2014, 06:09:36 AM »
    TIL about Java 8's awesome forEach statements.

    For example, following code:
    Code: [Select]
    ArrayList<Bullet> bullets = new ArrayList<>();
    ArrayList<Player> players = getPlayers();
    for (Player player : players) {
        for (Bullet bullet : player.getBullets())
            bullets.add(bullet);
    }
    for (Player player : players) {
        for (Bullet bullet : bullets) {
            if (bullet.hitPlayer(player))
                playerHit(player, bullet);
        }
    }
    could be written like this:
    Code: [Select]
    players.forEach((player) ->
            player.getBullets().forEach(bullets::add)
    );
    players.forEach((player) ->
        bullets.forEach((bullet) -> {
            if (bullet.hitPlayer(player)) playerHit(player, bullet);
        }));
    }

    Another example:
    Code: [Select]
    for (Player player : getPlayers())
        player.update();
    to:
    Code: [Select]
    getPlayers().forEach(Player::update);

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #295 on: November 18, 2014, 07:15:24 AM »
    Code: Java
    1. players.forEach((player)->
    2.     bullets.forEach((bullet)->{
    3.         if(bullet.hitPlayer(player)) playerHit(player, bullet);
    4.     }));
    5. }


    ->

    Code: Java
    1. players.forEach(player ->{
    2.     bullets.stream().filter(bullet -> bullet.hitPlayer(player)).forEach(bullet -> playerHit(player, bullet));
    3. }

    OfflineSnow_

    • Member
    • ***
    • Posts: 161
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #296 on: November 18, 2014, 07:33:42 AM »
    Code: Java
    1. players.forEach((player)->
    2.     bullets.forEach((bullet)->{
    3.         if(bullet.hitPlayer(player)) playerHit(player, bullet);
    4.     }));
    5. }


    ->

    Code: Java
    1. players.forEach(player ->{
    2.     bullets.stream().filter(bullet -> bullet.hitPlayer(player)).forEach(bullet -> playerHit(player, bullet));
    3. }


    Thanks!

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #297 on: November 18, 2014, 08:00:48 AM »
    Code: Java
    1. players.forEach((player)->
    2.     bullets.forEach((bullet)->{
    3.         if(bullet.hitPlayer(player)) playerHit(player, bullet);
    4.     }));
    5. }


    ->

    Code: Java
    1. players.forEach(player ->{
    2.     bullets.stream().filter(bullet -> bullet.hitPlayer(player)).forEach(bullet -> playerHit(player, bullet));
    3. }

    Could that not become:
    Code: Java
    1. players.forEach(player ->{
    2.     bullets.stream().filter(Bullet::hitPlayer(player)).forEach(bullet -> playerHit(player, bullet));
    3. }

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #298 on: November 18, 2014, 08:43:07 AM »
    No, you cannot use method referencing that way.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: Today I learned! - Share your newfound knowledge
    « Reply #299 on: November 18, 2014, 07:52:09 PM »
    TIL how to convert the 317 client to allow for birds eye view vertical rotation



    Still a bit funny with rotation (it doesn't rotate around the player exactly, but around the corner of their tile I believe) but other than that it's nearly done and I'll release it as a snippet

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal