Node1D and other 1-dimensional node types for making 1D games in Godot.

Godot 1D

Node1D and other 1-dimensional node types for making 1D games in Godot.

1D Nodes

Have you ever wanted to make 1D games in Godot?

...no? You say you haven't? Ok, then this module isn't for you.

For anyone who does want to make a 1D game, Node1D and other 1D nodes now exist, just download this module and compile it with Godot!

Node1D is a CanvasItem-derived node, which means that it can exist in the same scene hierarchy as Node2D and Control nodes and it will preserve positions etc. This means that you can add 2D nodes as children of 1D nodes to have a 2D appearance with 1D game logic (1.5D...?) or you can make a 2D game with a node that can only move left and right (why not just use a Node2D and only change the X position? Good question). Node1D is also integrated with CanvasItem editor, so you can move and scale it with the 2D editor tools (trying to move up/down, scale up/down, or rotate it just does nothing).

Nodes

  • Node1D: Base class for 1D nodes. Has a position, scale, and Z-index.
    • Sprite1D: 1D sprite that displays one row of pixels at a time. Each row is a frame.
    • Camera1D: 1D camera, allows specifying a thickness for how many pixels tall the world is.
    • AudioListener1D: Same as AudioListener2D but for 1D.
    • AudioPlayer1D: Same as AudioStreamPlayer2D but for 1D.
    • CollisionObject1D: Base class for 1D physics objects (abstract). Has a size.
      • Area1D: 1D area for physics detection.
      • KinematicBody1D: 1D kinematic body used for characters and other animated objects.
      • StaticBody1D: 1D physics body which is static and does not move.

The physics nodes are backed by a PhysicsServer1D singleton (not exposed). It doesn't do any processing on its own, but it does all of the heavy lifting when you move a node using Area1D's move method or KinematicBody1D's move_and_collide method.

All classes are fully documented and have icons. The color is Cyan to fit with the existing color pattern: Red is 3D, Purple is 2.5D, Blue is 2D, so if we continue subtracting hue we get to Cyan. If Node4D ever exists, it would make sense to color it Yellow.

Why?

You might be wondering, why? Why spend time making 1D nodes if 1D games are basically pointless?

Are you sure that you need more spatial dimensions than left and right? Keep in mind that you also have time at your disposal! And colors! And audio! Plus you can always throw Sprite2D into your 1D game! You could make a rhythm game with objects moving left and right. Maybe you could make a game like the Google Chrome offline dinosaur without jumping? The possibilties are quite limited!

Besides, science isn't about why, it's about why not. Why are all of these nodes 1 dimensional? Why not marry 2+ dimensional nodes if you love them so much? In fact, why not invent a special 3D door that won't hit you on the butt on the way out because you are fired! Yes, you. Box your 3D stuff. Out the front door.

Versions

This module is available for Godot 4.x (see the master branch of this repo) and Godot 3.x (see the 3.x branch of this repo), except that there is no AudioPlayer1D in 3.x because there is no get_camera_2d in 3.x so I couldn't make AudioPlayer1D aware of Camera1D and I didn't want to make a sub-optimal AudioPlayer1D (you can use AudioStreamPlayer2D instead).

0D

Node0D is just Node. If you want Node0D, here's some GDScript:

const Node0D = Node
const AudioPlayer0D = AudioStreamPlayer

License

This repo is free and open source software licensed under The Unlicense. Credit and attribution is appreciated but not required.

Some parts of some files in this repository are derivative from Godot Engine and therefore its MIT license applies. You must provide credit to Godot Engine by including its LICENSE. This includes the icons, some of the docs, and some code in the Node1D and Sprite1D classes, and most of the code in the AudioPlayer1D class. Considering this repo is only usable in conjunction with Godot anyway, this will not be a problem because you should already be crediting Godot.

Owner
Aaron Franke
Frequent contributor to @godotengine. I manage the demos, moderate the asset library, and help maintain C# support.
Aaron Franke
Similar Resources

Send virtual keyboard presses in godot on linux/windows

gdvk - Godot Virtual Keyboard Send virtual keyboard presses in godot on linux/windows Please inform me about how my code is shit; I'm new to C++. Comp

Dec 30, 2021

A module for Godot 3.x that makes it easy to send crash reports to Backtrace

Godot Backtrace Module This module adds automatic crash generation support to Godot 3.x with the intent of making it possible to send the crash data t

Oct 28, 2022

A proof-of-oncept module adding real-time Wren support to Godot

Godot Wren Module This module adds a new node, called WrenManager, that allows for executing Wren code in Godot during runtime! Wren is a cool lightwe

Nov 28, 2021

SAM (Software Automatic Mouth) for Godot

gdsam SAM (Software Automatic Mouth) for Godot 3.4+ A GDNative library wrapper around the C port of SAM by Sebastian Macke over at https://github.com/

Dec 28, 2021

Defold Engine integration with Yandex.Metrica to track your games on Yandex.Games.

Defold Engine integration with Yandex.Metrica to track your games on Yandex.Games.

