C4D Game of life

Another programming classic : Game Of Life (Cellular Automata family).

Game of life is not a game and has nothing to do with life. but where it gets interesting, is in the fact that you can build complexe patterns whith different behaviours only with very simple rules.

The original Game of life rules (for a 2D space) are:

  • Each cell with one or no neighbors dies, as if by solitude.
  • Each cell with more than three neighbors dies, as if by overpopulation.
  • Each cell with two or three neighbors survives.
  • Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

In this script (Xpresso python node) I tried to create 3D version of Game of life with the possibility to have dynamic rules. You can start with some rules and change them right in the middle of your simulation.

It's a is time based animation. Every frame, new calculations are done and there is no bounderies for your final shape. as far as your rules allows expansion of your pattern and your PC can handle it :)

Download Game of life project file

To create your own simulation, you have to :

  1. Define a set of starting points (see fill_grid method in source code)
  2. Set up your simulation rules
  3. Press play button to start simulation

Game of life

Source code

Cinema4D - Minesweeper Script

Cinema 4D gives us a 3D engine, Objects, Gui and some programming languages.. that's all what we need to create some games.. of course there is some limitations, but it still possible.
that's why i developped a classic game "Minesweeper". The first of a long series (I hope...) of #Games4Cinema
This script is a draft, it still needs some features like placing flags or option menu etc...

Enjoy :)

minesweeper default minesweeper gameover


  • Clone the project or download the zip file and extract it into the Maxon scripts directory.
    • WindowsC:\Program Files\MAXON\CINEMA 4D R<version>\library\scripts\
    • MacOs/Applications/MAXON/CINEMA 4D R<version>/library/scripts/
  • Restart Cinema 4D
  • Open Cinema 4D Menu
    • Script » User scripts » Minesweeper » minesweeper

# You can change the size of the grid and difficulty by changing the values passed to the `MinesweeperGui` object.
# The args are: Rows, Columns, Difficulty[EASY|MEDIUM|DIFFICULT]

if __name__ == '__main__':
    dlg = MinesweeperGui(15, 10, Level.EASY)

Update: HNDisabler+

HNDisabler+ is a free Cinema 4D plugin (R13 and +) which allows you to enable, disable and change the visibility of one or multiple objects just by one click.

All objects are grouped by type, so, you can for instance disable all Hypernurbs or Bool objects at the same time, which is useful especially when you work on very heavy scenes.

Download HNDisabler+

Checkout the new HNDisabler plugin page


Update : zArabic 1.3

What's new in this version ?

  • you can use it for both sys Mac and Windows.
  • you can use Harakate / Tachkil when you write.
  • some known bugs corrected.
  • more efficient code.
  • also, you can copy the translated text to oher software such Photohop or AE.
  • etc...

ما الجديد في هذه االنسخة ؟
  • يمكن استخدام المقبس على الماك و الويندوز
  • يمكن استخدام التشكيل عند الكتابة
  • بعض الأخطاء المعروفة تم تصحيحها
  • يمكن تصدير النص الناتج الى برامج أخرى مثل الفوتوشوب أو غيره

Download zArabic 1.3.5

Check out the new zArabic plugin page

RandomColor Script

I did a quick script to assign a random color to the objects present in the scene. I also added some functions to make it more 'convenient'. now, you can change the color of one/multiple objects, or inversely, disable single/all colors.

Download old RandomColor script

Check out the RandomColor plugin version

 here you can find source of the main Script RandomColor_All :

""" Set a random color to all objects """
import c4d
from c4d import Vector
from random import randint

def get_random_color():
    """ Return a random color as c4d.Vector """
    def get_random_value():
        """ Return a random value between 0.0 and 1.0 """
        return randint(0, 255) / 256.0
    return Vector(get_random_value(), get_random_value(), get_random_value())

def process(fct):
    """ Loop over the current document objects and apply a function to each one """
    def get_next_object(current_object):
        """ Return the next object in the hierarchy """
        if current_object.GetDown(): return current_object.GetDown()
        while not current_object.GetNext() and current_object.GetUp():
            current_object = current_object.GetUp()
        return current_object.GetNext()

    used_colors_list = []
    obj = doc.GetFirstObject()
    while obj is not None:
        doc.AddUndo(c4d.UNDOTYPE_CHANGE, obj)
        fct(obj, used_colors_list)
        obj = get_next_object(obj)

def set_color(obj, used_colors):
    """ Applay a random color to an object """
    color = get_random_color()
    # Check that the current color is not already used
    while color in used_colors:
        color = get_random_color()
    # Apply the chosen color to the object
    obj.SetParameter(c4d.ID_BASEOBJECT_COLOR, color, 0);

def main():

if __name__=='__main__':