Linked by Thom Holwerda on Mon 17th Jun 2013 17:52 UTC
Games "MineAssemble is a tiny bootable Minecraft clone written partly in x86 assembly. I made it first and foremost because a university assignment required me to implement a game in assembly for a computer systems course. Because I had never implemented anything more complex than a 'Hello World' bootloader before, I decided I wanted to learn about writing my own kernel code at the same time. Note that the goal of this project was not to write highly efficient hand-optimized assembly code, but rather to have fun and write code that balances readability and speed. This is primarily accomplished by proper commenting and consistent code structuring." Just cool.
Thread beginning with comment 564904
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Comment by aligatro
by Alfman on Tue 18th Jun 2013 16:40 UTC in reply to "RE[2]: Comment by aligatro"
Alfman
Member since:
2011-01-28

Sykobee,

"So, for a small map, you could have 4096x4096x256x4 bytes used up just for map data. That's 17179869184 bytes - or 16,384MB to you or me. A lot of this is paged out to disk, but I think you can now see why Minecraft can use 1GB without breaking a sweat. And don't you have 4-16 GB in your system anyway?"

"Think before you comment next time."

This is exactly the kind of mentality that was different. Older software developers didn't give up when the limited computing resources made problems non-trivial to solve. No, they were far more creative in finding ways to optimize the memory and cpu utilization to make it work. They couldn't take things for granted the way we do today.

Reply Parent Score: 2

RE[4]: Comment by aligatro
by Alfman on Tue 18th Jun 2013 19:48 in reply to "RE[3]: Comment by aligatro"
Alfman Member since:
2011-01-28

Why was this downvoted? That there are programmers who don't even consider the possibility that there may be more efficient ways to use data than in it's raw form is disappointing, at least to me.

I'm not saying optimization is a high priority these days, quite the opposite it's often easier and cheaper to to use the most trivial approach enabled by the hardware at our disposal. But it's still no reason take a close minded approach to what's possible with very clever software algorithms running on less capable hardware than what we are used to.

Reply Parent Score: 2

RE[5]: Comment by aligatro
by Morgan on Tue 18th Jun 2013 22:04 in reply to "RE[4]: Comment by aligatro"
Morgan Member since:
2005-06-29

Off topic: I tend to ignore downvotes here, as they are almost always by someone with an agenda and nothing relevant to say. You did indeed make a valid point, and even though not everyone will agree with you, downvoting shouldn't be a concern. Usually, enough sensible people will see the system being abused and keep your comment above the threshold.

And since I know my comment is off-topic I don't mind if it is downvoted for being so. ;)

Reply Parent Score: 2

RE[4]: Comment by aligatro
by Neolander on Tue 18th Jun 2013 20:47 in reply to "RE[3]: Comment by aligatro"
Neolander Member since:
2010-03-08

Actually, in this specific case, Elder Scroll games have shown for decades how large game maps can be used without excessive RAM usage. Simply put:
* Take a huge world map
* Slice it into smaller chunks
* Only keep the current chunk and its nearest neighbours in memory
* Profit !

I would be surprised if Minecraft didn't do something similar on the inside, keeping the whole world map loaded all the time sounds like a needlessly inefficient way to go about it.

Edited 2013-06-18 20:48 UTC

Reply Parent Score: 3

RE[5]: Comment by aligatro
by Alfman on Wed 19th Jun 2013 03:59 in reply to "RE[4]: Comment by aligatro"
Alfman Member since:
2011-01-28

Neolander,

"I would be surprised if Minecraft didn't do something similar on the inside, keeping the whole world map loaded all the time sounds like a needlessly inefficient way to go about it."

Yes, minecraft does take advantage of the fact that it doesn't need everything all at once:
http://www.minecraftwiki.net/wiki/Alpha_level_format
http://www.minecraftwiki.net/wiki/Chunks

It actually has a very limited working set, according to the documents above the default is 441 "chunks" (of 16*16*256 blocks). Blocks which remain idle for 30s are written back to disk (in the case of a local game).

I'd say this is probably fine for single player gameplay. On massively multiplayer servers it may be difficult to scale ram to hold enough raw chunks for every player. Java's own object overhead + deferred garbage collection probably amplifies the ram situation.

The interesting thing about minecraft in particular is that the world is initially generated algorithmically from a random seed. It could be possible to render the entire initial world functionally without actually storing any data blocks whatsoever. The only storage strictly necessary would be delta blocks, and these are very likely compressible due to their distribution and relationship to one another. I think with some clever software optimization, such worlds may have been possible on late 1999's era hardware.

Edited 2013-06-19 04:08 UTC

Reply Parent Score: 3

RE[4]: Comment by aligatro
by zima on Wed 19th Jun 2013 12:18 in reply to "RE[3]: Comment by aligatro"
zima Member since:
2005-07-06

This is exactly the kind of mentality that was different. Older software developers didn't give up when the limited computing resources made problems non-trivial to solve. No, they were far more creative in finding ways to optimize the memory and cpu utilization to make it work. They couldn't take things for granted the way we do today.

OTOH "older software developers" gave us something so stupid as y2k bug, so you're probably looking at the past through rose-tinted glasses, a bit.

Software was also notoriously more unstable in general.

Reply Parent Score: 2

RE[5]: Comment by aligatro
by Alfman on Wed 19th Jun 2013 14:56 in reply to "RE[4]: Comment by aligatro"
Alfman Member since:
2011-01-28

zima,

"OTOH 'older software developers' gave us something so stupid as y2k bug, so you're probably looking at the past through rose-tinted glasses, a bit."

You're absolutely right, and it was a somewhat poor generalization on my part to imply a difference in aptitude. ;)

Reply Parent Score: 2