Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 672 673 [674] 675 676 ... 1380

Author Topic: Minecraft - It has blocks.  (Read 2422143 times)

sluissa

  • Bay Watcher
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10095 on: June 16, 2011, 08:59:08 am »

Quote
Two programs, written competently, that do the same thing, one in C++ and one in Java. The C++ one will always be faster.

...actually its the opposite as a general rule, as java does a lot of optimizations to code.. C++ has the potential to be faster, and usually you can make a specific segment of code run faster in C++ [there are exceptions, java does things like tail end recursion], but the actual performance gain is of course, negligible compared to the algorithm used.  But because java has little optimizations in it that c++ doesn't, ie, it does a bit of optimization to your code without you having to... a lot of java code runs quite a bit faster then C++ code.

I would bet your life on the fact that if notchs code runs slower its because he designed a worse algorithm or just as likely, designed one that takes more into consideration [lighting/monsters, whathave you]..

...Always blame the programmer, never the language. [unless its a scripting language and your doing something ridiculously hardware intensive]

//If your running it in a browser versus not however, thats a whole nother ballgame.

I was under the impression that because Java was an interpreted language, and you had an extra "middleman" the computer had to deal with between the code and the hardware, that it tended to be slower. Wheras, after you compile C++, you basically have a program that talks directly to the hardware.

I know little about programming though, I admit. Just a bit of dabbling with Java.
Logged

Nintenlord

  • Bay Watcher
  • Adamantine fever
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10096 on: June 16, 2011, 09:10:43 am »

Java used to be interpretted, by now it is Just-In-Time compiled, meaning every copy of Minecraft is compiled specifically for the PC it's running on during start and then the executing code is native.
Logged
The only dragon I've seen in game walked into my rats nest of a fortress and died in the flames of the conflagration he started in the dining hall.  Of course, nearly every dwarf was dead by then, but we consider it a tactical victory.

Rift

  • Bay Watcher
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10097 on: June 16, 2011, 09:16:23 am »

Edit: ninja'd but i'll leave what i said anyway:

Ah, yes but because C++ is compiled once, and cannot[or atleast would be... insanely difficult] change its source code at runtime [which java not only can, but does, constantly], it can make optimizations on a per-machine/per-situation basis.
Since java 6 or so, more and more comparisons are showing them as basically equivalent in speed, or with java being faster. As of version 6 - update 10, java took another leap forward with at runtime deciding what needs to be on the heap.
It's just its been very slow coming, and the amount of runtime optimizations the Java virtual machine could do are finally starting to make up for the fact that it has to go through the JVM layer [using just-in time compiled code]

Ironically, C# is using the same sort of optimizations to beat C++ in performance!

Basically, Java and C# can more effectively use the hardware because they can evaluate the hardware in runtime rather then being force to make educated guesses at compile time or more likely the time the programmers making the code.

Now, thats not to say C++ is slow, and if you program for a specific case on a specific piece of hardware you can certainly beat java and C# easily using the same algorithm.... that is if you assume you don't get more time to optimize in java and C# since in general you have to spend less time debugging them....

However, if you are really programming for insane speed on specific hardware, you shouldn't be writing it in C++, or even C, instead you should be writing it in machine code.


//But if your writing some general code for hardware that is unknown to you [ie, most games], you may want to seriously concider writing it in java or C# instead... [unless your working with people who are using C++ of course..] More and more C++ programmers are switching to C#.[microsoft is pushing C# pretty hard]
I wouldn't be surprised if C++ fades away a few decades down the road.
« Last Edit: June 16, 2011, 09:18:38 am by Rift »
Logged

sluissa

  • Bay Watcher
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10098 on: June 16, 2011, 09:46:18 am »

Okay, I didn't realize things had changed that much in the last... oh, decade or so since I took my first Java class.
Logged

Andir

  • Bay Watcher
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10099 on: June 16, 2011, 09:58:23 am »

