Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: iCE³ - clone of Minecraft  (Read 65060 times)

0 Members and 2 Guests are viewing this topic.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
iCE³ - clone of Minecraft
« Reply #15 on: July 27, 2011, 02:00:29 pm »
The new binaries don't contain an exe file ;)

And I think you should name the versions differently to avoid confusion.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

danman

  • Hero Member
  • *****
  • Posts: 1121
    • View Profile
    • Email
iCE³ - clone of Minecraft
« Reply #16 on: July 27, 2011, 02:31:44 pm »
Kalith : i think GLEW use the OpenGL3 headers on linux ;)
Pointilleur professionnel

Kalith

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
iCE³ - clone of Minecraft
« Reply #17 on: July 27, 2011, 04:43:45 pm »
@Nexus : Oops sorry ! I've updated the latest links with the missing .exe.
And about the version number, you're right. I'm so much used to SVN for my other projects that I forget it's not enabled here... I'll change version names for the next releases.

@danman : What difference does it make ?
Kal.

Kalith

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
iCE³ - clone of Minecraft
« Reply #18 on: July 28, 2011, 02:39:45 pm »
I've released a new version which supports shaders. It improves performance during day/night transitions when using VBOs, try it :)

Lighting information is stored as a texture coordinate, and then used in the shader to compute the final lighting, by sampling a lighting texture.
That way, VBOs are only updated locally when the geometry or lighting changes.
The shader involved is extremely simple and should be available on most graphics card. Else, the option is simply disabled and the game uses the software version.

I first tried to do the lighting calculation in the vertex shader, but only recent graphics cards support textures in vertex shaders (my integrated Intel GMA doesn't seem to), and with additional limitations, so I had to do it in the fragment shader, which is obviously slower.

Shaders can be enabled/disabled dynamically using the F3 key.
Kal.

Kalith

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
iCE³ - clone of Minecraft
« Reply #19 on: July 28, 2011, 09:29:17 pm »
Updating the lighting array/texture was still too costly.
I've changed it to be more like Minecraft : update between day and night is not continuous but is done by steps. Minecraft uses ~16 steps (their lighting system, much like mine, only has 16 different shades). I've set it to 32 steps because it looks almost continuous and doesn't consume much more resources.
The value can be adjusted in the DefaultConfig.lua file, by adding :
Code: [Select]
["LightingUpdateRate"] = 16,

To further reduce the time it takes to build the lighting texture, I've also resized it from 256x256 to 64x64, which makes absolutely no difference to the final result.
Kal.

Kalith

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
iCE³ - clone of Minecraft
« Reply #20 on: July 29, 2011, 12:58:13 am »
Sorry I forgot to address this issue before...
I've implemented a quick way to change key bindings : a GUI shows up the first time you launch the game, allowing you to set your key bindings in a (hopefully) user friendly way.
Tell me if it's ok for you.

Controls now also default to WSAD.

Finally, I've moved all the technical keys (toggle VBO, toggle wireframe, ...) to the F1-F12 keys. So the W is now free :)

Edit : fixed damaged block texture (0.017b).

Edit 2 : I'll be away for 2 weeks and without any internet access starting from tomorrow, August 1rst.
I'm currently working on a real infinite world, where the program generates new block chunks as you walk by. I've re-written the world file format for this purpose, using a Minecraft-like region system : regions contain 9x9x9 chunks, and instead of storing the whole world into a single file, there is a file per region. This new file system is also ready for data compression (per chunk) to use less space on the disk, and in the future reduce bandwidth between the server and the client (ex : the current demo world weights 4MB, and only 4kB when compressed by 7zip...).
I'm still not using threads, so there is a little hang when the program generates new chunks. Fortunately, this part is (at least should be) easily implemented using threads, so that won't be a problem later.
Hopefully I'll come back to you in two weeks with everything working :)
Kal.

keyforge

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
iCE³ - clone of Minecraft
« Reply #21 on: July 31, 2011, 04:05:11 am »
I found a typo in the KeyBindings.lua file, moving right won't work because you put StrageRight instead of StrafeRight. I fixed it and it worked! It's always one little character that messes things up, XD!
Need a place to upload your code, files or screenshots? Use SFML Uploads!

Haikarainen

  • Guest
iCE³ - clone of Minecraft
« Reply #22 on: August 01, 2011, 06:28:15 pm »
Quote from: "keyforge"
I found a typo in the KeyBindings.lua file, moving right won't work because you put StrageRight instead of StrafeRight. I fixed it and it worked! It's always one little character that messes things up, XD!


Yep, wont work for me neither.

Found a bug; Probably some overflow when trying to go to the edge of the map. It crashes.

TehSeph

  • Newbie
  • *
  • Posts: 3
    • View Profile
iCE³ - clone of Minecraft
« Reply #23 on: August 02, 2011, 11:11:55 am »
Offtopic: First post! :D

Ontopic: Great work! A suggestion, if you will? (I know this sounds lame, but...) I'm the type of person who learns by copying others and tweaking, or even more simply by seeing what someone did to change their code. Is there any chance you could create a subversion of the source? Preferably, through "Sourceforge" or "Google Code" as they have the most user-friendly change logs. I'm sure that would be of great help for people like myself to learn from. :oops:

Real curious to see where this goes in the future. Look out Notch! :lol:

danman

  • Hero Member
  • *****
  • Posts: 1121
    • View Profile
    • Email
iCE³ - clone of Minecraft
« Reply #24 on: August 04, 2011, 07:58:22 pm »
Ooops, i forgot to answer you Kalith  :lol: .

if you use the opengl3 header file provided by openGL for linux, it defines all the openGL 3 functions, so you don't have to load anythings :D although windows need GLEW because he only has a openGL1 header file. I don't know if it works on windows, but the siteduzero.com's new openGL tutorial say it doesn't.

Just a question, i've read your code, but i'm not sure. Are you rendering 1 VBO per chunk ?
Pointilleur professionnel

Kalith

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
iCE³ - clone of Minecraft
« Reply #25 on: August 13, 2011, 02:53:24 pm »
@keyforge : You're right, I fixed it (will be available in the next version).

@Haikarainen : Yes, that's a known bug that will be addressed in the next version as well.

@TehSeph : As soon as the current version is ready, I'll settle a sourceforge repository for the project. It won't contain all the changes since the very first releases though, only the future ones.

@danman : Ok I see :) Thank you for clarifying this point !
About VBOs, yes : I use a VBO per chunk. As far as I can tell, it offers an interesting performance boost (unfortunately I'm V-Sync limited so I can't tell how much exactly), and is extremely simple to manage.
I could pack several chunks into a single VBO, but that's be harder to implement, and the performance gain may not be worth the effort.

