• What are you working on? v17
    3,500 replies, posted
  • [QUOTE=Spoco;29396208]I made a plugin for BSPlayer: [img_thumb]http://dl.dropbox.com/u/11782997/1178299704211120290858.jpeg[/img_thumb] 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.[/QUOTE] I would really like that for my G15. Can you share it already?
  • [QUOTE=BlkDucky;29396758]Why has nobody mentioned how amazingly polished the character looks?[/QUOTE] 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.
  • [QUOTE=Jallen;29394088]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.[/QUOTE] 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?
  • [QUOTE=foeaxe;29397341]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?[/QUOTE] I'm pretty sure MC started as a learning project for Notch, and only the surrounding chunks are loaded into the RAM.
  • [QUOTE=foeaxe;29397341]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?[/QUOTE] efficiency RePrEsEnT! Also yeah binary tags for every block and entity is ofc efficient
  • [QUOTE=neos300;29397365]I'm pretty sure MC started as a learning project for Notch, and only the surrounding chunks are loaded into the RAM.[/QUOTE] If only the surrounding blocks are loaded then the game has NO EXCUSE for using nearly half a gigabyte of ram...
  • [QUOTE=foeaxe;29397401]If only the surrounding blocks are loaded then the game has NO EXCUSE for using nearly half a gigabyte of ram...[/QUOTE] 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)
  • [QUOTE=Map in a box;29397425]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)[/QUOTE] Is there a situation where garbage collection doesn't fail?
  • [QUOTE=BlkDucky;29396758]Why has nobody mentioned how amazingly polished the character looks?[/QUOTE] It's a "famous" character, Pico, so he may have used a spritesheet or something. Or he's just a good artist/animator.
  • [QUOTE=TheCloak;29397331]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.[/QUOTE] Here's a screenshot of a level in the game that has graphics: [img]http://i.imgur.com/zeYcQ.jpg[/img] The guy that does the graphics for my games is awesome :D. [QUOTE=Moustach3;29397531]It's a "famous" character, Pico, so he may have used a spritesheet or something. Or he's just a good artist/animator.[/QUOTE] No free spritesheets are that good.
  • [QUOTE=eXiv2;29397130]I would really like that for my G15. Can you share it already?[/QUOTE] [URL]http://dl.dropbox.com/u/11782997/BSPG15Plugin.rar[/URL] Just stick it in your BSplayer\plugins folder. No source included, since it's a mess, sorry. You might need the [URL=http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84]VC10 Redistributable Package[/URL] for this to work.
  • [QUOTE=TheCloak;29397331]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.[/QUOTE] Artistic means you aren't really sure what's happening [quote=WAYWO from about a year ago][img_thumb]http://i.imgur.com/lUQMd.png[/img_thumb][/quote]
  • [QUOTE=DevBug;29391402]A render target for every single control? You're an idiot.[/QUOTE] wat Why would you use an RTT for every single control? You would only use it for container controls.
  • [QUOTE=DevBug;29388459][img_thumb]http://anyhub.net/file/2B6f-gibville_01.png[/img_thumb] 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. [editline]23rd April 2011[/editline] I was planning on taking a stab at how ugly Notch's code is ;)[/QUOTE] Here is something me and a friend done you might be interested in: [url]https://github.com/dzamkov/OpenTKGUI[/url] [img]http://i.imgur.com/mt0Xa.png[/img]
  • [QUOTE=COBRAa;29398941]Here is something me and a friend done you might be interested in: [url]https://github.com/dzamkov/OpenTKGUI[/url] [img_thumb]http://i.imgur.com/mt0Xa.png[/img_thumb][/QUOTE] Is it me or is this too.. .. .. huge?
  • It depends on what you're using it for but he most important thing is that it's all in the same huge style.
  • It's purely just a development theme, you can change it easily by editing this: [url]https://github.com/dzamkov/OpenTKGUI/blob/Release/Resources/SkinDefault.png[/url] And these: [url]https://github.com/dzamkov/OpenTKGUI/tree/Release/Containers[/url] [url]https://github.com/dzamkov/OpenTKGUI/tree/Release/Controls[/url]
  • [QUOTE=Jallen;29394088]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.[/QUOTE] 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 :v: [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; } } [/code]
  • [QUOTE=Night-Eagle;29399738]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 :v: [code]//Code [/code][/QUOTE] 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.
  • 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? [QUOTE=Robber;29399868]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.[/QUOTE] I hope you're right; it's called 6 times [b]per block[/b] per visibility check. [b]Edit:[/b] 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; } } [/code] I [i]really[/i] 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 [i]does[/i] use the switch opcode.
  • Wait, does that mean he "builds" the mesh every frame? I wonder if he's using immediate mode...
  • [QUOTE=thomasfn;29400348]Wait, does that mean he "builds" the mesh every frame? I wonder if he's using immediate mode...[/QUOTE] No, that's impossible. The performance is awful, but it's nowhere near as awful as it would be with immediate mode.
  • 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? [QUOTE=thomasfn;29400348]...immediate mode...[/QUOTE] No, he isn't.
  • [QUOTE=Overv;29400367]No, that's impossible. The performance is awful, but it's nowhere near as awful as it would be with immediate mode.[/QUOTE] 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.
  • 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.