Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Speeding up Minecraft?  (Read 6334 times)
0 Members and 1 Guest are viewing this topic.
Offline sci4me

Junior Member





« Posted 2013-03-30 17:57:52 »

Hey guys. So I play minecraft a LOT and I usually play with mods aswell. Well, I (FINALLY) switched to linux, and I lost 50 fps... So now, I'm working on making a mod to make the game faster. If anyone does happen to have experience with it, I am using MinecraftForge aswell. I plan to go through all the classes and attempt to fix ANY problems in the code. If you have any tips for making this easier, please let me know. Also, I tried using optifine (I usually do...) and it barely even made a difference. I don't expect my "mod" to make the game faster than optifine would, but I still am going to try it just for fun. So, if you have ideas for me, please let me know! Thanks for reading!
Offline DziNeIT

Senior Newbie


Exp: 3 years



« Reply #1 - Posted 2013-03-30 18:06:54 »

Rewrite most of Minecraft to use rendering that isn't immediate mode and multithread some of it Tongue Realistically you could probably add a bit of multithreading, and if you want to spend a lot of time on it you could convert it to use DisplayLists.
Offline matheus23

JGO Kernel


Medals: 107
Projects: 3


You think about my Avatar right now!


« Reply #2 - Posted 2013-03-30 18:07:34 »

You're not the first one trying this.

Are you searching for something like OptiFine? It worked perfectly for me Smiley

<edit>
Rewrite most of Minecraft to use rendering that isn't immediate mode and multithread some of it Tongue Realistically you could probably add a bit of multithreading, and if you want to spend a lot of time on it you could convert it to use DisplayLists.

Minecraft doesn't do immediate mode rendering. It uses display lists.

Btw, Markus Persson was once moderator for exactly THIS part of this forum 'Performance Tuning' Wink
</edit>

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sci4me

Junior Member





« Reply #3 - Posted 2013-03-30 18:11:06 »

Are you searching for something like OptiFine? It worked perfectly for me Smiley

I said that Optifine USED to help when I was using Windows, but now that I use linux, it doesnt really help much. Thats why I want to try making my own.
Offline matheus23

JGO Kernel


Medals: 107
Projects: 3


You think about my Avatar right now!


« Reply #4 - Posted 2013-03-30 18:22:34 »

I said that Optifine USED to help when I was using Windows, but now that I use linux, it doesnt really help much. Thats why I want to try making my own.
Argg... Sorry :/

Now then I can't help you either.

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline pjt33
« Reply #5 - Posted 2013-03-30 20:53:29 »

So, if you have ideas for me, please let me know!
Profile, profile, profile.
Offline Geemili

Senior Member


Medals: 9
Projects: 1
Exp: 2 years


No Games Finished


« Reply #6 - Posted 2013-03-30 21:02:44 »

Perhaps it has something to do with your graphics cards drivers?
Offline sci4me

Junior Member





« Reply #7 - Posted 2013-03-30 21:31:07 »

As far as drivers go, ill look into that...
Profile... well I know that the most used classes are byte[] and Vec3... so.. yeah. Anyway, if anyone has any amazing ideas, lemme know. THX
Offline sproingie

JGO Kernel


Medals: 202



« Reply #8 - Posted 2013-03-30 22:02:02 »

byte[] is rarely not at the top of space used per single type in most profilers, since it's the backing store of every single string in the system, including things like class names.
Offline concerto49

Junior Member





« Reply #9 - Posted 2013-03-30 23:32:28 »

byte[] is rarely not at the top of space used per single type in most profilers, since it's the backing store of every single string in the system, including things like class names.


Same as Strings and other basic building blocks. Ignore those.

High performance, fast network, affordable price VPS - Cloud Shards
Available in Texas, New York & Los Angeles
Need a VPS Upgrade?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline delt0r

JGO Knight


Medals: 27
Exp: 18 years


Computers can do that?


« Reply #10 - Posted 2013-03-31 10:52:32 »

I would immediately consider drivers, driver settings and your xorg setup. Turn off desktop composing for example. Also check your clocking performance. Perhaps the cpu is always throttled?

Quite simply there should not be a big performance difference between the platforms in general.  I would expect no more than 20% tops in either direction.

 In fact how much is the difference. If you have gone from 100fps to 60, well yea perhaps you have vsync?

I have no special talents. I am only passionately curious.--Albert Einstein
Offline sci4me

Junior Member





« Reply #11 - Posted 2013-04-04 03:05:26 »

I play with optifine and i get a max fps of 30 or so... and I have vsync disabled. It is my drivers for sure... and it doesn't seem like there are any other drivers that will be better. As far as speeding up minecraft however, the Vec3 and the AABB classes are used a TON... and they both have object pools. I wonder if there is some way to optimize the pools?
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #12 - Posted 2013-04-04 03:13:14 »

This whole thread is insane.

1. Clearly memory usage is not related to performance - typically there is a trade off (reducing memory usage will hurt performance)
2. Clearly the code is just fine, because it worked fast on another operating system
3. Clearly one does not simply 'optimize a game' in any reasonable amount of time.

Get your drivers sorted, and play your game.
Drop this 'side project' immediately, because nothing good will come of it.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Oskuro

JGO Knight


Medals: 39
Exp: 6 years


Coding in Style


« Reply #13 - Posted 2013-04-04 09:33:00 »

I also get performance issues with Minecraft under Ubuntu, so yeah, probably a driver/OS issue.

Maybe it's an issue with the JVM?

Offline Damocles
« Reply #14 - Posted 2013-04-04 11:05:09 »

Compare The Oracle JVM and OpenJDK.
Oracle works in this case faster on my Linux.

The biggest impact has changing to a propriatary driver compared
to the open source driver.
But this has also its problems.

