Posted November 13, 201212 yr So we're a couple of comp sci students in college (US) and for our data structures final project, we decided to work with minecraft. The basic gist of the project is to take a piece of software and see if you can improve it by changing around any of the data structures, (arrays into lists, stacks into deques, priority queues into associative hash maps implemented over a B-tree, etc) If changing a data structure becomes too difficult, the assignment is merely to just improve the software in some way. We got the MCP (Minecraft Coder Pack) setup and working, and we were able to get some trivial changes made and recompiled with no problems. We're also fairly sure after glancing over the code that we probably don't want to mess with the deep underlying structures (blocks, chunks), but instead change something that doesn't require rewriting every java file. We looked into OptiFine: http://optifog.blogspot.com/, and its somewhat similar to what we want to do (in terms of improving performance), but probably not to that degree of detail (also the author of OptiFine was concentrating more on memory management and threading than on data structures). So, I guess our general question is ... Thoughts? Advice? Is this even possible? Thanks in advance! (And also we apologize if this is being posted in the wrong section, let us know and we'll move it!). TL:DR School Project. Make Minecraft harder/better/faster/stronger by changing data structures. Thoughts?
November 17, 201212 yr Bad time for this, the Mojang crew is currently reworking it's nbt tag system(it's own data mapping system).
November 19, 201212 yr Author Do you have any other suggestions for modifications we could make? Any other smaller bugs that people have looked at?
November 20, 201212 yr Do you have any other suggestions for modifications we could make? Any other smaller bugs that people have looked at? Hmm, i dont really know, the thing is, minecraft is a huge modding community, most things that can be done, have been done. I suppose you could look at explosives, that seems to be what has the biggest impact on peoples computers. Maximizing performance while minimizing loss of quality would make some happy I am sure, but I don't know if it is anything that hasn't been done before.
December 3, 201212 yr Author What modifications that have already been done have been the most effective? We are still just looking at the original code, so we don't necessarily have to do something that has been completely untouched by others.
December 6, 201212 yr What modifications that have already been done have been the most effective? We are still just looking at the original code, so we don't necessarily have to do something that has been completely untouched by others. You may want to take a look at the CraftBukkit server, (though its not compatible with Forge) they've made many optimizations, including data structure improvements. The changes can be found here: https://github.com/Bukkit/CraftBukkit/tree/master/src/main/java/net/minecraft/server - notably: AABBPool is rewritten to use an "intelligent cache", Chunk's entitySlices is changed from an ArrayList to UnsafeList, ChunkProviderServer's unload queue and chunks map is changed to a LongHashSet and LongObjectHashMap (indexed by LongHash.toLong(i,j)), BlockRedstoneWire and ServerConfigurationManagerAbstract uses a LinkedHashSet instead of HashSet, and various other tweaks. Maybe you could port these optimizations to Forge?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.