Skip to content

Add P-and-p-editor to Projects - #473

Open
Pig-and-pancakes-team wants to merge 1 commit into
godotengine:masterfrom
Pig-and-pancakes-team:master
Open

Add P-and-p-editor to Projects#473
Pig-and-pancakes-team wants to merge 1 commit into
godotengine:masterfrom
Pig-and-pancakes-team:master

Conversation

@Pig-and-pancakes-team

Copy link
Copy Markdown

Hello! I would like to suggest my project for the Awesome Godot list.

P-and-p-editor — A minimal fantasy console and IDE built entirely in Godot 4.

Why it's cool:

Custom VM: It uses a virtual machine logic with a dedicated VRAM-like system based on PackedByteArray for high-performance pixel manipulation.

Built-in IDE: Includes a code editor (GDScript-based API), sprite editor, and map editor within a single environment.

Optimized Rendering: Features a custom rendering pipeline to mimic retro-console limitations while maintaining 60 FPS.

Open Source: Licensed under MIT.

I am an indie developer working solo on this project. My goal was to create a lightweight, "all-in-one" environment for people who love the constraints of retro-gaming (like PICO-8) but want to stay within the Godot ecosystem.

@Pig-and-pancakes-team

Copy link
Copy Markdown
Author

Hello maintainers!

Could you please trigger the pending workflow check for this PR whenever you have a moment available?

To make reviewing as easy as possible, here are the technical details of the project:

Engine Version: Built and fully stable on Godot 4.1.1.

Source Code: The repository includes all complete project files and scene nodes (.tscn), so it can be opened and modified in Godot instantly.

Pre-compiled Executable: A standalone Windows .exe build is available under the repository Releases for immediate testing.
(Note: Since it is an unsigned indie binary, Windows may show a standard system warning upon launch, which is safe to bypass).

To demonstrate that the custom wrapper API is fully working, here is a complete pseudo-3D retro racing game code. Anyone can download the standalone editor, press F1, paste this code, and hit F4 to drive instantly at stable 60 FPS (control on arrows):

var road_pos = 0.0
var car_x = 64.0
var speed = 0.0
var target_speed = 0.0
var timer = 0

func _game_loop():
	timer = timer + 1
	cls(2) # A deep, dark-purple sky background

	# --- 1. Moon and clouds ---
	# White crescent (static)
	rect(100, 15, 6, 6, 7)
	rect(102, 13, 6, 6, 2) # "Cutting out" a portion of the sky's color
	
	# Pinkish clouds (drifting slowly)
	for i in range(3):
		var ox = (i * 60 + int(timer * 0.2)) % 160 - 30
		var oy = 20 + i * 8
		rect(ox, oy, 20, 4, 13) # Pink/purple
		rect(ox + 4, oy - 2, 12, 3, 13)

	# --- 2. SOUND ---
	if speed > 0.1:
		if timer % 32 == 0: sfx(60, 0.2)
		if timer % 16 == 0: sfx(400 + int(speed * 15), 0.02)

	# --- 3. Physics and Control ---
	if btn(2): target_speed = 4.0
	elif btn(3): target_speed = 0.0
	else: target_speed = 0.0

	if speed < target_speed: speed = speed + 0.02
	if speed > target_speed:
		var f = 0.06 if btn(3) else 0.01
		speed = speed - f
	if speed < 0.01: speed = 0

	if btn(0): car_x = car_x - (speed * 0.5)
	if btn(1): car_x = car_x + (speed * 0.5)
	car_x = clampi(car_x, 25, 103)

	# --- 4. ROAD AND ALTERNATING OBJECTS ---
	road_pos = road_pos + speed
	rect(0, 60, 128, 68, 0) # Black earth beneath the horizon
	
	for y in range(0, 60):
		var line_y = 64 + y
		var road_w = y * 2.0
		var off_x = (car_x - 64) * (y / 60.0)
		var l_edge = 64 - road_w/2 - off_x
		var r_edge = 64 + road_w/2 - off_x
		
		# Roadbed
		rect(int(l_edge), line_y, int(road_w), 1, 5)
		
		# Marking
		if int(line_y + road_pos) % 30 < 10:
			rect(int(64 - off_x), line_y, 1, 1, 7)

		# BORDERS (Small Fences)
		if int(line_y + road_pos) % 20 < 10:
			pset(int(l_edge - 1), line_y, 8)
			pset(int(r_edge + 1), line_y, 8)

		# BORDER GENERATOR (Alternating)
		var z = int(line_y + road_pos)
		if z % 100 < 2:
			# Choosing a side based on the division of the position
			var side = (z / 100) % 2 
			if side == 0:
				# Flashlight on the left
				rect(int(l_edge - 6), line_y - 12, 1, 12, 5)
				rect(int(l_edge - 7), line_y - 14, 3, 3, 7)
			else:
				# Flashlight on the right
				rect(int(r_edge + 5), line_y - 12, 1, 12, 5)
				rect(int(r_edge + 4), line_y - 14, 3, 3, 7)
		
		# GRASS (appears where there are no streetlights)
		if z % 40 < 1:
			var t_side = (z / 40) % 2
			if t_side == 0: pset(int(l_edge - 4), line_y, 3)
			else: pset(int(r_edge + 4), line_y, 3)

	# --- 5. CAR ---
	var sh = randi()%2 if speed > 3.0 else 0
	rect(54, 110 + sh, 20, 10, 0)
	rectb(54, 110 + sh, 20, 10, 7)
	pset(57, 112 + sh, 8); pset(70, 112 + sh, 8)
image

The app also includes an internal "Forbidden Command Filter" to safely sandbox script executions. Thanks for your time and review!

@Pig-and-pancakes-team

Copy link
Copy Markdown
Author

A quick update for maintainers! 🚀

I have officially packaged all these changes and standalone executables into the stable v1.1 release of the P-and-p-editor.

In addition to the racing game code mentioned earlier, this release now includes a built-in, original pixel-art "demake" of a paddle-and-ball game titled I call this Game on P-and-p-editor 1.1

617218993-a389b90b-ea6c-43a9-a8b5-28ccb71d6b86

👉 The official release page is available here: https://github.com/Pig-and-pancakes-team/P-and-p-editor/releases/tag/1.1

The engine is fully stable, offers complete backward compatibility with version v1.0, and is ready for your final review. Thank you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant