mInicraft (work in progress)


#1

Here are my efforts so far to implement a basic kind of minecraft clone. For now there’s basic map generation (small map). You ll have to “push” the map away at startup to see anything.

The p3d : http://blobisme.free.fr/minicraft/minicraft0.4.1.p3d

the sources : http://blobisme.free.fr/minicraft/gecraft0.4.1.zip


[SOLVED] minecraft clone question (python programming)
Looking for a 3D map generator
Is Panda3D development dead?
#2

The p3d crashes for me. Here is the error log:

:AppRunner: Total Panda3D disk space used: 279 MB
:AppRunner: Configured max usage is: 2048 MB
DirectStart: Starting the game.
:display: loading display module: libpandagl.dll
:display: loading display module: libpandadx9.dll
:display: loading display module: libpandadx8.dll
:display: loading display module: libtinydisplay.dll
Known pipe types:
  wglGraphicsPipe
  wdxGraphicsPipe9
  wdxGraphicsPipe8
  TinyWinGraphicsPipe
  TinyOffscreenGraphicsPipe
(all display modules loaded.)
:display:windisplay: OS version: 6.1.2.7601 
:display:windisplay:   Service Pack 1
:display:windisplay: max Mhz 2668000000, current Mhz 2668000000 
:ShowBase: Default graphics pipe is wglGraphicsPipe (OpenGL).
:display: Unable to set window properties: !undecorated !fixed_size 
:ShowBase: Successfully opened window of type wglGraphicsWindow (OpenGL)
:audio: NullAudioManager
:audio: NullAudioManager
:ShowBase: __dev__ == 0
:gobj: Loading texture /c/Users/cap6121-2012/AppData/Local/Panda3D/start/land02b.png
Traceback (most recent call last):
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\showbase\Messenger.py", line 415, in __taskChainDispatch
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\showbase\Messenger.py", line 473, in __dispatch
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\p3d\AppRunner.py", line 745, in __startIfReady
  File "VFSImporter", line 153, in load_module
  File "/media/MyData/panda3D/myappz/gecraft/main.py", line 110, in <module>
  File "/media/MyData/panda3D/myappz/gecraft/main.py", line 88, in __init__
  File "/media/MyData/panda3D/myappz/gecraft/Snake.py", line 44, in fillMind
  File "C:\Python26\Lib\Chunk.py", line 61, in __init__
    self.chunkname = file.read(4)
AttributeError: 'tuple' object has no attribute 'read'
:task(error): Exception occurred in PythonTask Messenger-default
Traceback (most recent call last):
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\p3d\AppRunner.py", line 636, in run
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\task\Task.py", line 502, in run
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\task\Task.py", line 460, in step
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\showbase\Messenger.py", line 415, in __taskChainDispatch
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\showbase\Messenger.py", line 473, in __dispatch
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\p3d\AppRunner.py", line 745, in __startIfReady
  File "VFSImporter", line 153, in load_module
  File "/media/MyData/panda3D/myappz/gecraft/main.py", line 110, in <module>
  File "/media/MyData/panda3D/myappz/gecraft/main.py", line 88, in __init__
  File "/media/MyData/panda3D/myappz/gecraft/Snake.py", line 44, in fillMind
  File "C:\Python26\Lib\Chunk.py", line 61, in __init__
    self.chunkname = file.read(4)
AttributeError: 'tuple' object has no attribute 'read'
:TaskManager: TaskManager.destroy()
:display: Closing wglGraphicsWindow
Failure on startup.

Just a heads up (I had this same problem with my game), this crash is likely due to you naming your Chunk module / class ‘Chunk’. Python has a Chunk.py in its libraries, and Panda3D prefers to load that one instead of yours. If you rename the module to something else (I named mine ‘ChunkOfBlocks.py’) the error will be fixed (I think).


#3

ok, i’ll look into that, thanks for the feedback.


#4

This is very cool. I’d really like to ready the code to understand how you are doing the procedural generation in Panda, but the zip file link in your post is no longer working. How about posting the code to a github project or something?

Thanks for posting this.


#5

Here’s a new link :

http://blobisme.free.fr/minicraft/gecraft.zip

thanks for the interest


#6

Nice, it works. Thanks for uploading the new version. I’m new to Panda so reading through the source is helpful to understand a bit more about procedural generation.


#7

Have a good reading then. Keep in mind that it’s unfinished and some things are there that are not used / implemented (player.py for example).


#8

thats really cool.


#9

thanks :slight_smile: