[open-source] I made a 3D mini game using Defold and uploaded it to itch

You can play this game on your phone browser or PC browser.

2026.1.10

I have open-source it on Github. Hope this helps you.


2026.1.1

I updated my game: fixed some bugs and optimized the GUI.


2025.12.31

I released my game on itch

10 Likes

Cool! Thanks for sharing! When playing on a keyboard it is a bit annoying to have to switch to the mouse to press the Play Again button. Perhaps I could press Space to play again?

4 Likes

This is a very good suggestion. I had never noticed the problem before. Thank you so much :slight_smile:

2 Likes

I want to share the implementation of this animated ‘Press Space’ text:

in .gui file

in .gui_script file

function init(self)
  
    local text_node = gui.get_node("text")

    -- 1. Up and down floating animation (Position)
    -- Get current position
    local current_pos = gui.get_position(text_node)
    -- Set target position: move 10 pixels up (or down) from current Y position
    local target_pos = vmath.vector3(current_pos.x, current_pos.y + 10, current_pos.z)

    gui.animate(
        text_node,                  -- Node
        gui.PROP_POSITION,          -- Property: position
        target_pos,                 -- Target value
        gui.EASING_INOUTSINE,       -- Easing function: InOutSine (most like breathing effect, very smooth)
        1.5,                        -- Duration (seconds)
        0,                          -- Delay
        nil,                        -- Completion callback
        gui.PLAYBACK_LOOP_PINGPONG  -- Key point: PingPong mode (A->B->A->B infinite loop)
    )

    -- 2. Left and right sway animation (Rotation)
    -- To make it look like "left-right" sway, first tilt it slightly to the left
    gui.set_rotation(text_node, vmath.vector3(0, 0, -0.1)) -- Start: tilt left 0.1 degrees

    -- Then make it tilt right 0.1 degrees, and loop
    gui.animate(
        text_node,
        gui.PROP_ROTATION,          -- Property: rotation
        vmath.vector3(0, 0, 0.1),   -- Target: tilt right 0.1 degrees (Z-axis)
        gui.EASING_INOUTSINE,
        2.0,                        -- Time can be different from floating animation for staggered effect
        0,
        nil,
        gui.PLAYBACK_LOOP_PINGPONG
    )
end
3 Likes

Is map mesh generated at runtime or 3d model? If it is runtime can you show code snippet of that part?

1 Like

Actually, I created the map by dynamically and randomly generating the built-in “cube.dae”.

The game is very simple, but I spent a lot of time on it initially and encountered many difficulties, because I was still a beginner at the time. I had only used game engines like Unity, Godot, and Unreal before, and I wasn’t familiar with Defold.

So I think its source code and project files are very useful and worth studying for beginners.

I will open-source it on Github later.

4 Likes