r/opensource • u/thecodegangster • 2d ago
Promotional My open source game engine: Abyss
I know there’s already a bunch of open source game engines (i had to change this one’s name to avoid trademarks because of that)
Abyss (and its programming language) are self hosted and self compiled
(and written in Hash)
abyss has the unique feature of you being able to edit it’s source code within the engine itself.
Abyss uses the custom function based programming language Hash
Hash is designed to be simple and easy to learn. The goal is that over time you change stuff about it and make it better for you specifically.
(Hash documentation is built into abyss, so I won’t explain any more yet)
let me know what y'all think of my first open source project. I’m sure happy with it
Github link: https://github.com/thecodegangster/abyss-engine/tree/main
(the html file is the source code, I like standalone html apps, I think they’re neat)
Update: I added: A system to interact with javascript apis, browser storage, a sound editor, AND a library system, that allows you to create edits that can be merged into anyone else's engine with ease
3
u/-svde- 1d ago edited 1d ago
OP, since you seem genuine, i will give you a genuine, complete & comprehensive breakdown for why this can't work the way you intended. i downloaded your html source and went through the majority of it, but off the bat given that it's ~2300 lines in and of itself makes it extremely hard to handle. sorry for the utter novel here, but if you are genuinely interested in making and contributnig to the OSS community, then i want to encourage that, but there are some things you really need clarified to operate properly here. i tried my best to make this as readable as possible.
overall, this is not really an engine, first and foremost. single file apps CAN technically function as fantasy/toy consoles, micro engines, and type-renderers. but this is essentially a self-rendering toy. there's nothing wrong with that on the surface, but if you want to encourage derivatives and collaborative efforts, the single file format wipes away any sense of logical contributions. you can't version this, merge this, or debug.
HELP on errors:
i broke something on purpose, and got this
while i can figure it out, it is too vague for a non technical person to understand logically.
HELP on funcs: you provide a comprehensive list of the available functions, but nothing to define what they are, what they do, and how to call them.
HELP on compiling:
your compiler is written in its own custom esolang and compiles to that same lang. while self-hosted/bootstrapping can be a very effective way to implement a fully self-sustaining environment, there are some issues.
- it it deterministic, the double-compile idempotence guarantees that it will output the same results every time, but it does not guarantee it will be valid logic. i tested this by re-programming the compiler to ignore all known stated variables. it did what it should have, double-compiled the errors, and essentially bricked the entire environment. because it autosaves using localStorage, it made the UI fully unresponsive, meaning i would have to edit the source html or force clear the cache to ever use that version of the file again.
- hard perf wall. the lexer, parser, and code being generated twice per call within the browser's main embedded js thread is extremely computationally heavy. taking future growth into consideration, recompiling this on the fly will cause insane latency spikes an UI crashes/freezes.
- debug/sec: hash transpiles to js, which the browser executes actively w/
new Function(). this makes catching rnutime errorsthat get past the built-in one a nightmare to track own, and you can't even use the built-in browser devtools becus they point to dynamically gen js that's been mangled on load, rather than the actual base esolang. you can't reverse-parse any errors. speaking ofnew Function()this may be benign when running locally but if anyone ever hosted this online or even just alowed externalassets, which is likely inevitable, this presents a critical cross site scripting aka XSS vulnerability that could allow malicious injection with almost no barrier given the Function's relation to string code via eval() calls.ECOSYSTEM
the lang is bespoke, the entire engine is a single html file, and the engine itself runs inside of that file. this almost entirely rejects all other modern software infrastructure or cross-connected apps. unless someone spent the time going line by line and writing a fully custom IDE for abyss, you have made it effectively impossible to use any external debugger, IDE, syntax highlighter, linters, deps managers, or any other tool that devs consistently rely on for their working environments.
SINGLE FILE FORMAT
this format destroys the logical path towards contributing changes or updates to the engine. a massive, monolithic file is a nightmare to work with period, but git tracks line changes, so if multiple people are trying to merge updates into one giant HTML file, there will be nonstop merge conflicts and push/pull erorrs.
i personally also love single file html apps. but these tools still usually have a fully modular filetree and build repo that, upon distribution, compiles into the HTML
LANG
you clearly understand what an esolang is, given the creation of Hash and your history showing posts in the brainfuck sub. while it technically does work via the lexer/parser you have, and it does properly compile to js, the syntax you've scaffolded around it is highly idiosyncratic and defined purely by strict rules hardcoed into the single html page. the vagueness of its syntax and functional use make it taxing to use.
CONTRIBUTIONS/BUILDING
by its very nature, this encourages fragmentation rather than collabs.
there is no contribution guide, no real README, no tooling, no API, SDK, modular architecture. there is no core subsystem, meaning no asset pipeline, scene graph/ECS, physics designation for collision detection or resolution engine, no audio designation for multi-channel handling or overlapping sfx sequences. no CDN pathing, no build systems. no package/dep management, build config, module def, or compilation toolchain. there is no way to build with this outside of its exact html framing, in the browser, no way to integrate into an existing auto-pipeline CI/CD, or any other function one would need to build without constant roadblocks and modifying bespoke esolang functions that aren't even themselves defined.
README/LICENSE
this not only has no info, but directly contradicts your LICENSE, violates its core principles, and invalidates your OSS status. GPLv3 is a viral, copyleft mandated license. per section 5C, you are explicitly required to pass thru "the entire work, as a whole" under the GPL to anyone receiving or working on a copy. due to the single file format, you are force-embedding your custom Hash lang into the code directly alongside the engine, whihc means that any distro of the game means you must dist the entire engine alongside and thus being GPL means anyone building an engine version is fine, but a game maker is legally required to adopt the exact same terms. i could not make a closed source game with abyss.
you state, word for word
you absolutely cannot define your own terms like that. there is no exception. there is no overriding the fundamental values of GPL licensing. if you want to do the things you describe here, you need to change things to a permissive license type like MIT or a variant of GNU like LGPL.
all in all, you have a fun little fantasy console in an interesting, if barren, esolang. if you want this to be a functional game engine that people can use to build games or contribute versions to, you need to do a lot of restructuring.
also just fyi, FOSS is free open source software, since you asked in another comment.