|
Ramen, a 2D game engine for standard Forth - 1.6.0 |
roger levy
Member #2,513
July 2002
|
Release: https://github.com/RogerLevy/ramen/releases/tag/1.6.0 Github homepage: https://github.com/RogerLevy/ramen/ Examples: https://github.com/RogerLevy/ramenexamples Zelda clone (WIP): https://github.com/RogerLevy/linkgoesforth Presentation on GUI toolkit / footage of Zelda clone: https://www.youtube.com/watch?v=-e2sUlnSlTc Twitter: https://twitter.com/RamenEngine |
Peter Hull
Member #1,136
March 2001
|
I watched the video. Very interesting, well done
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
While I love ramen noodles, I don't think I'll be giving up C++ and Java+Kotlin to program in Forth.... My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
roger levy
Member #2,513
July 2002
|
It's no replacement but it is huge fun once you learn it, which isn't hard. You can get to a point where you are rolling off ideas like you are dictating directly to the computer. Here's the meat of the pink bouncing ball's script: Factor out a couple theoretical utility words and you could do the same thing with even less effort: bouncer :to start 65 draw-ztile 0 perform> 3 24 sinbounce ; The possibilities are almost intoxicating. No types, no headers, no compile time (it's instantaneous). It's a limited space, but it has strengths. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
What you just wrote might as well be hieroglyphs to me. I couldn't make sense of that even with my glasses on.... My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
roger levy
Member #2,513
July 2002
|
It's simple just read it left to right. Parameters go first, i.e. it's postfix so you don't 1 + 2 you 1 2 +. : and ; start and end a function definition and apart from flow control (if/then) and understanding the VM and dictionary that's pretty much it. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
>bounce sin abs negate 24 * ; So that's really; 24*(-abs(sin(bounce)))? That's horrific. Why postfix? Why not prefix? That's so much clearer. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
roger levy
Member #2,513
July 2002
|
Because it compiles fast, and actually it's easier, there's never any ambiguity about order of operation and it's easier to factor. I actually think the version you wrote out is a headache! Understanding the transformations numbers go through step-by-step is effortless in postfix. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
You said read it from left to right, and that made no sense at all. If it was prefix, it would be : * 24 negate abs sin bounce , and it would be perfectly clear to any human being what it did. Postfix notation may be easier to pop on and off a stack, but it's not worth it. You made coding harder so compiling would be easier. That's not a trade-off I'm willing to make. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Niunio
Member #1,975
March 2002
|
A game engine to make games with FORTH? Nice!!! I actually never used FORTH but I made a scripting language inspired by it, even used it in a game engine mock-up to build interactive fiction games. It was pretty easy to use, actually. ----------------- |
roger levy
Member #2,513
July 2002
|
That's totes the idea! When I found out about Forth 15 years ago I was so intrigued with the simplicity and after I got the hang of it it was so much fun. I'm hooked. I've been feeling a little restricted capabilities-wise so I'm working on a physics module using Chipmunk2D. Also have plans to create a basic 3D rendering module. I'm doing it for me primarily but I'm always hoping one day there'll be a small userbase. |
|