Yandex.Metrica for Defold Yandex.Metrica is a free of charge web analytics tool for websites, that's the reason why we can use it for HTML5 games. Yan

Nov 26, 2022

By putting in a lot of speed, the speed sequence is sorted and divided, three types of speed interval distribution maps are generated.(including broken line graph,histogram and curve graph)

Auto-drawing-speed-range-map By putting in a lot of speed, the speed sequence is sorted and divided, three types of speed interval distribution maps a

May 14, 2022

A refactored Proof-of-concept originally developed in 2017 to print all function calls with their arguments data types and values using Ptrace during program execution.

print-function-args-debugger A refactored Proof-of-concept originally developed in 2017 to print all function calls with their arguments data types an

Jun 17, 2022

USENIX 2021 - Nyx: Greybox Hypervisor Fuzzing using Fast Snapshots and Affine Types

USENIX 2021 - Nyx: Greybox Hypervisor Fuzzing using Fast Snapshots and Affine Types

Nyx: Greybox Hypervisor Fuzzing using Fast Snapshots and Affine Types Nyx is fast full-VM snapshot fuzzer for type-2 hypervisors. It's built upon kAFL

Dec 7, 2022

rax/RAX is a C++ extension library designed to provide new, fast, and reliable cross-platform class types.

rax rax/RAX is a C++ extension library designed to provide cross-platform new, fast, and reliable class types for different fields such as work with I

May 2, 2022
Godot-steam-api - Godot Steam integration using GDNative.

Godot-Steam-API Godot Steam integration without rebuilding Godot. Supports ?? Windows, ?? Linux & ?? MacOS (x86_x64/arm64). Getting Started Download t

Dec 29, 2022
Arbitrary Precision provides C++ long integer types that behave as basic integer types. This library aims to be intuitive and versatile in usage, rather than fast.

Arbitrary Precision (AP) Cross-platform and cross-standard header-only arbitrary precision arithmetic library. Currently it offers integer types that

Sep 28, 2022
This repository uses a ROS node to subscribe to camera (hikvision) and lidar (livox) data. After the node merges the data, it publishes the colored point cloud and displays it in rviz.
This repository uses a ROS node to subscribe to camera (hikvision) and lidar (livox) data. After the node merges the data, it publishes the colored point cloud and displays it in rviz.

fusion-lidar-camera-ROS 一、介绍 本仓库是一个ROS工作空间,其中ws_fusion_camera/src有一个工具包color_pc ws_fusion_camera │ README.md │ └───src │ └───package: c

Dec 7, 2022
Treexy is a library that implements a compact hierarchical data structure that can store and manipulate volumetric data, discretized on a three-dimensional grid
Treexy is a library that implements a compact hierarchical data structure that can store and manipulate volumetric data, discretized on a three-dimensional grid

Treexy is a library that implements a compact hierarchical data structure that can store and manipulate volumetric data, discretized on a three-dimens

Jan 4, 2023
DimensionalAnalysis - A compact C++ header-only library providing compile-time dimensional analysis and unit awareness

Dimwits ...or DIMensional analysis With unITS is a C++14 library for compile-time dimensional analysis and unit awareness. Minimal Example #include <i

Jul 8, 2022
Multi-dimensional dynamically distorted staggered multi-bandpass LV2 plugin
Multi-dimensional dynamically distorted staggered multi-bandpass LV2 plugin

B.Angr A multi-dimensional dynamicly distorted staggered multi-bandpass LV2 plugin, for extreme soundmangling. Based on Airwindows XRegion. Key featur

Nov 7, 2022
Code and material related to PICO-8 and other products by Lexaloffle Games LLP

lexaloffle This is a miscellaneous collection of code and material related to products by Lexaloffle Games LLP. This collection is maintained for the

Dec 29, 2022
PoC tool to coerce Windows hosts to authenticate to other machines via MS-EFSRPC EfsRpcOpenFileRaw or other functions.
PoC tool to coerce Windows hosts to authenticate to other machines via MS-EFSRPC EfsRpcOpenFileRaw or other functions.

PetitPotam PoC tool to coerce Windows hosts to authenticate to other machines via MS-EFSRPC EfsRpcOpenFileRaw or other functions :) The tools use the

Jan 4, 2023
Tactile-Arcade-Games - Wrote a C program comprised of four separate games that run in a loop using the PSoC 5LP board and Cypress IDE.

Tactile-Arcade-Games - Wrote a C program comprised of four separate games that run in a loop using the PSoC 5LP board and Cypress IDE. Used two potentiometers, two ADCs to convert their voltages to digital values, a PWM to drive two servos, an 8x8 RGB LED matrix, 40 digital output pins and 8 power MOSFETS to control the matrix, and a character LCD display.

Dec 30, 2022
A gdnative plugin for Godot's UWP export to add xbox live integration

GodotXbox Current instructions for setting up DLL, steps to setup project for contributing/modifying are coming soon. It should be noted that Godot's

Oct 31, 2022