Jan 10, 2013 at 8:32 AM
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Pronouns: he/him
Why is Cave Story modding hard?
This is a rant about why modding the original version of PC Cave Story
is so difficult and why making an EXACT clone of Cave Story in C++
will not help very much.
For a Cave Story clone to be successful, it must be significantly different
from the original in some particular way, or else we are just playing the same old
unmoddable game on the same old PC, or some other platform.
Why do some people consider modding to be a difficult chore?
Because every modder is lazy? Because people like to procrastinate?
Because people prefer working on projects that make more sense as
well as cents? (mucho dinero)
No, that is not true. Most modders are not lazy, and many people don't procrastinate that much,
at least not while working on something they are genuinely interested in. Even though someone might
work on something else for a while, that just makes said person a better talent overall, right?
Sure. But why have only a few people finished a mod?
Completely finished mods, as in ones that possess credits that do not display
"Thanks for trying demo 0.38" at the end, tend to have 3 things:
- Different Maps
- Different TSC
- Different Graphics (maybe)
And that's it.
A mod is difficult to make, and it is almost impossible to finish a mod that contains
any assembly hacks at all. A CS clone written in C++ is also nearly impossible to finish,
UNLESS the clone is exactly the same as the original (NXEngine).
NXEngine for PC is a bit pointless, at least in my opinion, because we already have the
original and can edit the x86 assembly contents of the original game very easily.
When I say "very easily", I mean the laws of physics permit us to do it.
Noxid's CsEngine is not pointless because it does not implement Cave Story. Instead it implements
some version of King: Strife & Sacrifice, colloquially called King's Story by quite a few people
who don't know the real name of the mod/clone/thingy, and also by Noxid who sometimes forgets
that he actually named it K: S&S.
A clone of Cave Story that would support online interaction, such as a possibly revived AGL or
a working version of NetStory, would be far more useful than PC-based NXEngine.
But WHY HAS NOBODY modded NXEngine? At all? Why has nobody made a PC mod of Cave Story using
the C++ code of NXEngine?
Because C++ is much, much more difficult to understand and write than x86 Assembly.
Assembly uses prefix notation, similar to Lisp (a beautiful functional language),
except that it absolutely cannot evaluate nested prefix expressions. Also it has trouble
doing dynamic typing like Lisp, except with those good old void* pointers, which are
the only real pointers in x86 Assembly because bytes are always just bytes.
C++ has horrific syntax, illogical (and unreadable!) use of * and & for multiplication,
dereferencing, bitwise ANDing, referencing, declaring a pointer, and declaring an array
which is also a pointer. Who really thought it was a good idea to use a single operator for
3 or more unrelated purposes?
I would like to congratulate the designers of C and C++ for
creating a language that a computer can successfully parse
and compile into an executable, and yet somehow a human cannot
do the same thing and turn the program into brainwaves
without years of programming experience.
C++ also contains a bunch of other failed attempts at turning C,
a type of assembly language, into JavaScript, a type of object-oriented language.
It is also irrelevant that JavaScript was born after C and C++.
The reason Lisp is beautiful is because it is Lisp. It's recursive.
The reason JavaScript is beautiful is because it is also Lisp, but disguised very thinly.
The reason C++ is beautiful is because it's not beautiful at all. Just like PHP.
C is the language that everyone knows. Java is C-like. Even Python is supposedly C-like.
Even my own language, that I wrote in a C-like language (Java), is C-like.
However, if Lisp was the language of choice, modding would be very very easy.
All we would have to do is open up the executable, which would be a text file just
like a Python script, throw in the magic of meta-circular evaluation, and bam.
Our own NPCs. Our own stuff. Own own custom special effects. Our own 'impossibles' like
getting partial transparency to work correctly in the Cave Story engine.
A lot of people try to decompile assembly into either C or C++.
This is approximately as fruitful as taking asphalt out of a parking lot,
heating it up in some kind of high temperature furnace, and drinking it.
Now, believe it or not, I have not started my argument yet.
All the above words you just read were just chunks of a pointless rambling session,
in which I complain about (actually really useful things) like NXEngine without
citing my sources.
But now, using some real-world modding experience, I will explain why modding
is difficult for me in particular:
1. I cannot draw art very well.
2. I cannot compose music, and when I attempt to copy it, I either do things wrong,
or I get really lazy and only transcript a portion of it.
3. I get bored very easily.
4. I cannot properly use a scripting language that does not have integers, floats,
and string manipulation.
5. I cannot easily read a programming language that has no indentation blocks.
6. I cannot be bothered to write a plugin for OllyDbg. Instead I must invent
my own Java program that does the opposite of what OllyDbg does:
write x86-32 properly and read it never, instead of read x86-32 properly
and write it horribly.
7. I cannot make maps that are both non-linear and not confusing
at the same time. Either I must make them very linear (Witching Hour)
or completely non-linear (A Lost Land first half). The first possibility
gets people to say that your mod is boring. The second possibility
gets some people to say that your mod is a giant fetch quest when the
actual point of putting unlockables in unusual places was to make the
entire mod less of a (y = constant * x + other_constant).replace("equation", "game").
8. There is no satisfaction after releasing a demo
except for a few people on the Internet saying either "oh cool nice job"
or "wow you suck at music... learn to compose loser..."
And yes, the second one brings me more satisfaction than the first.
It shows that the person ACTUALLY played your mod and is therefore
one of the decent people, instead of being a "cool story bro" guy who
is just a complete jerkass who didn't even get past the first two
rooms and somehow decides that things are probably just 'good enough'.
Number eight is what kills people the most. If nobody cares about your mod,
or nobody decides to criticize it, then what is the point of making a mod?
For fun? Write a standalone game. That'd be much more fun.
The point of modding is not to have fun, which seems a little ridiculous since
the only reason you should actually mod is just for hot wings and giggles.
The point of making a cool mod with a great idea and great dialogue, such
as the Schism Demo 1.0 (Schemo) by Xaser, is to lift yourself to divine levels.
To lift yourself to the level of Studio Pixel.
That is why people mod. To be cool like Mister Daisuke Amaya.
Ultimately, we all love the man, and he made a really good indie game.
But there has to be a better way.
I will do the following.
1. Figure out how to make pretty pictures without actually understanding art.
2. Figure out how to compose like ZUN without becoming his housewife.
3. Figure out how it is possible that Pixel didn't actually study music theory for reals.
4. Improve TSC far beyond the <VAR hack.
5. Write a Python to x86 compiler and patcher. Or something similar.
6. Design all my Aperture Science testing chambers... I mean Cave Story maps, as if I were GLaDOS.
7. Become a rich billionaire so it doesn't matter what the people of the Internet
think of my mod.
And that's basically it.
If you want to help, then don't. Yeah, you read that correctly.
A lot of people beg for help on their projects. I respect that.
It shows you are a team player.
Yesterday I decided to use a code counter on my entire codebase.
It does not count duplicated files, copied repositories, and SVN leftovers.
After writing about 700,000 lines of Java, 250,000 lines of Python,
75,000 lines of C++, and countless lines of nonsense during my life,
I have finally realized that I work best by myself.
Those lines of code include comments. And I don't bother to document
my methods ever, so there probably aren't that many comments.
I know I am perfectly capable of turning TSC into JIT-compiled JavaScript.
I know I can write a Python to x86 compiler/patcher just for Doukutsu.exe.
It's easy. I've already made a compiler for ASM code, and an interpreter for
a Pythonic language. I just need to add some colons, make sure there are no
tabs lying around, connect the two using the purity of the JVM, and I am done.
A better TSC? Easy. I'll just remove the entire parser. And rewrite it
from scratch in Python or x86.
Do you think I am going to keep events? Flags? 4-digit integers?
The < marker? <YNJ instead of custom menus? The same Profile.dat format?
I laugh at such things. The next time you see Doukutsu.exe, it will be
Doukutsu.msi and then Doukutsu.iso, because it will be transformed from
from PC game to web browser to full blown operating system.
If you actually do want to help, just attempt working on your own better
version of Doukutsu.exe first. If you show it to me, maybe we can strike
up and agreement and actually do something useful with our lives, such
as purchase a beach house and rent it out to people.
-- Addendum:
Now, why am I modding an executable? And not compiling source? Because...
1. I hate C/C++ and their impossible to use 3rd party libraries.
2. Java Swing is not the best for games.
3. Python cannot make games. At all. PyGame cannot create useful games.
Katawa Shoujo is like the only reasonable exception, and it uses Ren'Py,
which is not equal-equal to PyGame.
So thus, x86 has the best graphics library: I can write to the graph buffer
and edit the pixels on your monitor. I don't think anything else is actually
capable of doing that directly.