
Retro game engine for developers that enjoy creating games like it's 1997 - openbasic
https://github.com/klaussilveira/qengine
======
paradoxparalax
1997 was exactly the Year when the game Myth The Fallen Lords[1] was released.
'til today I think is the best game ever made. Please if there is anyone who
works for Bungie or whatever company owns this abandoned game, whose community
have worked hard for years to keep alive, without any help from the Owner,
even reverse-engineered the server, because they prefer to keep the game dead
and it's tomb abandoned then release the servers code, Please guys just Open
Myth already, It's been 20 years! It is considered "retro" now, did you read
that headline? The community must still be alive, even. seems that there is
still a multiplayer server running. And it is a damn good multiplayer game to
play even today, with very good chat interface for team communication. Maybe
the best I ever saw in a game. Imagine what was this for a youngster in 97 to
hear the sound of the 3.6 speed Dialed Internet Conection, after a long minute
of making weird sounds, finally makes the rrrrr sound that you knew it means
you are on the Internet and can Play this unbelievable thing...back then it
was jaw-dropping.

1-
[https://en.wikipedia.org/wiki/Myth:_The_Fallen_Lords](https://en.wikipedia.org/wiki/Myth:_The_Fallen_Lords)

~~~
a_t48
You're barking up the wrong tree with Bungie - you need to contact 2K
Games...and good luck on that. I know some people who have tried, both with
Myth and with Oni.

~~~
paradoxparalax
Ok , thanks for that information, sincerely. Let's find some friendly agent to
assume control of this 2K company then. Thank you. Actually, when there is
Unity3D around, what is the point of them keeping it closed. They could still
keep the Movie and Art rights, if someday Hollywood wants to make a movie of
it or whatever dream they have of milking it somehow in the future. They might
very well loose the value of the Art and Story itself when someone makes a
similar Unity3D game with a passable Art and Story that buries their value,
and now it buries for real. Can't understand what is the point of their
reasoning keeping it frozen.

~~~
wjnc
Take Two is the owner of 2K Games. Take Two has a USD 12.4 billion market cap.
Take Two refers to 2K as a principal office. Quite the endavour for your
friendly agent. Best bet would be to found a startup that greatly enhances
revenue on old games by, say, automatically remastering them and them pitching
to Take Two. You can't clever your way around 12 billion.

Another thought: firms this size usually have their own M&A-team. Obviously
you could buy the IP at an offer they can't refuse (but you probably couldn't
Kickstart). Might sound snarky but there doesn't seem to be a market for old
IP in games, which suggests they will not take your idea serious for 'normal'
market value. That might be pretty economic. Big game producers need people
playing new games, not having too much fun with (better) games from the old
days. The hedonistic threadmill is what makes their firm the current size.
Don't distort that balance by opening up the retro market.

~~~
paradoxparalax
I see. Thanks. So they kill it, cut out it's head and bury on a salt desert so
people will forget it exists and buy their new game instead. Still feels that
something isn't quite right in this being the only reason, it's strange. But
yeah, you are right, would need to call more than one friend to get 6B USD
just for fun money, to risk on the game industry because of a personal caprice
:D Your ideas were better, thanks.

~~~
a_t48
They are big enough that they don't care unless you offer them _a lot_ of
money or you know just the right people to talk to and have the correct
connections.

------
git-pull
This is a cool project!

\- CMake, yay! These make generating build files for a variety of platforms
(even Windows) a breeze. It also works with code completion stuff (CLion IDE,
KDevelop both have CMake-based projects)