Offline sci4me

Junior Member





« Reply #15 - Posted 2013-04-05 00:20:30 »

This whole thread is insane.

1. Clearly memory usage is not related to performance - typically there is a trade off (reducing memory usage will hurt performance)
2. Clearly the code is just fine, because it worked fast on another operating system
3. Clearly one does not simply 'optimize a game' in any reasonable amount of time.

Get your drivers sorted, and play your game.
Drop this 'side project' immediately, because nothing good will come of it.

jeez... i cant mess around with code and see what makes it faster and what makes it slower? :|
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #16 - Posted 2013-04-05 01:08:40 »

You're just as likely to succeed as when trying to make your car engine more efficient by twisting a few nobs.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline sci4me

Junior Member





« Reply #17 - Posted 2013-04-05 01:50:19 »

ok, but have you considered that i may enjoy doing this? if it wasnt fun, i would just live with optifine and not even think about trying to improve the game.
Online Phased
« Reply #18 - Posted 2013-04-05 03:48:19 »

each block (since 1.5) has now got its own image file instead of located on a sprite sheet, this allowed them to have there own texture pack support for higher resolutions images.

The multiple texture binds may cause a bit of a frame rate drop, maybe you could hack in a way to convert the image to a sprite sheet too allow for only one bind.

*NOTE*
I have not looked at the code, but if you look for the textures in the jar file, you will see each item / block has its own file since 1.5.
Offline HeroesGraveDev

JGO Kernel


Medals: 253
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #19 - Posted 2013-04-05 04:42:35 »

each block (since 1.5) has now got its own image file instead of located on a sprite sheet, this allowed them to have there own texture pack support for higher resolutions images.

The multiple texture binds may cause a bit of a frame rate drop, maybe you could hack in a way to convert the image to a sprite sheet too allow for only one bind.

*NOTE*
I have not looked at the code, but if you look for the textures in the jar file, you will see each item / block has its own file since 1.5.

Almost correct.
All the blocks have their own file, but at launch, it 'stiches' them all together into one big spritesheet.
Therefore not multiple texture binds.

Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 131
Projects: 4
Exp: 3 years



« Reply #20 - Posted 2013-04-05 05:44:31 »

ok, but have you considered that i may enjoy doing this? if it wasnt fun, i would just live with optifine and not even think about trying to improve the game.
you think optimizing code is fun
you must not be human Tongue
Offline HeroesGraveDev

JGO Kernel


Medals: 253
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #21 - Posted 2013-04-05 06:19:19 »

I think the fun part is knowing you did something better than Notch. Grin

Offline Regenuluz
« Reply #22 - Posted 2013-04-05 06:21:28 »

Well, until you make a game that earns you as much cash as Minecraft earned Notch, then you haven't really done anything "better" than him. ^^
Offline Damocles
« Reply #23 - Posted 2013-04-05 06:23:05 »

I doubt Minecraft was optimized for Linux in the first place.
So there might be some tweaks to optimize it.
Question is, can you do that with the available (e.g. -> decompiled) code.

Offline Oskuro

JGO Knight


Medals: 39
Exp: 6 years


Coding in Style


« Reply #24 - Posted 2013-04-05 10:44:15 »

If I may chip in... I get performance issues under Linux with my own test code.

A simple program that lets you move a sprite around the screen, which runs so fast on Windows the sprite becomes a blur, actually runs slowly under Ubuntu.

Same source, one using JDK7 (windows XP and 7) the other using OpenJDK7.

So yeah, I'm still of the opinion that the issue lies with the Java implementation under Linux (or how it interfaces with the hardware) than the program's code itself.

Although if there are ways to optimize the code to work better under Linux, I'd love to learn about them.

you think optimizing code is fun
you must not be human Tongue

Beware the programmer apocalypse! It's like zombies, but rather than bite brains off, we complain about proper coding practices and obscure implementation details!

Offline HeroesGraveDev

JGO Kernel


Medals: 253
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #25 - Posted 2013-04-05 20:05:56 »

ok, but have you considered that i may enjoy doing this? if it wasnt fun, i would just live with optifine and not even think about trying to improve the game.
you think optimizing code is fun
you must not be human Tongue

And the average non-programmer says:

You think programming is fun?
You must not be human.

Offline Agro
« Reply #26 - Posted 2013-04-05 21:37:11 »

I don't think Linux was made especially for gaming.

Offline Zhon

Junior Member


Medals: 4



« Reply #27 - Posted 2013-04-05 22:32:25 »

I don't think Linux was made especially for gaming.

I dont think Windows was made especially for gaming either.
Offline Agro
« Reply #28 - Posted 2013-04-06 17:17:27 »

I don't think Linux was made especially for gaming.

I dont think Windows was made especially for gaming either.

No, but it has the specifications and the support.

Offline matheus23

JGO Kernel


Medals: 107
Projects: 3


You think about my Avatar right now!


« Reply #29 - Posted 2013-04-06 17:19:36 »


How does the kernel even have to do with the performance of graphics applications? At all?
Linux is the kernel. What determines the performance of applications in linux are primary the drivers and their quality.
That is the support you are talking about.

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (8 views)
2014-09-21 19:30:30

BurntPizza (9 views)
2014-09-21 18:34:41

moogie (10 views)
2014-09-21 18:26:15

UprightPath (23 views)
2014-09-21 14:14:06

BurntPizza (27 views)
2014-09-19 21:14:18

Dwinin (40 views)
2014-09-13 03:08:26

Norakomi (70 views)
2014-09-11 07:57:51

TehJavaDev (96 views)
2014-09-11 00:39:09

Tekkerue (49 views)
2014-09-09 20:24:56

mitcheeb (70 views)
2014-09-09 00:06:29
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!