1. Post #161
    Gold Member
    esalaka's Avatar
    July 2007
    9,603 Posts
    How the hell did you guys manage to write all these pages when I was away for a single weekend.

    I mean, seriously. Has there been content or something?

    Edited:

    Also I guess I need to get some content here myself. This'll take a few hours I guess...

    HOW DID THIS EVER BECOME PAGEKING :|
    Reply With Quote Edit / Delete Finland Show Events Agree Agree x 4 (list)

  2. Post #162
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    Not sure why it's such a big deal.
    Are you saying you prefer
    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;
            }
        }
    over

    Code:
        public boolean renderBlockByRenderType(Block block, int i, int j, int k)
        {
            int l = block.getRenderType();
            block.setBlockBoundsBasedOnState(blockAccess, i, j, k);
            
            switch (l)
            {
            case 0:
                return renderStandardBlock(block, i, j, k);
            case 4:
                return renderBlockFluids(block, i, j, k);
            case 13:
                return renderBlockCactus(block, i, j, k);
            case 1:
                return renderBlockReed(block, i, j, k);
            case 6:
                return renderBlockCrops(block, i, j, k);
            case 2:
                return renderBlockTorch(block, i, j, k);
            case 3:
                return renderBlockFire(block, i, j, k);
            case 5:
                return renderBlockRedstoneWire(block, i, j, k);
            case 8:
                return renderBlockLadder(block, i, j, k);
            case 7:
                return renderBlockDoor(block, i, j, k);
            case 9:
                return renderBlockMinecartTrack(block, i, j, k);
            case 10:
                return renderBlockStairs(block, i, j, k);
            case 11:
                return renderBlockFence(block, i, j, k);
            case 12:
                return renderBlockLever(block, i, j, k);
            default:
                return false;
            }
        }
    ?

    The obfuscator didn't do it because there are intact switches in some of the code.
    If you wish to further complain about being offended by people being offended by Notch's code, please start a new thread. I think we're straying a little off-topic...

    Content:
    Loading textures from bitmaps is fun!

    (Click to view uncropped)

    I also added a static chunk array so I can start implementing tracelines. I'm performing the test by finding the major axis of the test normal (fancy way of saying finding the plane normal that lies closest to perpendicular to the test normal) then getting the intercept between the two nearest on-grid planes of that normal. Then, we test every relevant face for every (collide-able) block between those two points in that layer. This is fast because we index the blocks using a 1:1 hash function.
    Reply With Quote Edit / Delete Show Events

  3. Post #163
    Der FΓΌhrer
    Quark:'s Avatar
    January 2011
    3,154 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.
    IMO I don't really care about how ugly the code is usually. If it works, it works; if it works well and fast, even better.
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 1 (list)

  4. Post #164
    Gold Member
    Darwin226's Avatar
    January 2009
    3,457 Posts

    Ok it's bugging me now. What are those things at the bottom?
    Reply With Quote Edit / Delete Croatia Show Events Agree Agree x 3Winner Winner x 1 (list)

  5. Post #165
    Interesting that you say that. Friend.
    NorthernGate's Avatar
    August 2007
    3,373 Posts
    Personally I just need my code to look clean and nice to me, I don't use comments, that's my own thing, but I'd bet money that plenty of people would egg on it for being bad cod/ing practice. Who cares how notch codes, he's fine with it, no sense in getting annoyed at it.
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 5 (list)

  6. Post #166
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,135 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.
    This post convinced me not to rewrite my game for the third time. :buddy:
    Reply With Quote Edit / Delete United Kingdom Show Events Winner Winner x 17 (list)

  7. Post #167
    Gold Member
    robmaister12's Avatar
    January 2008
    4,745 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.
    Pretty much this. When I was working on my Android game, Cicruit Crawler, the code started off really nice and simple, then we wanted to add a bunch of stuff to it, and we realized it'll get really messy, but we had a deadline, so we just worked through it instead of redesigning and rewriting it, and now it's actually released on the Android market.
    Reply With Quote Edit / Delete United States Show Events Winner Winner x 3Programming King Programming King x 1 (list)

  8. Post #168
    sim642's Avatar
    July 2010
    1,038 Posts
    Are you saying you prefer
    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);
            }
    ...
                return renderBlockLever(block, i, j, k);
            } else
            {
                return false;
            }
        }
    over

    Code:
        public boolean renderBlockByRenderType(Block block, int i, int j, int k)
        {
            int l = block.getRenderType();
            block.setBlockBoundsBasedOnState(blockAccess, i, j, k);
            
            switch (l)
            {
            case 0:
                return renderStandardBlock(block, i, j, k);
    ...
            default:
                return false;
            }
        }
    ?
    Some kind of associative array would be even nicer. Let's just end this notch's code quality discussion.
    Reply With Quote Edit / Delete Estonia Show Events Agree Agree x 2Disagree Disagree x 2 (list)

  9. Post #169
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,403 Posts
    I don't understand.
    My C++ program won't even enter main, it just sits at a console screen forever until I kill it.
    The first line in main is a output to the console(static text) and still nothing happens.
    And GDB won't start for me so no debugger for me.

    Edited:

    Pretty much this. When I was working on my Android game, Cicruit Crawler, the code started off really nice and simple, then we wanted to add a bunch of stuff to it, and we realized it'll get really messy, but we had a deadline, so we just worked through it instead of redesigning and rewriting it, and now it's actually released on the Android market.
    I bought that :buddy:
    Reply With Quote Edit / Delete United States Show Events Friendly Friendly x 9 (list)

  10. Post #170
    Gold Member
    Asgard's Avatar
    July 2010
    3,177 Posts
    I don't understand.
    My C++ program won't even enter main, it just sits at a console screen forever until I kill it.
    The first line in main is a output to the console(static text) and still nothing happens.
    And GDB won't start for me so no debugger for me.

    Edited:



    I bought that :buddy:
    Can't really help without the code
    Reply With Quote Edit / Delete Netherlands Show Events Agree Agree x 1 (list)

  11. Post #171
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,403 Posts
    Can't really help without the code
    https://github.com/neos300/Bullwhip/tree/Corvette

    Branch you want is corvette if you get lost, the problem is in either main.cpp, Game.cpp(specifically the init method) or SceneManager.h/.cpp
    Reply With Quote Edit / Delete United States Show Events

  12. Post #172
    Gold Member
    Asgard's Avatar
    July 2010
    3,177 Posts
    Oh god
    Reply With Quote Edit / Delete Netherlands Show Events Agree Agree x 1 (list)

  13. Post #173
    vladh?'s Avatar
    April 2011
    16 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.
    I think that people appreciate the fact that Notch has actually worked his ass off on Minecraft and released it. It's just that the finished product would have been a bit better had he been a little less sloppy. We can criticize his code while respecting his perseverance.
    Reply With Quote Edit / Delete Romania Show Events Agree Agree x 9 (list)

  14. Post #174

    April 2011
    8 Posts
    https://github.com/neos300/Bullwhip/tree/Corvette

    Branch you want is corvette if you get lost, the problem is in either main.cpp, Game.cpp(specifically the init method) or SceneManager.h/.cpp
    Look for global variables with non-trivial constructors
    Reply With Quote Edit / Delete United States Show Events

  15. Post #175
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,403 Posts
    Look for global variables with non-trivial constructors
    I assuming that you mean use global variables and not singletons.

    Edited:

    Oh god
    I won't lie and say I'm a good programmer.
    Reply With Quote Edit / Delete United States Show Events Funny Funny x 4Agree Agree x 1Winner Winner x 1 (list)

  16. Post #176

    April 2011
    8 Posts
    I assuming that you mean use global variables and not singletons.
    No I mean that the only reason your code would hang before entering main() is if you have a global variable with a screwed up constructor
    Reply With Quote Edit / Delete United States Show Events Funny Funny x 1 (list)

  17. Post #177
    Gold Member
    Dlaor-guy's Avatar
    October 2008
    3,838 Posts
    Who cares how notch codes, he's fine with it, no sense in getting annoyed at it.
    The problem here is that his code is so bad, it's actually affecting performance. And not just a little bit.
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 12 (list)

  18. Post #178

    April 2011
    8 Posts
    I see a lot of finger pointing at issues in notch's code but very few suggested solutions
    Reply With Quote Edit / Delete United States Show Events Disagree Disagree x 5Dumb Dumb x 1 (list)

  19. Post #179
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,403 Posts
    No I mean that the only reason your code would hang before entering main() is if you have a global variable with a screwed up constructor
    Oh okay, thanks null.
    Reply With Quote Edit / Delete United States Show Events Funny Funny x 8Dumb Dumb x 2 (list)

  20. Post #180

    April 2011
    8 Posts
    Oh okay, thanks null.
    I was gonna look for global variables in your code but then I realized there's a lot of code lol and I'm not null, don't divert
    Reply With Quote Edit / Delete United States Show Events Disagree Disagree x 10Funny Funny x 1 (list)

  21. Post #181
    Gold Member
    ShaunOfTheLive's Avatar
    November 2007
    8,685 Posts
    Some kind of associative array would be even nicer. Let's just end this notch's code quality discussion.
    Yeah, if every function being called is using the same parameter list (block, i, j, k), that would be perfectly suited to an array of function pointers (assuming C++; I'm not sure what the Java or whatever equivalent would be).
    Reply With Quote Edit / Delete Canada Show Events

  22. Post #182
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    Ok it's bugging me now. What are those things at the bottom?
    Factoid: It is actually partially transparent and covers the entire screen. Verbosity aside: A little debugging aid.
    From left to right:
    green thing - deallocated texture space (console is rendered 1024 pixels wide by default, so it pushes the glyphs to the right) I draw green when I deallocate texture space so that it is obvious if I'm using deallocated texture space.
    white specks - rasterized glyphs (letters)
    transparent gap - I forget what this is supposed to be. I think it is a sketchpad for rendering text to before rendering it in the 3d world.
    blue menu thingy - This is where the console is rendered to. It is only rendered every frame. You can see an old version of the console at full size here. I've made a few minor improvements to the console since that screenshot, though :D

    It is just a 1/8th scale rendering of a single large texture that I draw lots of little things that don't deserve their own dedicated texture to.

    Oh, and C(#,#) is the last non-zero relative cursor movement.
    A(#,#) is not used. These are rendered directly to the frame buffer (not to the sketchpad texture thingy).
    Reply With Quote Edit / Delete Show Events

  23. Post #183
    good lord i'm awful at things.
    DarkCybo7's Avatar
    June 2010
    307 Posts
    My game is piecing together slowly.

    Reply With Quote Edit / Delete Canada Show Events Artistic Artistic x 3Programming King Programming King x 1 (list)

  24. Post #184
    Gold Member
    Asgard's Avatar
    July 2010
    3,177 Posts
    Really good but the jump sound is annoying me already.
    Reply With Quote Edit / Delete Netherlands Show Events Agree Agree x 5 (list)

  25. Post #185
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,403 Posts
    I was gonna look for global variables in your code but then I realized there's a lot of code lol and I'm not null, don't divert
    Are you sure you aren't null?
    I remember someone saying Hi null to you.

    Also I've deleted all global/singleton except the ImageManager class, which I haven't touched (got the code snippet off of the internet) so I don't see how this doesn't work.
    Reply With Quote Edit / Delete United States Show Events Informative Informative x 1 (list)

  26. Post #186
    good lord i'm awful at things.
    DarkCybo7's Avatar
    June 2010
    307 Posts
    It's ok I'll just rip the jump sounds from portal 2
    Reply With Quote Edit / Delete Canada Show Events Zing Zing x 1 (list)

  27. Post #187
    deloc's Avatar
    January 2008
    1,148 Posts
    I see a lot of finger pointing at issues in notch's code but very few suggested solutions
    hi null
    Reply With Quote Edit / Delete Canada Show Events Funny Funny x 10Agree Agree x 2Late Late x 2Dumb Dumb x 2 (list)

  28. Post #188
    vladh?'s Avatar
    April 2011
    16 Posts
    Have you guys seen this?

    Woah, wtf, I just noticed the "Overv" folder. Small world, considering I found it in a completely unrelated place.

    (User was permabanned for this post ("Alt of permabanned user" - SteveUK))
    Reply With Quote Edit / Delete Romania Show Events Late x 15Informative x 1Disagree x 1Winner x 1Dumb x 1 (list)

  29. Post #189
    deloc's Avatar
    January 2008
    1,148 Posts
    Have you guys seen this?
    [list=1][*]yes.[*]get out vladh[/list]
    Reply With Quote Edit / Delete Canada Show Events

  30. Post #190
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,135 Posts
    Yes. Overv made it for this thread.
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 3Disagree Disagree x 1 (list)

  31. Post #191
    DevBug's Avatar
    July 2010
    1,044 Posts
    @ The guy who posted the link to the GUI toolkit.
    Like all programmers I want to roll my own, and I want to use as little OpenGL as possible (for now).

    @ Garry

    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.
    Yes, and some people can't handle the ugliness of their code so they remodel their bedroom.
    Reply With Quote Edit / Delete Canada Show Events Funny Funny x 10Zing Zing x 2Informative Informative x 1Dumb Dumb x 1 (list)

  32. Post #192
    Irtimid's Avatar
    April 2008
    239 Posts
    In experimenting with embedding Lua into things I've made a program that draws stuff according to an external script.
    That post was supposed to have images, it should be fixed now.

    Another script:
    Reply With Quote Edit / Delete Canada Show Events Artistic Artistic x 6 (list)

  33. Post #193
    Gold Member
    Robber's Avatar
    January 2006
    5,350 Posts
    Pretty much this. When I was working on my Android game, Cicruit Crawler, the code started off really nice and simple, then we wanted to add a bunch of stuff to it, and we realized it'll get really messy, but we had a deadline, so we just worked through it instead of redesigning and rewriting it, and now it's actually released on the Android market.
    I've had a very similar experience. As part of my holiday job we started working on a project for school for 4 weeks and only got about half of it done because we tried to do everything perfectly and since then nobody really had the motivation to do anything because we constantly had to redo parts of it because we didn't want to hack around some problems. Now we have to finish it until tomorrow and we got the whole remaining project done in no more than 3 days.
    Sure the code doesn't have the same quality but it's working and we met the deadline easily.
    Reply With Quote Edit / Delete Austria Show Events

  34. Post #194
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts


    Circuit board for the power electronics of my teslacoil.
    Reply With Quote Edit / Delete Germany Show Events Programming King Programming King x 3Winner Winner x 1Informative Informative x 1 (list)

  35. Post #195
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,403 Posts
    I've come to the conclusion that it's not my code thats causing my program to die, it's SFML. Which is very odd, it worked before spring break.

    I thought the DLL's might have been corrupted so I recopied them but that didn't do anything...

    Edited:

    It's happening in my other SFML projects too... even though I'm dynamic linking against DLL's in different places....
    Reply With Quote Edit / Delete United States Show Events Programming King Programming King x 1 (list)

  36. Post #196
    Gold Member
    Darwin226's Avatar
    January 2009
    3,457 Posts
    I wish all my bugs were magically fixed. I really want to start doing something fun with Kento but I'm slowly losing interest since every time I fix something, another thing breaks. :(
    Reply With Quote Edit / Delete Croatia Show Events Funny Funny x 1 (list)

  37. Post #197
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,403 Posts
    And even ones which I haven't built in a while.
    Maybe the windows update broke everything?
    Reply With Quote Edit / Delete United States Show Events

  38. Post #198
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    Progress!

    Added the z-diodes :smug:

    Reply With Quote Edit / Delete Germany Show Events

  39. Post #199
    Gold Member
    ZenX2's Avatar
    February 2009
    3,904 Posts
    I'm attempting to load weapons for TopWise from XML files.

    So far, instead of firing, they stop time so only you can move. :wtc:
    Reply With Quote Edit / Delete United States Show Events

  40. Post #200
    iNova's Avatar
    November 2008
    1,045 Posts
    time so only can move
    :wtc:
    Reply With Quote Edit / Delete Estonia Show Events Funny Funny x 8Agree Agree x 1 (list)