[HN Gopher] Dethrace: Reverse engineering the 1997 game Carmageddon
___________________________________________________________________
Dethrace: Reverse engineering the 1997 game Carmageddon
Author : mariuz
Score : 125 points
Date : 2023-04-26 08:56 UTC (3 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| AndrewKemendo wrote:
| This was one of the first games that really opened my eyes to how
| computers worked in High School.
|
| IIRC it compiled a collection of ancient text files, and so if
| you wanted to mod the game it was as simple as finding the right
| args in the right .txt and then modifying the flag or value. Like
| I recall the demo had "no blood" but all it did was replace the
| HEX for "red" with HEX for "green." Switching that turned on
| blood, which of course was a BIG improvement for 1997.
|
| Anyway, this is super cool and I really wish it was simpler to
| mess with games like this now. Incidentally Noita is one of the
| few games that you can still kinda do this with, though you need
| to know lua :/
| kentrf wrote:
| I remember changing the weight of some of the cars in the game,
| making Stella a 20 ton beast.
|
| It was not fun when you played against the modded cars. I got
| totally crushed when I forgot to revert the changes
| sitzkrieg wrote:
| tons of games use lua for gameplay scripting indeed, if there
| was one language to learn for modding i reckon that is the one.
|
| kenshi also has a txt file based modding system and barebones
| tools too
| canadianfella wrote:
| Civilization, OpenRA, Wesnoth. Three of my favourite games,
| all use Lua.
| senectus1 wrote:
| had so much fun getting "Artistic Impressions" in that game
| beebeepka wrote:
| Had tons of fun playing with 7??? other people on LAN. Non stop
| action. The second installment, and everything after that,
| didn't have that effect on me.
|
| Can't say I liked the "campaign". People do dumb, unexpected
| shit. That's where the fun is for me. Maybe future bots would
| be better
| tialaramex wrote:
| We had a group from, I'd guess, 1997 to summer 1998, who
| played Carmageddon on a LAN in a student house more or less
| whenever possible. We whittled it down to a single mode of
| the game that we hadn't found a game breaking exploit in, and
| we played so tight to the bounds of what was possible that if
| you screwed up you were invariably dead - e.g. you take the
| correct short cut, you car is repairable, you win, you go a
| little early, car is destroyed, you lose, you go a little
| late, your car is less damaged but you've lost far too much
| time to compete with people who went earlier. We'd play in
| teams, one driver, one co-pilot giving directions, like rally
| driving.
|
| I remember playing Carmageddon for a couple of hours after
| handing in my final undergraduate project, I hadn't slept for
| at least 24 hours, but the adrenaline meant I couldn't sleep
| after I finished either so we played Carmageddon. After a few
| matches I fell asleep on the stairs and woke up the next day,
| but being so young I was actually just fine.
| MrGilbert wrote:
| I don't think we have to wait that long. The bots of ,,Halo:
| Infinite" received a lot of praise, and they are
| "handcrafted". See this recent video by Tommy Thompson from
| AI & Games: https://youtu.be/4bOsJSRk0i8
| jonas21 wrote:
| This is cool, but I'm confused by the licensing. The LICENSE file
| says GPL, but then there's also a legal section in the README
| that says it's public domain but also non-commercial use only:
|
| > _Dethrace is released to the Public Domain. The documentation
| and function provided by Dethrace may only be utilized with
| assets provided by ownership of Carmageddon._
|
| > _The source code in this repository is for non-commerical use
| only. If you use the source code you may not charge others for
| access to it or any derivative work thereof._
|
| If you release something to the public domain, you can't place
| restrictions on its use, so which is it?
| badsectoracula wrote:
| According to a comment in the issues the license is GPL3 and
| that part of the readme was copy/pasted from another project
| that they forgot to remove.
|
| But then that comment was made in 2021 :-P
| jeff-1amstudios wrote:
| Dethrace author here - yep, we really need to tidy that up.
| The problem is that it's less fun than reversing code :)
| dale_glass wrote:
| Nice, but bad licensing. Don't invent your own, just slap
| something common on it, please. There's plenty to choose from.
|
| This:
|
| > Dethrace is released to the Public Domain.
|
| And this:
|
| > The source code in this repository is for non-commerical use
| only. If you use the source code you may not charge others for
| access to it or any derivative work thereof.
|
| Don't align with each other. If it's public domain, then
| commercial use is perfectly fine.
| anthk wrote:
| This. It happened with Dungeon/Zork. Tons of people it's
| ilegally slapping it a bad public domain/or even a stapled
| GPLv2 license on custom forks where Dungeon it's non commercial
| only until Lars Brinkoff and the rest of Zork creators from MIT
| approve it. (they're close).
| Beldin wrote:
| Hear, hear.
|
| I saw those two things and was wondering if they really meant
| to add additional terms after saying something is public
| domain... not a lawyer, still: I don't think that makes (legal)
| sense.
| doublerabbit wrote:
| Watching my older brother play Carmageddon and Dizzy were days I
| wish I could just relive. I just don't have motivation for
| today's games.
|
| Even the Windows 95 companion disc with Hover! was seriously fun.
| janosdebugs wrote:
| I was seriously contemplating creating a Hover remake, but I
| feel that the game mechanics probably didn't age well. It was
| fun for its time though.
| devmor wrote:
| This is so cool! Carmageddon was my very first video game.
| seattle_spring wrote:
| Electro-bastard death ray will forever be the root of some of
| my fondest gaming memories
|
| https://youtu.be/y6SvyDfl8P0
| jeff-1amstudios wrote:
| Internally they are called proximity rays :)
|
| https://github.com/dethrace-
| labs/dethrace/blob/e56790388bc94...
| mrsharpoblunto wrote:
| There's also OpenC1, which is an almost complete open source
| remake of Carmageddon. Jeff also has posted a ton of content
| around the internal workings and file formats etc on his dev blog
| - http://1amstudios.com/projects/openc1/.
| systemtest wrote:
| I always find it fascinating that games like Carmageddon are made
| by a small team in a short period of time.
|
| Nowadays such an accomplishment seems impossible.
|
| Page 16 of the manual has a list of all developers:
|
| https://cdn.akamai.steamstatic.com/steam/apps/282010/manuals...
| oblak wrote:
| Impossible? Clearly you haven't been paying attention. Plenty
| of modern games have been created by a team of 1, let alone 10
| guys. Not everything is AAA
| ghusbands wrote:
| Carmageddon (and 2) seemed to have a physics engine qualitatively
| different to the modern norm, seemingly modelling the time of
| impact and the impulse response to that, rather than correcting
| everything after intersection has already happened. It also
| seemed to have different static and sliding friction and modelled
| air friction and wheel dynamics to the extent that a power-up
| increasing acceleration and grip could make your car flip up like
| a hot rod.
|
| It made a huge difference to the feel of the physics and made
| things far less springy and slippery than box3d, havok and almost
| every modern game that uses a dynamic physics engine.
|
| This did mean that you could sometimes do things that made the
| physics take a noticeable amount of time and cause lag, but it
| also made things feel far more real than any physics engine I've
| seen since.
|
| Hopefully, someone will be able to reproduce that, now.
|
| Edit: I believe it even incidentally reproduced the intermediate
| axis theorem [1] on cars spinning through the air, presumably as
| an emergent phenomenon, which I've not seen any other physics
| engine do.
|
| [1] https://en.wikipedia.org/wiki/Tennis_racket_theorem
| JKCalhoun wrote:
| From what I have heard about Patrick Buckland (the primary
| author of Carmageddon) he was quite into "banger racing" and so
| took his joy of the sport very seriously when coding what was I
| believe originally supposed to be a banger racing sim.
| jeff-1amstudios wrote:
| Dethrace author here: I was lucky enough to talk to a couple of
| the original engineers. They also thought looking back that it
| was the vehicle physics engine that made the game so fun to
| play. Once you'd got over the initial excitement of running
| over pedestrians at least!
| orbital-decay wrote:
| This was my immediate thought when I saw this. Car collision
| physics seems to be mostly in src/DETHRACE/common/car.c and
| src/DETHRACE/common/crush.c.
| BrokrnAlgorithm wrote:
| Agree, Carmageddon 2's physics still feel modern to this day. I
| can't think of any other game except Beam NG perhaps that
| achieves the same level. But the impacts in Carma 2 seem to
| suprass even that one.
| butz wrote:
| "Carmageddon: Reincarnation" had even more advanced physics
| engine, although game ran a bit slow, so later iteration -
| "Carmageddon: Max Damage" used less detailed physics engine,
| suitable for consoles.
| BrokrnAlgorithm wrote:
| I believe Carma Reincarnation used a completely new system,
| I believe they talked about that in the dev blog. While the
| system may have been similarly powerful in theory, I
| distinctly remember it also being less fun than the Carma
| 2's system, somehow less reactive. Carma 2's approach
| essentially allowed for the car to be crushed into any
| polygonal form, best illustrated when you drove the car
| into the underside edge of an angled bridge or similar. It
| was rad and so much fun, considering and that was 1998
| which still blows my mind.
| ghusbands wrote:
| I remember trying (and funding) Reincarnation and finding
| it hard to really explore the physics, as it lacked set-
| pieces and seemed less fun when compared to Carmageddon 2.
| It's possible that I played after the big physics downgrade
| of maybe 2015 [1], or on a machine that couldn't handle it.
|
| I do wish there was a way to set up physics demonstrations,
| in all the games, for comparison with other engines.
| Certainly, the common boxes-made-of-jelly issue [2] is
| something I'm sure you wouldn't see from Carmageddon,
| though you'd probably see devastating performance issues
| with that same test.
|
| Carmageddon 2 did notably lack (as far as I could tell)
| simulations of aerofoils and other surface dynamics and
| their effects on handling; cars seemed to be modelled as
| near-blocks as far as drag was concerned.
|
| [1] https://steamcommunity.com/app/249380/discussions/0/343
| 78855...
|
| [2]
| https://kripken.github.io/box2d.js/demo/webgl/box2d.html
| msyoung2012 wrote:
| Can't wait until we get a good writeup of MegaRace
| https://en.wikipedia.org/wiki/MegaRace
___________________________________________________________________
(page generated 2023-04-29 23:01 UTC)