WORK IN PROGRESS AREA

WTF?

For thus who don't know me, if I've not get more than 20 projects in same time, I'm bored!
So…

I've heard about a little game that make the buzz (2011)… more or less :-D
Something about a world plenty of cubes, where everything are cubes…

Well, you've recognized Minecraft for sure!

As I'm a MorphOS developper, and as MorphOS doesn't have Java engine yet and as I'm interested by growing my OpenGL knownledges, I've decided to try if this sandbox game is possible to run on a PPC-G4 machine using the TinyGL library on MorphOS.

Notes: I don't claim to make a perfect Minecraft clone, I just want to have fun to code a Python+OpenGL game on MorphOS.
This kind of game is simple enough to not eat all my spare time.
Moreover I'm not sure to finish anything! Developers are welcome…

Status

  • OpenGL Python module (PyOpenGL): done, useable enough to run many redbook and others demos.
  • Rendering engine:
    • Python module C written for performances, able to render 200 000 faces/seconds on a G4@1Ghz.
    • Render a static world filled with cubes.
    • Uses cluster of nodes to improve rendering time.
    • Occlusion handled to not feed OpenGL with non visible faces: handled by node parsing, a node = one cube + its 26 3D neightbours.
  • Game design:
    • MVC framework in progress, almost done.
    • PyGame used for system integration.
    • Simple 3D display done.
    • Sandbox game mode usable.
  • Map, world and items:
    • various block types and sprites implemented.
    • currently uses original textures for development speed, will be remplaced soon.
    • some tests are done to generate a world using a png file.
    • possible to add/remove static block.
    • curently only a demo startup map is available, no possibility to load/save it.

Phase#2 Better rendering, more Map manipulations, add entities.

  • Better rendering:
    • use a threaded rendering job. done
    • display animationable tool.
  • More map manipulations:
    • find a map format.
    • load/save map.
    • store entities location.
  • Entities (no AI yet):
    • add non-static 3d objects support.
    • add entities support to Map object.

Phase#1 Obtain a simple 3D map display to test entities interactions with map.

  • MVC framework test. done
  • Simple design:
    • simple 3d rendering w/o post-fx. done
    • simple map w/o entites other than the main player (you). done
    • simple map modifications: sandbox mode. done
    • simple GUI: done

Map Display Engine Performances

Current block render engine gives me on my Pegasos2 machine (PowerPC G4@1GHz) more or less 29000 faces drawn per second.
That gives around the possibility to draw around 1000 cubes per frame at 30 fps.
But I doubt to keep this frame rate everytime… specially when everything for the sandbox mode will be implement! So I've made some computations and found that I need more or less the capability of 1200 cubes to render at 12fps to obtain a playable game. I think I'm on the good path…

Update: I've re-implemented the rendering process using clusters of nodes (currently 1 cluster = 9x9x9 nodes).
The rendering process of one cluster consits in loop on all nodes to find which ones are visible in the camera viewing space. Then, for each of this visible nodes copying its faces data (1 to 6 faces per nodes) into a static faces data array.
After this process, the static array is given to glXXXPointers() functions and one glDrawArrays() is done (so one per cluster). This is gives best perfomances, around 200 000 textured faces per seconds on my machine.

Ambient occlusion

Using my faces occlusion routine, I've made some ambient occlusion tests by changing cube vertex color:

New code and .mcr read

Phase#1 previews

Little grabs of the almost done Phase#1 state:


en/dev/craft/start.txt · Dernière modification: 2011/12/01 04:41 par Yomgui