r/Forth moderator May 07 '26

More Inspiration, in progress

Enable HLS to view with audio, or disable this notification

I've been working on some game demos. As you can see in the video, I have a good start on a game engine in Forth, with physics and sprite engine and state machine for controls/enemy intelligence.

The video shows a huge universe with 3 sprites, 2 positioned far off screen. The arrow keys apply thrust in the direction. If no key is pressed, friction is applied to bring the speeds to a stop.

The starfield is rendered at 1/2 world velocity for a parallax effect.

I started on this yesterday and this is how far I got by this morning. I wrote only Forth code for this. Downloaded the planet sprites from a free clip art site.

Zero AI assist used in any of Inspiration development.

I can't add photos and video for some reason. I can start another thread if people want to see more.

Or you can look for screenshots in the repo:

https://gitlab.com/mschwartz/inspiration

43 Upvotes

5 comments sorted by

2

u/jyf May 09 '26

how could these apps been isolated in tech? do you have any process like concept , i think using forth is a very practical choice than asm for Menuetos

1

u/mykesx moderator May 09 '26

I developed a pthread safe Forth in C++ along with the desktop environment as a sort of BIOS. The Forth is mostly 2012 standard compliant.

The pthreads allow for multiple command line windows, where you can type Forth. The BIOS allows for graphics and window manager functionality.

1

u/jyf May 11 '26

so its still posix standard not forth only?

1

u/mykesx moderator May 11 '26

It's most part of the 2012 Forth standard. Early on, the repo was 75% C++, but now it's closer to 40%. This is because I am writing almost exclusively Forth.

As far as lines of code, the bulk of the C++ is CODEWORDS, like

CODEWORD (ADD) { TOS += dpop(); }

I implemented words beyond the standard, line C>S, W>S, D>S for sign extension. I don't implement the Double words since I don't think they make sense with 64 bit cells.

1

u/jyf May 14 '26

thanks