1. Post #121
    Map in a box's Avatar
    July 2009
    7,306 Posts
    ratings described it in one click
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 4Dumb Dumb x 1 (list)

  2. Post #122
    Gold Member
    Asgard's Avatar
    July 2010
    3,614 Posts
    I made a plugin for BSPlayer:


    I'm quite happy with it. Except, closing BSPlayer now takes like a second longer, because for some reason closing the connection to the Logitech library or whatever, is so slow. I can't really think of a way around this besides running the LCD stuff in another process so that it can close asynchronously to BSPlayer.
    I would really like that for my G15. Can you share it already?
    Reply With Quote Edit / Delete Netherlands Show Events

  3. Post #123
    LOL
    Dennab
    August 2009
    2,070 Posts
    Why has nobody mentioned how amazingly polished the character looks?
    I think that's where the artistic ratings came from. Let's face it, red blocks are pretty but they just don't compare to the character.
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 3 (list)

  4. Post #124

    April 2006
    8 Posts
    I see people here saying notches code is awful yet I haven't seen any evidence for it. I haven't looked through the code but then I doubt almost everyone making these criticisms have either.

    So I'm challenging everyone who has ever said notch is a bad coder to give me examples of some of his bad code, because right now all I'm seeing is a dumb bandwagon.
    A real software engineer would have used a database to store the worlds. Realising that a database is optimised for spatial data fetch from large arrays of data... Instead notch wrote this massive tree of binary files that are alphabetically named :S... also he seems to store the entire game session in RAM rather than streaming only the surrounding areas into ram?
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 1 (list)

  5. Post #125
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,486 Posts
    A real software engineer would have used a database to store the worlds. Realising that a database is optimised for spatial data fetch from large arrays of data... Instead notch wrote this massive tree of binary files that are alphabetically named :S... also he seems to store the entire game session in RAM rather than streaming only the surrounding areas into ram?
    I'm pretty sure MC started as a learning project for Notch, and only the surrounding chunks are loaded into the RAM.
    Reply With Quote Edit / Delete United States Show Events

  6. Post #126
    Map in a box's Avatar
    July 2009
    7,306 Posts
    A real software engineer would have used a database to store the worlds. Realising that a database is optimised for spatial data fetch from large arrays of data... Instead notch wrote this massive tree of binary files that are alphabetically named :S... also he seems to store the entire game session in RAM rather than streaming only the surrounding areas into ram?
    efficiency RePrEsEnT!
    Also yeah binary tags for every block and entity is ofc efficient
    Reply With Quote Edit / Delete United States Show Events

  7. Post #127

    April 2006
    8 Posts
    I'm pretty sure MC started as a learning project for Notch, and only the surrounding chunks are loaded into the RAM.
    If only the surrounding blocks are loaded then the game has NO EXCUSE for using nearly half a gigabyte of ram...
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 4 (list)

  8. Post #128
    Map in a box's Avatar
    July 2009
    7,306 Posts
    If only the surrounding blocks are loaded then the game has NO EXCUSE for using nearly half a gigabyte of ram...
    You have notch putting tons of things other than the blocks/entities in memory to thank for that. Also, garbage collection seems to fail in minecraft.
    I'm surprised it still runs quickly enough :V:
    (not trying to bash on notch but i think he should efficientize his code)
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 4 (list)

  9. Post #129

    April 2006
    8 Posts
    You have notch putting tons of things other than the blocks/entities in memory to thank for that. Also, garbage collection seems to fail in minecraft.
    I'm surprised it still runs quickly enough :V:
    (not trying to bash on notch but i think he should efficientize his code)
    Is there a situation where garbage collection doesn't fail?
    Reply With Quote Edit / Delete United Kingdom Show Events Dumb Dumb x 8Disagree Disagree x 2Agree Agree x 2 (list)

  10. Post #130
    Moustach3's Avatar
    March 2011
    297 Posts
    Why has nobody mentioned how amazingly polished the character looks?
    It's a "famous" character, Pico, so he may have used a spritesheet or something. Or he's just a good artist/animator.
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 4 (list)

  11. Post #131
    Gold Member
    Torrunt's Avatar
    October 2008
    247 Posts
    I think that's where the artistic ratings came from. Let's face it, red blocks are pretty but they just don't compare to the character.
    Here's a screenshot of a level in the game that has graphics:


    The guy that does the graphics for my games is awesome :D.


    It's a "famous" character, Pico, so he may have used a spritesheet or something. Or he's just a good artist/animator.
    No free spritesheets are that good.
    Reply With Quote Edit / Delete Australia Show Events Artistic Artistic x 19Agree Agree x 4Funny Funny x 1Zing Zing x 1 (list)

  12. Post #132
    Map in a box's Avatar
    July 2009
    7,306 Posts
    level editor powers go
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 1 (list)

  13. Post #133
    Gold Member
    Darwin226's Avatar
    January 2009
    4,125 Posts
    Besides that's obviously vector animation.
    Reply With Quote Edit / Delete Croatia Show Events Agree Agree x 4 (list)

  14. Post #134
    Gold Member
    Spoco's Avatar
    February 2005
    348 Posts
    I would really like that for my G15. Can you share it already?
    http://dl.dropbox.com/u/11782997/BSPG15Plugin.rar

    Just stick it in your BSplayer\plugins folder. No source included, since it's a mess, sorry. You might need the VC10 Redistributable Package for this to work.
    Reply With Quote Edit / Delete Show Events

  15. Post #135
    Neigh
    CarlBooth's Avatar
    June 2007
    28,550 Posts
    I think that's where the artistic ratings came from. Let's face it, red blocks are pretty but they just don't compare to the character.
    Artistic means you aren't really sure what's happening
    WAYWO from about a year ago posted:
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 5Zing Zing x 1 (list)

  16. Post #136

    April 2011
    8 Posts
    A render target for every single control? You're an idiot.
    wat

    Why would you use an RTT for every single control? You would only use it for container controls.
    Reply With Quote Edit / Delete United States Show Events Dumb Dumb x 1 (list)

  17. Post #137
    Kate Adams
    COBRAa's Avatar
    June 2009
    978 Posts


    Rolling your own GUI toolkit is a pain, I need to add scrolling which means I need to add Tau or OpenTK (for glScissor). I also need to add scrollbars, etc.

    Edited:



    I was planning on taking a stab at how ugly Notch's code is ;)
    Here is something me and a friend done you might be interested in: https://github.com/dzamkov/OpenTKGUI

    Reply With Quote Edit / Delete United Kingdom Show Events Useful Useful x 6Artistic Artistic x 1Dumb Dumb x 1Programming King Programming King x 1 (list)

  18. Post #138
    iNova's Avatar
    November 2008
    1,045 Posts
    Here is something me and a friend done you might be interested in: https://github.com/dzamkov/OpenTKGUI

    Is it me or is this too.. .. .. huge?
    Reply With Quote Edit / Delete Estonia Show Events Agree Agree x 4Disagree Disagree x 3 (list)

  19. Post #139
    Gold Member
    Darwin226's Avatar
    January 2009
    4,125 Posts
    It depends on what you're using it for but he most important thing is that it's all in the same huge style.
    Reply With Quote Edit / Delete Croatia Show Events

  20. Post #140
    Reply With Quote Edit / Delete United Kingdom Show Events Useful Useful x 1 (list)

  21. Post #141
    Gold Member
    HubmaN's Avatar
    July 2007
    6,267 Posts
    Hitched up NSTask, NSException, and NSTimer.
    Reply With Quote Edit / Delete Thailand Show Events Programming King Programming King x 1 (list)

  22. Post #142
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    So I'm challenging everyone who has ever said notch is a bad coder to give me examples of some of his bad code, because right now all I'm seeing is a dumb bandwagon.
    I thought he used else ifs over switch statements. But I was wrong. I take back everything I've ever said about Notch chaining else-ifs instead of using switches.

    Turns out he just uses a sequence of ifs
    Code:
        public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
        {
            if(l == 0 && minY > 0.0D)
            {
                return true;
            }
            if(l == 1 && maxY < 1.0D)
            {
                return true;
            }
            if(l == 2 && minZ > 0.0D)
            {
                return true;
            }
            if(l == 3 && maxZ < 1.0D)
            {
                return true;
            }
            if(l == 4 && minX > 0.0D)
            {
                return true;
            }
            if(l == 5 && maxX < 1.0D)
            {
                return true;
            }
        }
    Reply With Quote Edit / Delete Show Events Funny Funny x 10Disagree Disagree x 1 (list)

  23. Post #143
    Gold Member
    ZeekyHBomb's Avatar
    June 2006
    3,577 Posts
    An if .. else if ... structure would not provide any benefit in this case.
    Reply With Quote Edit / Delete Germany Show Events Agree Agree x 12 (list)

  24. Post #144
    Gold Member
    Robber's Avatar
    January 2006
    6,123 Posts
    I thought he used else ifs over switch statements. But I was wrong. I take back everything I've ever said about Notch chaining else-ifs instead of using switches.

    Turns out he just uses a sequence of ifs
    Code:
    //Code
    That's not too bad. It's easier to read than one giant if statement and I'm sure the JIT compiler optimizes it to have about the same performance.
    Reply With Quote Edit / Delete Austria Show Events Agree Agree x 3 (list)

  25. Post #145
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    For the exit of the block of the first if, wouldn't the compiler make an optimization to jump to the end of the chain?

    Regardless, it is wrong to say "Notch uses else-ifs over switch statements," is it not?

    That's not too bad. It's easier to read than one giant if statement and I'm sure the JIT compiler optimizes it to have about the same performance.
    I hope you're right; it's called 6 times per block per visibility check.

    Edit:
    Oh god...
    Code:
        public boolean renderBlockByRenderType(Block block, int i, int j, int k)
        {
            int l = block.getRenderType();
            block.setBlockBoundsBasedOnState(blockAccess, i, j, k);
            if(l == 0)
            {
                return renderStandardBlock(block, i, j, k);
            }
            if(l == 4)
            {
                return renderBlockFluids(block, i, j, k);
            }
            if(l == 13)
            {
                return renderBlockCactus(block, i, j, k);
            }
            if(l == 1)
            {
                return renderBlockReed(block, i, j, k);
            }
            if(l == 6)
            {
                return renderBlockCrops(block, i, j, k);
            }
            if(l == 2)
            {
                return renderBlockTorch(block, i, j, k);
            }
            if(l == 3)
            {
                return renderBlockFire(block, i, j, k);
            }
            if(l == 5)
            {
                return renderBlockRedstoneWire(block, i, j, k);
            }
            if(l == 8)
            {
                return renderBlockLadder(block, i, j, k);
            }
            if(l == 7)
            {
                return renderBlockDoor(block, i, j, k);
            }
            if(l == 9)
            {
                return renderBlockMinecartTrack(block, i, j, k);
            }
            if(l == 10)
            {
                return renderBlockStairs(block, i, j, k);
            }
            if(l == 11)
            {
                return renderBlockFence(block, i, j, k);
            }
            if(l == 12)
            {
                return renderBlockLever(block, i, j, k);
            } else
            {
                return false;
            }
        }
    I really hope you're right.

    ...and for the record, I am seeing "switch" in the source output for some classes, so the compiler he's using does use the switch opcode.
    Reply With Quote Edit / Delete Show Events Disagree Disagree x 1 (list)

  26. Post #146
    Gold Member
    thomasfn's Avatar
    July 2008
    2,963 Posts
    Wait, does that mean he "builds" the mesh every frame? I wonder if he's using immediate mode...
    Reply With Quote Edit / Delete United Kingdom Show Events Funny Funny x 5Dumb Dumb x 1 (list)

  27. Post #147
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    Wait, does that mean he "builds" the mesh every frame? I wonder if he's using immediate mode...
    No, that's impossible. The performance is awful, but it's nowhere near as awful as it would be with immediate mode.
    Reply With Quote Edit / Delete Netherlands Show Events Agree Agree x 8 (list)

  28. Post #148
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    I wonder why he just doesn't put the render code in the child classes and call a single render method for the parent Block object (all the blocks extend the main Block class). Is there some penalty for importing the stuff for rendering in the block classes?
    Maybe the dispatch code for overriding methods is slower? I'd be like "fuck that we're doing object oriented programming up in this bitch." Then again, wouldn't that dispatch code just be a switch of some sort?
    Perhaps having all the render code in one file is smarter?

    Maybe Notch is a bad coder?

    ...immediate mode...
    No, he isn't.
    Reply With Quote Edit / Delete Show Events Agree Agree x 1Dumb Dumb x 1 (list)

  29. Post #149
    Gold Member
    thomasfn's Avatar
    July 2008
    2,963 Posts
    No, that's impossible. The performance is awful, but it's nowhere near as awful as it would be with immediate mode.
    He can't be using VBOs though, or if he is, he's uploading the mesh every frame. In a little technical demo I made, I have 16x16x16 chunks that extend infinitely in every direction, generated by 3d perlin noise - each chunk compiles itself in a seperate thread to the rendering thread, then uploads itself to a VBO. When it's time to draw, it's just a simple case telling opengl to render the vbo. I can have render distance much higher than minecraft to achieve the same framerate, although it's not a very fair test as I don't have lighting or networking or any kind of entities implemented - I doubt those things would affect performance much though. Notch seems to be building the mesh every frame.
    Reply With Quote Edit / Delete United Kingdom Show Events Dumb Dumb x 1 (list)

  30. Post #150

    August 2007
    550 Posts
    l remember reading somewhere that he uses glDrawArrays, which makes sense. Though I don't know his chunks seam to build pretty damn fast, for lighting and water physics to look good.
    Reply With Quote Edit / Delete United States Show Events

  31. Post #151
    Gold Member
    thomasfn's Avatar
    July 2008
    2,963 Posts
    Lighting is just a basic form of 3d lightmap, predicted by the server (badly) then done properly by the client (nothing like computing the same thing twice, eh). It's then applied using glColor3f, or the glDrawArrays equivalent (glColorPointer or something). Water physics is just a little algorithm to determine where the water should flow, and then setting block IDs and metadata as appropriate - the standard rendering process deals with the rest.

    Edit:



    Here's a picture of my little demo, it took me about 4 days to get that to work - although the first three days were spent screwing around with openTK trying to make it work with SFML. (I didn't, I ended up scrapping SFML - so I can't put an FPS label up since I can't find a GUI library for openTK)
    Reply With Quote Edit / Delete United Kingdom Show Events Programming King Programming King x 5Late Late x 1Dumb Dumb x 1 (list)

  32. Post #152
    Gold Member
    Asgard's Avatar
    July 2010
    3,614 Posts
    Lighting is just a basic form of 3d lightmap, predicted by the server (badly) then done properly by the client (nothing like computing the same thing twice, eh). It's then applied using glColor3f, or the glDrawArrays equivalent (glColorPointer or something). Water physics is just a little algorithm to determine where the water should flow, and then setting block IDs and metadata as appropriate - the standard rendering process deals with the rest.
    Would this be a valid technique to use or is there something better?

    Also, I need to dedicate my 1,000th post to something.
    Reply With Quote Edit / Delete Netherlands Show Events

  33. Post #153
    Gold Member
    thomasfn's Avatar
    July 2008
    2,963 Posts
    Would this be a valid technique to use or is there something better?

    Also, I need to dedicate my 1,000th post to something.
    I can't think of another way of doing it, the standard opengl lighting model isn't going to cut it and I don't know if you can achieve the same effect with a vertex shader.

    Edit:
    It should be 100% clientside though.
    Reply With Quote Edit / Delete United Kingdom Show Events Disagree Disagree x 1 (list)

  34. Post #154
    Gold Member
    Rohans's Avatar
    September 2010
    169 Posts
    Turns out he just uses a sequence of ifs
    What if the obfuscator did that?
    Reply With Quote Edit / Delete Canada Show Events

  35. Post #155
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,498 Posts
    What if the obfuscator did that?
    It doesn't really matter. An if else sequence is identical to a sequence of straight if statements in this case. Not sure why it's such a big deal.
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 5 (list)

  36. Post #156
    Gold Member
    KillerJaguar's Avatar
    October 2006
    3,356 Posts
    For some reason, I'm finding user interface programming to be quite fun.


    An inventory screen. You can move around, but there are no items yet, so it's not much use yet.



    A new minor screen: the popup. In this case, I use it with some functions for the world to check whether all the tiles have been explored.

    All the logic is being done entirely in Lua. Even with just the dialog and input screen, I made a working bank (not shown) as well a mini-quest to wire money from one bank to another. I love Lua.
    Reply With Quote Edit / Delete United States Show Events

  37. Post #157
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,498 Posts
    Is that written in C++?
    If so, what are you using to integrate it with Lua?

    Edited:

    And you should probably correct rougelike to roguelike, it's been like that for ages. D:
    Reply With Quote Edit / Delete United Kingdom Show Events

  38. Post #158
    Gold Member
    Asgard's Avatar
    July 2010
    3,614 Posts
    :neckbeard: 1,000th post dedicated to WAYWO.
    Reply With Quote Edit / Delete Netherlands Show Events Winner Winner x 23 (list)

  39. Post #159
    Gold Member
    KillerJaguar's Avatar
    October 2006
    3,356 Posts
    Is that written in C++?
    If so, what are you using to integrate it with Lua?

    Edited:

    And you should probably correct rougelike to roguelike, it's been like that for ages. D:
    It is written in C++ with SFML. I'm using just the Lua library itself. At first, I tried LuaBind, but I found it too confusing and there was little to no documentation on it. I bought the Programming in Lua book and have been reading and experimenting with that the past month.

    And wow, I feel like an idiot for not noticing the misspelling in the name for months now.
    Reply With Quote Edit / Delete United States Show Events Friendly Friendly x 1 (list)

  40. Post #160
    garry's Avatar
    September 2001
    12,398 Posts
    Everyone that releases something could be accused of being a bad coder. Because they were too busy actually releasing stuff to obsess over the state of their code.

    It doesn't matter that your 50 line program is awesomely coded because you're never gonna release it - you're going to recode it over and over again.. obsessing that your code is messy.
    Reply With Quote Edit / Delete Show Events Agree x 32Zing x 2Winner x 2Programming King x 1Friendly x 1Artistic x 1Disagree x 1Dumb x 1 (list)