Jump to content

Minecraft - How does Notch do that thing with terrain.png?

- - - - -

  • Please log in to reply
2 replies to this topic

#1
floorman

floorman

    Newbie

  • Members
  • PipPip
  • 29 posts
I was thinking to myself about Minecraft and in particular the Terrain.png

I noticed that Notch has drawn each part of the blocks (he's only drawn the faces he needs, once) and then he is somehow able to take certain parts of the image and assign it to faces of the Cubes in LWJGL.

How exactly is he able to take certain parts of one image and apply it to something? (lethalwire, if you're reading this, this is something you SO have to make a tutorial thread on, as it is super cool!).


I was just curious...

#2
lethalwire

lethalwire

    while(false){ ... }

  • Members
  • PipPipPipPipPipPipPip
  • 748 posts
  • Programming Language:Java, PHP
  • Learning:Java, PHP
I know nothing of minecraft. Texturing is fairly straightforward in LWJGL though. Can you elaborate?

#3
floorman

floorman

    Newbie

  • Members
  • PipPip
  • 29 posts

lethalwire said:

I know nothing of minecraft. Texturing is fairly straightforward in LWJGL though. Can you elaborate?

Basically, Terrain.png on Minecraft consists of each block face on some kind of grid. He is able to take certain squares from the grid (within that grid are the block faces) and apply them to cube and set the block material as that square that he has taken from the image.

I'll try to attach a picture.
Attached File  terrain.png   58.42K   1538 downloads

This is an older picture.

You can see there is a grid, with a different picture on each square, somehow, Notch can take certain parts of this one image (terrain.png) and apple that certain part of the image he takes.

Btw, when you say you know nothing of Minecraft, do you mean, you don't know what it is, or you don't anything about the structure of the game?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users