Minecraft-like World

Everything related to 3D programming
Opcode
Enthusiast
Enthusiast
Posts: 138
Joined: Thu Jul 18, 2013 4:58 am

Re: Minecraft-like World

Post by Opcode »

Not so much success on Linux. I notice there's quite a long input delay (takes literally 5-10 seconds for a key to register) and the textures are not quite to scale for each block.

Image
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Minecraft-like World

Post by PB »

> The kids I work with are cheating like crazy - flying around - building
> large objects with a constant full inventory. :mrgreen:

That's just Creative Mode in the game. It's not a cheat/cheating.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Opcode
Enthusiast
Enthusiast
Posts: 138
Joined: Thu Jul 18, 2013 4:58 am

Re: Minecraft-like World

Post by Opcode »

Has anyone gotten this work on Linux properly? I'd like to toy with it more but can't seem to figure out why it's not showing textures properly and has massive input lag.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Minecraft-like World

Post by Samuel »

Kelebrindae is using shaders to display the graphics. When Ogre can't load a shader or script you'll get a default white texture.
My guess is either your hardware is too old or Ogre simply can't find the shaders specified within the material script.

Could you post your Ogre log? That may help us pinpoint your problem.
If you're not sure how to create the log just add the #PB_Engine3D_DebugLog flag to InitEngine3D() which should create a Ogre.log file within the root folder.

As for the input lag that may be hardware related as well. This isn't as optimized as the actual minecraft game, but it's still a very nice example that Kelebrindae has shared with us.
Opcode
Enthusiast
Enthusiast
Posts: 138
Joined: Thu Jul 18, 2013 4:58 am

Re: Minecraft-like World

Post by Opcode »

Samuel wrote:Kelebrindae is using shaders to display the graphics. When Ogre can't load a shader or script you'll get a default white texture.
My guess is either your hardware is too old or Ogre simply can't find the shaders specified within the material script.

Could you post your Ogre log? That may help us pinpoint your problem.
If you're not sure how to create the log just add the #PB_Engine3D_DebugLog flag to InitEngine3D() which should create a Ogre.log file within the root folder.

As for the input lag that may be hardware related as well. This isn't as optimized as the actual minecraft game, but it's still a very nice example that Kelebrindae has shared with us.
Debugger is throwing me errors of the images not existing (unmodified original source) I renamed the texturesLib folder to textureslib due to the source relying on the lower case equivalent (Linux being case sensitive). Plainly clear the white boxes are due to the textures not being loaded. I also notice the Skybox doesn't load as well. Might be a directory issue or something.

Code: Select all

[03:42:43] [COMPILER] Syntax check finished (2899 lines)
[03:42:51] Waiting for executable to start...
[03:42:51] Executable type: Linux - x64  (64bit, Unicode, Thread)
[03:42:51] Executable started.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 835)
[03:42:51] [WARNING] The specified file does not exist.
[03:42:51] [WARNING] octreeWorld_v2-7.pb (Line: 840)
[03:42:51] [WARNING] The specified file does not exist.
[03:44:09] The Program execution has finished.
Here's the Ogre log from compile to ingame.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Minecraft-like World

Post by Samuel »

If you changed the texture folder's name then make sure you also change Add3DArchive()'s texture path to match that name.
If you didn't that would explain why your textures are missing.

I also read your Ogre log and apparently somewhere within the GLSL shader there is an implicit conversion between a float and an integer. Which is stopping the shader from working correctly.
I haven't had the chance to scan through the shader yet, but things like this are usually pretty easy to fix.
If I get some more free time later I'll try to track it down for you.
Post Reply