\- I like how it splits stuff up as well
([https://github.com/klaussilveira/qengine/tree/master/src/gam...](https://github.com/klaussilveira/qengine/tree/master/src/game)).

\- As for vendorizing SDL2, there is an opportunity for optimization: The
shared libraries and header files can be scanned through CMake scripts.
Example: [https://github.com/tcbrindle/sdl2-cmake-
scripts](https://github.com/tcbrindle/sdl2-cmake-scripts).

\- I see the .clang-format file, nice! (This is for clang-format:
[https://clang.llvm.org/docs/ClangFormat.html](https://clang.llvm.org/docs/ClangFormat.html))

Unfortunately, license is going to be a real barrier to most game developers.
The ironic thing is this engine includes SDL 2 which prides itself on being on
a permissive license.
([https://youtu.be/MeMPCSqQ-34?t=405](https://youtu.be/MeMPCSqQ-34?t=405),
6:40 to 7:30)

If it's the intention to create an open source library to be helpful as
possible to developers. If it's the intention to have a library just for use
in the GPL ecosystem of games (which isn't bad: OpenTTD is GPL!) then this is
okay.

The reason why is a private game developer want to retain control of their
intellectual property, even throughout the prototyping phase.

As for open sourcing, I'd approach it in a different way: I'd release reusable
components under a permissive license (e.g. MIT, BSD, ISC, zlib, etc.) and
keep any creative work product code/source files private.

Similar SDL2 framework for 2D games (I made some CMake contributions a while
back): [https://oxygine.org/](https://oxygine.org/)

~~~
openbasic
The license can be a problem for some studios, specially ones with
uncomfortable contracts with publishers. If you are in that situation, I
highly recommend writing a LuaJIT integration layer.

The game code is very well separated from the engine, and qengine already
removes a lot of non-generic game code from Q2. So all you have to do is
delete a little bit more, write some glue code to tie in Lua, and you can
write the entire game logic in a separate codebase, with a separate license.
Also, you get moddability.

~~~
ufo
I think using Lua scripting like that still counts as "dynamic linking" from
the point of view of the GPL.

[https://www.gnu.org/licenses/gpl-
faq.en.html#GPLPlugins](https://www.gnu.org/licenses/gpl-
faq.en.html#GPLPlugins)

~~~
badsectoracula
The Lua interpreter itself would still be under GPL but the code that the Lua
interprets would not since as far as the interpreter is concerned the script
is data. The GPL even has a section on this:

[https://www.gnu.org/licenses/gpl-
faq.en.html#IfInterpreterIs...](https://www.gnu.org/licenses/gpl-
faq.en.html#IfInterpreterIsGPL)

~~~
ufo
Lua is MIT licensed. The point is that if you have a GPL game engine and use
lua scripts to turn it into a full game then you also need to license the
scripts as gpl if you want to distribute the game.

(As others pointed out , oif you are looking for a loophole, game assets might
be a better way to go)

------
eukara
The repo is basically Quake II's software-renderer and game-logic module
merged into the engine binary. Yamagi Quake II ships with an additional OpenGL
1.3 and 3.X renderer which I'm sure could be ported over if SW was undesired.

While it's something cool to work with Quake II, its net-protocol has its
downsides and I'd encourage anyone replace it with QuakeWorlds' networking as
you'll run at a locked 10 Hz with the clients interpolating between the frames
otherwise. This was done for easier handling of animations in single-player
entities, but was regretted later (according to JohnC's own .plan files).

Quake 1 is nicer to work with in that regard. Also get used to wobbly model
animations with the MD2 model-format as the precision of the vertex-animated
models is very poor :)

It's also interesting to note that Carmack considered using a 16-bit MMX-
powered SW renderer for QuakeWorld/Quake II (making it real cutting edge in
1997), but considering the global 8-bit palette was already in place, it would
have resulted in a loss of precision of already paletted textures so it was
decided against and they did it the old way.

------
madrox
This is really cool, and I can’t believe I’ve lived long enough to see Quake 2
be called “retro.”

I’ll likely live long enough to see the Unreal Engine of today called retro.
I’ve never thought of this before, and it’s wild.

~~~
gdubs
Came here to say the same; it’s like the first time I heard Nirvana on a
“classic rock” station.

~~~
KC8ZKF
“Nevermind” is longer ago from today than “Rubber Soul” was from “Nevermind.”

Time is cruel.

~~~
cmrdporcupine
Holy crap you just made me feel completely ancient. I had never made that
realization before.

Is this how my parents felt in the 80s?

~~~
Moru
Ofcourse XKCD has it's own category for you to read:

[https://www.explainxkcd.com/wiki/index.php/Category:Comics_t...](https://www.explainxkcd.com/wiki/index.php/Category:Comics_to_make_one_feel_old)

------
marvin
Was anyone here at HN into Dark Forces II / Jedi Knight back in the day? The
retro graphics of this post made me a bit nostalgic. The in-game scripting in
Jedi Knight was my first exposure to software, and the modding community at
Massassi was an incredibly creative and lively place.

The poor checksums on game assets in Jedi Knight, along with early multiplayer
on MSN Gaming Zone made the whole gaming community an adventure. You could
never be sure what kind of shennanigans you encountered, with people having
all sorts of weird gameplay hacks.

~~~
saberworks
Hello, you could say that. I love JK and I played the thing with the software
renderer for years because my s3 virge card wouldn't render the game
correctly.

My son teases me these days "Jedi Knight sucks, dad!" when he catches me
working on the site (this is Brian from Massassi; it's sort of still around).

~~~
asark
> this is Brian from Massassi

Oh man, thanks so much. That site's awesome.

Jedi Knight's one of only three online shooters I ever played much of
(Wolfenstein: Enemy Territory and one of the Elite Force games, I forget
which, being the others) and the only one I ever got good enough at to be
accused of "hacking" at least a couple times a session (never, ever did). It
has a special place in my heart. Thank you for your work in the community.

~~~
Twirrim
> Wolfenstein: Enemy Territory

I sunk so much time in W:ET, got to a pretty good level with it, until
everyone figured out the wallhacks, and every game became about trying to nail
that perfect jump. For whatever reason, no matter how much time I sunk in to
those wallhack training maps I could never get the knack of it, which meant I
could no longer be where I needed to be to defend the base.

------
crushcrashcrush
I know this will probably get buried here, but like - I want to try this. I
was a huge fan of Quake 1 and 2. How the hell do I get started? (Note: I'm not
a programmer, I'm a marketer. I know just enough PHP/JS to be stupidly
dangerous.)

~~~
openbasic
I think the easiest way to get started is mapping. This is a very cool map
editor for Q1 and Q2:

[https://github.com/kduske/TrenchBroom](https://github.com/kduske/TrenchBroom)

There's plenty of good content here:

[http://forum.tastyspleen.net/quake/index.php?topic=21859.0](http://forum.tastyspleen.net/quake/index.php?topic=21859.0)

[http://maps.rcmd.org/tutorials/](http://maps.rcmd.org/tutorials/)

Map compiling and texture tools are included in the engine code:

[https://github.com/klaussilveira/qengine/tree/master/src/too...](https://github.com/klaussilveira/qengine/tree/master/src/tools)

The Quake community is awesome:
[https://quakewiki.org/wiki/Mapping_tutorials](https://quakewiki.org/wiki/Mapping_tutorials)

[https://www.quaddicted.com/forum/](https://www.quaddicted.com/forum/)

[http://www.celephais.net/board/forum.php](http://www.celephais.net/board/forum.php)

~~~
crushcrashcrush
Thank you for this!!!

------
jdmoreira
Just a few days ago I was searching on how to implement a software renderer. I
remember enjoying the software rendered of quake much more than the opengl
version.

Great project!

~~~
openbasic
If you dig software rendering:

[https://github.com/ssloy/tinyrenderer](https://github.com/ssloy/tinyrenderer)

[https://www.youtube.com/watch?v=HQYsFshbkYw](https://www.youtube.com/watch?v=HQYsFshbkYw)

[https://www.youtube.com/watch?v=Y_vvC2G7vRo&list=PLEETnX-
uPt...](https://www.youtube.com/watch?v=Y_vvC2G7vRo&list=PLEETnX-
uPtBUbVOok816vTl1K9vV1GgH5)

[https://www.amazon.com/Tricks-Programming-Gurus-Advanced-
Gra...](https://www.amazon.com/Tricks-Programming-Gurus-Advanced-Graphics-
Rasterization/dp/0672318350)

~~~
mhd
Mandatory reading: Michael Abrash’s Black Book, available freely and legally
online at [https://github.com/jagregory/abrash-black-
book](https://github.com/jagregory/abrash-black-book)

------
claudiulodro
Super cool. I always loved that mid-90s 3D look.

I'm familiar with how the GPL applies to regular system/web software, but I
haven't had experience with it and game engines before. Since this engine is
GPL-licensed it seems like any game built with this engine would then also
need to be GPL-licensed, correct?

~~~
klodolph
> Since this engine is GPL-licensed it seems like any game built with this
> engine would then also need to be GPL-licensed, correct?

Yes, mostly correct. In order to comply with the GPL, and distribute game
binaries, you need to make the source to any game you make with it available
under the same terms.

Technically that does not mean that you have to distribute the game under the
GPL, but in practice that's how you would comply with the engine's license.

~~~
setr
Wouldn’t a game engine have the same role as gcc? As a tool, unless you’re
extending the source itself, you shouldn’t be infected by the engine’s license

~~~
robbrit
Depends. In this case the engine is just a blob of code that you clone, and
you modify it in order to make your game. You'd have to comply by the rules of
the GPL.

------
Jaruzel
This is great. I remember back to the late 90s when I was busy hacking
gamex86.dll to customise my Quake2 Death-matches with my friends.

One thing I wonder about this release is though - the Original Quake2 engine
had a very fixed palette and also some odd lighting that always skewed the
palette to a brown tint - does qengine fix this?

Also... Bonus... Some Quake2 maps, that I made way back:
[http://www.jaruzel.com/blog/my-quake2-maps](http://www.jaruzel.com/blog/my-
quake2-maps)

~~~
openbasic
From my perspective, that odd lighting and tint is part of the aesthetic that
makes it great. You can learn more about how the renderer works here:

[http://fabiensanglard.net/quake2/quake2_software_renderer.ph...](http://fabiensanglard.net/quake2/quake2_software_renderer.php)

You can create your own palette using the included pcx2pal:
[https://github.com/klaussilveira/qengine/blob/master/src/too...](https://github.com/klaussilveira/qengine/blob/master/src/tools/pcx2pal/pcx2pal.c)

After that, you might want to generate the colormap:
[https://github.com/klaussilveira/qengine/blob/master/src/too...](https://github.com/klaussilveira/qengine/blob/master/src/tools/colormap/colormap.c)

If you enjoy the code of Q2, but also would like more modern rendering, I
highly recommend quake2xp from Barnes:
[https://www.moddb.com/mods/quake-2-xp](https://www.moddb.com/mods/quake-2-xp)

Yamagi is the gold standard for all Q2 engines:
[https://github.com/yquake2/yquake2](https://github.com/yquake2/yquake2)

And some art help:
[http://maps.rcmd.org/tutorials/q2_palette_textures/](http://maps.rcmd.org/tutorials/q2_palette_textures/)

------
pooppaint
Is allegro still maintained, I thought it was as of a few years ago. You can
develop like its 1997, or 1987.

~~~
mdavidn
Factorio, a recent relatively popular indie game, was developed on Allegro.

~~~
folkhack
They're moving off of it last I heard. Sounds like it's a legacy solution at
this point.

[https://www.factorio.com/blog/post/fff-230](https://www.factorio.com/blog/post/fff-230)

~~~
mikepurvis
Huh, I wonder what that'll mean for cross-platform compatibility. As they say
in the post, Allegro supports a lot of platforms, whereas if they end up just
targeting DirectX 11, that pretty much locks out everyone other than Windows
and Xbox, doesn't it?

~~~
folkhack
I believe they support Linux as a first-class citizen, even with removing
Allegro! I've had VERY good luck with Factorio running through Steam, on
Debian Linux (both 8 and 9). I have also ran it on Mac OSX and Windows 7
without any issue.

That game is so rock-solid as far as stability/system support that I would
literally buy it again out of general principal =)

------
zokier
> Removal of OpenGL

Huh. I suppose CPUs are fast and all, but still seems odd to replace perfectly
good OpenGL renderer with SW rendering.

~~~
badsectoracula
Considering this, I wonder why the choice of Quake 2 instead of Quake 1 since
the main thing Quake 2 introduced has over Quake 1 was colored lighting but
that was only available in the OpenGL version.

~~~
beetwenty
The MD2 model format is considerably extended over MDL, in size limits, vertex
resolution, and features like texture animations. And while Q1 had the split
between Netquake and Quakeworld networking, Q2 has a single system. Those
kinds of refinements can make the difference.

------
mitchtbaum
Anyone else remember Silent Death Online?
[https://www.youtube.com/watch?v=3BvgxDCbZxE](https://www.youtube.com/watch?v=3BvgxDCbZxE)

Hopefully one day it'll live on in another game that would do for others what
it did for me. I even have some notes scoping it out..

Just roughly speaking, maybe something something like
[https://github.com/waterson/purescript-
asteroids](https://github.com/waterson/purescript-asteroids) and
[https://github.com/hdgarrood/multipac](https://github.com/hdgarrood/multipac)
together

..But who knows what game programming might look like soon.

------
misterdoubt
Ooh, I fondly remember late '90s nights tinkering in QERadiant. These days I'd
be able to tinker way harder than just editing levels.

~~~
openbasic
[https://github.com/kduske/TrenchBroom](https://github.com/kduske/TrenchBroom)
is the new cool

------
fit2rule
And for those who'd prefer it were 1983 and we had the tooling then, that we
have now, there is 8-bit Dude's engine, 8-bit unity:

[http://8bit-unity.com/?page_id=121](http://8bit-unity.com/?page_id=121)

.. which is also quite intriguing, for those of us with a bent towards the
8-bit aesthetic...

------
pvorb
With only two commits, which are several months old, this project doesn't look
very healthy.

------
ilaksh
If you want something more general purpose that can load lots of different 3d
formats including Quake 3 maps, take a look at Irrlicht.

------
jenscow
Quake 2 is _retro_? Shit, I'm old.

~~~
robbrit
People in their early 20's don't even know Half-Life (released at the end of
1998, over 20 years ago now), let alone Quake. We're definitely getting old!

~~~
Apocryphon
Blame Valve's lack of interest in maintaining their franchises for that one.

~~~
hnbroseph
i lowkey kinda feel that the pervasive gamer hype about half-life 3 (for
example the "hl3 confirmed" meme was extremely pervasive) made valve feel like
it would be impossible to match the hype, and any flaw would be hyper focused.
maybe now that it's faded a bit there won't be as much pressure. or i could be
wrong about that mattering.

~~~
empyrical
The book "The Final Hours of Portal 2" has a section where they explained how
much pressure they felt to try and have Portal 2 live up to Portal 1. Even
effectively shutting down development of of other games for 2 months so the
whole company could focus on prototyping experiments for new gameplay concepts
that could be incorporated into Portal 2.

I would not be surprised of the pressure they feel for Half-Life 3 to be great
is an order of magnitude greater than what they felt with Portal 2

~~~
Apocryphon
Team Fortress 3 when

------
gutomaia
\o/

------
sneakernets
This needs true-color rendering with colored lighting at the very least. It's
not fun when everything is grey/brown pixel smudge.

~~~
openbasic
There's two other cool engines with a software renderer that support colored
lighting:

[http://super8.qbism.com/](http://super8.qbism.com/)

[https://github.com/leilei-/Engoo](https://github.com/leilei-/Engoo)

Both are Q1 though. However, the gray-ish/brown-ish look is entirely dependent
on the color palette that you chose to use in your game. You have 256 colors
to choose from, and with the 256x320 colormap, you get 64 shades of each.

~~~
sneakernets
Even GZDoom (A Doom port) has software color lighting now, so I'm shocked this
doesn't have it, that's all.

And engoo is very good; I was one of its beta testers!

~~~
openbasic
PRs are welcome! :D