[microsoft is pushing C# pretty hard]
I wouldn't be surprised if C++ fades away a few decades down the road.
Recent events put that up in the air though...  seems their focus has moved back to C++: http://blogs.msdn.com/b/vcblog/archive/2011/06/15/introducing-amp.aspx at least for heavily parallel applications and some people are worried about the future of .NET with Windows 8's announcements and push for HTML5.  .NET may become the foundation for Windows Phone, but there is doubt in the air about it's future in Windows desktop.

Edit:  This is not a talk for here though, should be here at least: http://www.bay12forums.com/smf/index.php?topic=83025.0
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

freeformschooler

  • Bay Watcher
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10100 on: June 16, 2011, 01:15:59 pm »

Oh man, I set up a local server with McMMO and all of the plugins I could possibly cram in it. That was fun. Really, very fun, you just have no idea.

Spoiler: This is how fun it was (click to show/hide)
Logged

Sensei

  • Bay Watcher
  • Haven't tried coffee crisps.
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10101 on: June 16, 2011, 06:46:57 pm »

That's the thing about minecraft, doing stuff alone is fun until you realize it's totally pointless.
Logged
Let's Play: Automation! Bay 12 Motor Company Buy the 1950 Urist Wagon for just $4500! Safety features optional.
The Bay 12 & Mates Discord Join now! Voice/text chat and play games with other Bay12'ers!
Add me on Steam: [DFC] Sensei

Jackrabbit

  • Bay Watcher
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10102 on: June 16, 2011, 07:48:52 pm »

So hey, I know I'm late to the party on this one but holy fuck, pistons. Secret doors, how many will I make?

SO MANY.
Logged

breadbocks

  • Bay Watcher
  • A manacled Mentlegen. (ಠ_ృ)
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10103 on: June 16, 2011, 07:55:08 pm »

I totally want to make my base have a 64 bit passcode for entrance.
Logged
Clearly, cakes are the next form of human evolution.

Thexor

  • Bay Watcher
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10104 on: June 16, 2011, 10:34:03 pm »

I totally want to make my base have a 64 bit passcode for entrance.

Step 1: Build awesome 64-bit passcode to protect your base.

Step 2: Build awesome sliding door to keep your base locked while you're not around.

Step 3: ...

Step 4: Realize that any determined intruder will just mine through the ceiling. Or mine through the door, for that matter. Or through the 64-bit encryption mechanism.

Step 5: Realize that redstone is bugged online and complicated mechanisms tend to break down. Realize that debugging said breakdown in a 64-bit security system will take years.

Step 6: Realize you're playing in singleplayer.

Step 7: PROFIT!



...wait, hold on. That's not right. I've got a few extra steps in there.  :-\
Logged

breadbocks

  • Bay Watcher
  • A manacled Mentlegen. (ಠ_ృ)
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10105 on: June 16, 2011, 10:44:13 pm »

It would take all of a minute to make a watergate and kill it with fire sand.
Logged
Clearly, cakes are the next form of human evolution.

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10106 on: June 16, 2011, 10:57:38 pm »

That's kind of low to merge your customer data with Curse for not other reason than quantity.
A few pages late, but computershit has been keeping me off of the Minecraft scene so to speak.

Things might have changed since, but last I checked, the forum, while frequented by Mojang members, is not in any way affiliated with Mojang inherently.
That's not to say they're not admins there, but that doesn't mean they're the ones who made this decision, nor were in any way related to it in the slightest.
Notch was certainly not the one who made it all the way back when both Minecraft and the forums were first starting up.
Logged
Mishimanriz: Histories of Pegasi and Dictionaries

Andir

  • Bay Watcher
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10107 on: June 16, 2011, 11:42:12 pm »

That's kind of low to merge your customer data with Curse for not other reason than quantity.
A few pages late, but computershit has been keeping me off of the Minecraft scene so to speak.

Things might have changed since, but last I checked, the forum, while frequented by Mojang members, is not in any way affiliated with Mojang inherently.
That's not to say they're not admins there, but that doesn't mean they're the ones who made this decision, nor were in any way related to it in the slightest.
Notch was certainly not the one who made it all the way back when both Minecraft and the forums were first starting up.
Interesting, thanks for the info... something I did not know.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

Jackrabbit

  • Bay Watcher
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10108 on: June 17, 2011, 08:32:33 am »

I can seriously think of so many uses for pistons. Pressure plates that serve up active TNT, a stylish way to reveal you've got 40 arrow dispensers hidden in the wall, room reshaping ala Portal.

Seriously, that Portal mod is this much closer to being accurate.
Logged

The Merchant Of Menace

  • Bay Watcher
  • Work work.
    • View Profile
Re: Minecraft - It has blocks.
« Reply #10109 on: June 17, 2011, 08:42:33 am »

It'd be nicer if the pistons were variable length
Logged
*Hugs*
Pages: 1 ... 672 673 [674] 675 676 ... 1380