The next version is almost ready to be released, featuring basic procedural terrain generation, multi-threaded loading and updating of chunks, saving world on disk (during run time, in a thread too) with zlib compression.
I still need to fix a few things though (ambient occlusion bugs, among others).

Edit : Here it is !

The original Linux version uses the C++0x threading capabilities (std::thread, std::mutex, std::unique_lock and std::condition_variable), while the Win32 port relies on Boost (MinGW being a bit late regarding std::thread support).
I'll update the first post with the new files as soon as they are available.
Kal.

TehSeph

  • Newbie
  • *
  • Posts: 3
    • View Profile
iCE³ - clone of Minecraft
« Reply #26 on: August 14, 2011, 06:04:43 am »
Awesome.
Technically, you could start from r13 since you still have the src zipped on the OP.
Also, new version looks great.
I'm working on a somewhat similar project in which I plan to use a 3rd person Diablo-style perspective.
Reviewing the original minecraft java source and your c++ source in comparison has helped me a lot.
Can't wait to see that svn! :D

Kalith

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
iCE³ - clone of Minecraft
« Reply #27 on: August 14, 2011, 03:51:23 pm »
Thank you !
Actually, I'm in trouble with the SVN : there is already a 'Mycraft' project on sourceforge... I'll have to find another name, and I'm terrible at it :)

Do you have a web page / forum post describing your project ? I'm curious too !
Kal.

TehSeph

  • Newbie
  • *
  • Posts: 3
    • View Profile
iCE³ - clone of Minecraft
« Reply #28 on: August 14, 2011, 09:02:25 pm »
@Kalith: Currently, no. It's in the VERY EARLY stages of being worked on by myself and a group of net-friends.
We're building a GUI at the moment, and so far only have very basic OpenGL rendering for the actual 3d because none of us know graphics programming too terribly well. :?
I can get a screenshot posted for you, though... Give me a bit...

Kalith

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
iCE³ - clone of Minecraft
« Reply #29 on: August 15, 2011, 12:44:44 am »
Name of the project has changed.
Took me several hours to realize that all "****craft" names were already taken by some random company... I had to find something more original (hem...), and came up with "icecube", or with the cool typography : iCE³. The "cube" part is obviously related to the nature of the project, and for the "ice" part : I use a custom framework that I created 3 years ago and called "Frost", so here you go...

Anyway, I've created a sourceforge page for the project that you can reach here. It contains all the files that were available in the first post, plus some older versions (starting from v0.001).
As soon as I'll have all the file uploaded, I'll create and fill the SVN repository.
Edit : SVN is ready, with code from v0.001 to the latest v0.019 :) Enjoy !
Kal.

 

anything